schemathesis
Adaptive API testing for OpenAPI and GraphQL
Decision gist · record as of 2026-08-14
Yes. Schemathesis is actively maintained, has low install friction, carries no security vulnerabilities, and uses a permissive MIT license. It solves a real problem—finding API bugs through automated schema-driven testing—and is used by established companies like Spotify, WordPress, JetBrains, and Red Hat. Install it if you own or test an OpenAPI or GraphQL API and want to catch bugs before users do.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low friction: pure Python wheel with 15 runtime dependencies including hypothesis, pytest, and requests.
- Active maintenance with a release 20 days ago and 3526 GitHub stars.
- Supports Python 3.10 through 3.14.
License · maintenance · safety
MIT (permissive) — MIT license (permissive): you can use, modify, and distribute schemathesis freely in commercial and private projects with minimal restrictions.
last release 2026-07-25 (20 days) · last repo commit 2026-08-14 · 3,526 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 6,734,183 downloads/mo, #1,862 on PyPI
Alternatives
Verify before relying
pip install schemathesis
import schemathesis
schema = schemathesis.openapi.from_url("https://your-api.com/openapi.json")
@schema.parametrize()
def test_api(case):
case.call_and_validate()- Whether the package's stateful testing (as_state_machine) requires additional setup or configuration beyond the basic usage shown.
- Performance characteristics when testing large or complex OpenAPI schemas with many endpoints.
- Whether hypothesis-graphql and hypothesis-jsonschema are automatically invoked or require explicit configuration for GraphQL/JSON Schema support.
What it is and what it does
Schemathesis is a property-based testing framework for OpenAPI and GraphQL APIs. It reads your API schema, generates test cases covering edge cases and invalid inputs, sends them to your API, and validates that responses match the schema and don't crash. It can also chain operations together to test realistic workflows—for example, creating a resource, fetching it, and deleting it in sequence—to catch bugs that only appear when operations interact.
The package integrates with pytest and Hypothesis to run tests both from the command line and within Python test suites. It supports multiple reporting formats (Allure, JUnit XML) for CI/CD pipelines and can adapt its test generation based on server responses. With 15 runtime dependencies including click, requests, pyyaml, and rich, it provides a complete testing toolkit without requiring external tools.
Use it for
- Catch 500 errors and crashes caused by edge-case inputs before users encounter them in production.
- Verify that your API returns data matching your OpenAPI schema and rejects invalid inputs correctly.
- Test multi-step workflows like user creation, retrieval, and deletion to find bugs in operation sequencing.
- Integrate API testing into CI/CD pipelines using GitHub Actions or other tools via JUnit XML reports.
- Fuzz-test GraphQL APIs to find schema violations and unexpected server behavior.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
Schemathesis is actively maintained, has low install friction, carries no security vulnerabilities, and uses a permissive MIT license. It solves a real problem—finding API bugs through automated schema-driven testing—and is used by established companies like Spotify, WordPress, JetBrains, and Red Hat. Install it if you own or test an OpenAPI or GraphQL API and want to catch bugs before users do.
Install
schemathesis on PyPI
Before you install
Low friction: pure Python wheel with 15 runtime dependencies including hypothesis, pytest, and requests. Active maintenance with a release 20 days ago and 3526 GitHub stars. Supports Python 3.10 through 3.14.
License in practice
MIT license (permissive): you can use, modify, and distribute schemathesis freely in commercial and private projects with minimal restrictions.
Quickstart
pip install schemathesis
import schemathesis
schema = schemathesis.openapi.from_url("https://your-api.com/openapi.json")
@schema.parametrize()
def test_api(case):
case.call_and_validate()
Verify before relying
- Whether the package's stateful testing (as_state_machine) requires additional setup or configuration beyond the basic usage shown.
- Performance characteristics when testing large or complex OpenAPI schemas with many endpoints.
- Whether hypothesis-graphql and hypothesis-jsonschema are automatically invoked or require explicit configuration for GraphQL/JSON Schema support.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 15 packagesclickharfilehypothesis-graphqlhypothesis-jsonschemahypothesisjsonschema-rspyrate-limiterpytestpyyamlrequestsrichstarlette-testclienttomlityping-extensionswerkzeug |
| Maintenance | Actively maintained 20 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 6,734,183 / month, #1,862 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableEnvironment :: ConsoleFramework :: HypothesisFramework :: PytestIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Software Development :: Testing |
Evidence: schemathesis-4.24.3-py3-none-any.whl
Tags
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 › “openapi api testing”
- schemathesisSchemathesis generates test cases from OpenAPI and GraphQL schemas to…
- openapi-spec-validatorValidates OpenAPI specifications (versions 2.0, 3.0, 3.1, and 3.2)…
- flask-openapi3-swaggerProvides Swagger UI integration for flask-openapi3, enabling…
Give your agent the search over MCP, or paste the wish link into any chat.
More Testing packages
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.
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.
virtualenv creates isolated Python environments where packages can be installed independently without affecting the system Python or other projects.
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.
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.
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.
See also hypothesis-graphql · hegel-core · hypothesis-jsonschema · hypothesis · openapi-schema-pydantic · quart-schema · ariadne-codegen · datamodel-code-generator · voluptuous-openapi · graphene-django