$npx skillfedfor your agent

flaky

Plugin for pytest that automatically reruns flaky tests.

With conditionsPyPI TestingReleased Mar 20244.2M downloads / mopermissive licensePure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — flaky-3.8.1-py2.py3-none-any.whl
v3.8.1 · released 2024-03-12 · Python >=3.5

Yes, if you have tests that depend on unreliable components and want to reduce false failures without removing or skipping tests. The plugin is mature, widely used, and has no security vulnerabilities. The aging maintenance status is not a blocker for stable functionality, but verify compatibility with your current pytest version before adopting.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires pytest to be installed and used as the test runner.
  • Doctests cannot be marked flaky.
  • Low friction installation with no runtime dependencies.

License · maintenance · safety

permissive license (permissive) — Licensed under Apache Software License, Version 2.0. You may use, modify, and distribute the package freely in commercial and private projects, provided you include a copy of the license and do not hold the authors liable.

last release 2024-03-12 (885 days) · last repo commit 2025-09-08 · 398 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 4,217,322 downloads/mo, #2,361 on PyPI

Verify before relying

pip install flaky

from flaky import flaky

@flaky(max_runs=3, min_passes=2)
def test_something():
    # test code here
    pass
  • Current compatibility with pytest versions released after March 2024 is not documented in the fact sheet.
  • Whether the package works with modern pytest plugins and extensions beyond pytest-xdist is unclear.
  • Support for Python versions beyond 3.8 (the latest listed in classifiers) needs confirmation.
Same gist for agents: .md · .json

What it is and what it does

Flaky is a pytest plugin that automatically reruns tests that fail, allowing you to handle tests that depend on unreliable external components—such as flaky network services or timing-sensitive fixtures—without skipping them or removing them from your suite. Instead of treating intermittent failures as permanent, you decorate a test with @flaky and specify how many times it should run and how many times it must pass to be considered successful.

The plugin works by intercepting test failures and retrying them according to your configuration. You can apply the decorator to individual test functions or entire test classes, override behavior per-test, and even provide custom filter functions to decide which failures warrant a retry and which should fail immediately. It integrates seamlessly with pytest and can be disabled via command-line flags if needed.

Use it for

  • Mark tests that depend on external APIs or services as flaky to avoid false test failures from transient network issues.
  • Retry tests with timing-sensitive assertions that occasionally fail due to system load or scheduling variance.
  • Apply flaky behavior to an entire test class while overriding retry counts for specific test methods that need different handling.
  • Use a custom rerun_filter to skip retries for certain error types (e.g., application crashes) while retrying for others.
  • Add delays between retries using a rerun_filter to allow external services time to recover before the next attempt.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you have tests that depend on unreliable components and want to reduce false failures without removing or skipping tests.

The plugin is mature, widely used, and has no security vulnerabilities. The aging maintenance status is not a blocker for stable functionality, but verify compatibility with your current pytest version before adopting.

Install

flaky on PyPI

Before you install

Low friction installation with no runtime dependencies. Maintenance status is aging—last release was in March 2024—but the repository remains active and the package is widely used (4+ million monthly downloads). Suitable for established projects where the plugin's core functionality is stable.

Requires pytest to be installed and used as the test runner. Doctests cannot be marked flaky.

License in practice

Licensed under Apache Software License, Version 2.0. You may use, modify, and distribute the package freely in commercial and private projects, provided you include a copy of the license and do not hold the authors liable.

Quickstart

pip install flaky

from flaky import flaky

@flaky(max_runs=3, min_passes=2)
def test_something():
    # test code here
    pass

Verify before relying

  • Current compatibility with pytest versions released after March 2024 is not documented in the fact sheet.
  • Whether the package works with modern pytest plugins and extensions beyond pytest-xdist is unclear.
  • Support for Python versions beyond 3.8 (the latest listed in classifiers) needs confirmation.

Package facts

Licensepermissive license permissive
Python supportSupports the current Python release >=3.5
Install frictionLow. Pure-Python wheel
Runtime dependenciesNone
MaintenanceAging 885 days since the last release
Last repo commit
First released
Downloads4,217,322 / month, #2,361 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseOperating System :: MacOS :: MacOS XOperating System :: Microsoft :: WindowsOperating System :: OS IndependentOperating System :: POSIXProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Software Development :: Testing

Evidence: flaky-3.8.1-py2.py3-none-any.whl

Tags

Capabilities
pytest test retry pluginautomatic flaky test rerunpytest rerun failing testshandle unreliable test fixturespytest flaky decoratortest retry mechanismpytest intermittent failure handling
Topics
pytest-plugintest-reliability
PyPI keywords
pytestpluginflakytestsrerunretry

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “automatic flaky test rerun”

  • flakyA pytest plugin that automatically reruns failing tests up to a…
  • pytest-rerunfailuresA pytest plugin that automatically reruns failed tests to eliminate…
  • pytest-retrypytest-retry is a pytest plugin that automatically retries failed…

Give your agent the search over MCP, or paste the wish link into any chat.

More Testing packages

pluggy Worth it
PyPI · Libraries · released May 2025

Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.

Install it if you're building an extensible application or framework.

MITpure Python · 3.9+aging
1.3Bdownloads / mo
pytest Worth it
PyPI · Libraries · released Jun 2026

pytest is a testing framework that lets you write test functions using plain assert statements and automatically discovers and runs them, with detailed failure reporting.

MITpure Python · 3.10+
1.1Bdownloads / mo
virtualenv Worth it
PyPI · Libraries · released Aug 2026

virtualenv creates isolated Python environments where packages can be installed independently without affecting the system Python or other projects.

MITpure Python · 3.9+
532.9Mdownloads / mo
coverage Worth it
PyPI · Testing · released Aug 2026

Coverage.py measures which lines of Python code are executed during test runs, reporting coverage percentages and identifying untested code paths.

Install it if you want to measure test completeness or enforce coverage thresholds in your project.

permissive licensepure Python · 3.10+
335.8Mdownloads / mo
pytest-asyncio Worth it
PyPI · Testing · released May 2026

pytest-asyncio is a pytest plugin that enables writing and running async test functions using the asyncio library, allowing developers to await code directly within test cases.

Install it if you write tests for any asyncio-based code.

Apache-2.0pure Python · 3.10+
275.9Mdownloads / mo
pytest-json-ctrf Worth it
PyPI · Testing · released Jul 2026

A pytest plugin that generates test reports in Common Test Report Format (CTRF) as JSON, compatible with pytest-xdist and pytest-playwright for distributed and browser-based testing.

Install it if you need CTRF-formatted test output for CI/CD integration or cross-tool reporting.

MITpure Python · 3.8+
273.0Mdownloads / mo

See also pytest-rerunfailures · pytest-mergify · pytest-retry · pytest-sentry · pytest-repeat · pytest-flakefinder · pytest-replay · pytest-loop · pytest-fail-slow · robotframework-retryfailed