Skip to main content

Build Coverage Version Python versions Discord License

Schemathesis

Catch API bugs before your users do.

Schemathesis tests OpenAPI and GraphQL APIs by generating inputs from your schema, adapting to server responses, and chaining operations into realistic workflows.

Schemathesis automatically finding a server error
Finding bugs that manual testing missed

Schemathesis HTML report with the verdict, run details, timeline and failing operations
Verdict, timeline and every failure in one offline page: --report html

Try it now

# Test a demo API - finds real bugs in 30 seconds
uvx schemathesis run https://example.schemathesis.io/openapi.json

# Test your own API
uvx schemathesis run https://your-api.com/openapi.json

Schemathesis sends real requests that create, change and delete data. Point it at a dev or staging environment, not production.

What problems does it solve?

  • 💥 500 errors that crash your API on edge case inputs
  • 📋 Schema violations where your API returns different data than documented
  • 🚪 Validation bypasses where invalid data gets accepted
  • 🔗 Integration failures when responses don't match client expectations
  • 🔄 Stateful bugs where operations work individually but fail in realistic workflows
  • 🕵️ Broken object-level authorization where one user can read another user's objects

What can it do?

Installation & Usage

Command Line:

uv tool install schemathesis
schemathesis run https://your-api.com/openapi.json

Config file (schemathesis.toml, no Python needed):

headers = { Authorization = "Bearer ${API_TOKEN}" }
generation.max-examples = 500
rate-limit = "auto"

Python Tests:

uv add --dev schemathesis
import schemathesis

schema = schemathesis.openapi.from_url("https://your-api.com/openapi.json")


@schema.parametrize()
def test_api(case):
    # Tests with random data, edge cases, and invalid inputs
    case.call_and_validate()


# Stateful testing: Tests workflows like: create user -> get user -> delete user
APIWorkflow = schema.as_state_machine()
# Creates a test class for pytest/unittest
TestAPI = APIWorkflow.TestCase

CI/CD:

- uses: schemathesis/action@v3
  with:
    schema: "https://your-api.com/openapi.json"

Who uses it

Used by teams at Spotify, WordPress, JetBrains, and Red Hat.

"Schemathesis is the best tool for fuzz testing of REST APIs on the market. We at Red Hat use it for examining our applications in functional and integration testing levels." - Dmitry Misharov, RedHat

See it in action

🏆 Trophy case: crashes and schema violations Schemathesis found in vLLM, Qdrant, OpenObserve, Ory Kratos and Formbricks, each with a link to the fix.

🔬 Live Benchmarks: Schemathesis runs for an hour against real-world APIs such as Apache Airflow, Open WebUI and Prefect. For each one:

  • Code coverage and API schema coverage: operations, parameters, schema keywords (schema coverage measured with TraceCov)
  • Issues found, by category
  • How coverage grows over the run, phase by phase

Documentation

📚 Documentation with guides, examples, and API reference. Start here:

⚠️ Upgrading from older versions? Check our Migration Guide for key changes.

Get Help

Contributing

We welcome contributions! See our contributing guidelines and join discussions in issues or Discord.

Acknowledgements

Schemathesis is built on top of Hypothesis, a powerful property-based testing library for Python.

License

This project is licensed under the terms of the MIT license.

Metadata

Release files for schemathesis 4.32.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for schemathesis 4.32.5
File Size Uploaded Provenance Actions
schemathesis-4.32.5.tar.gz 3.8 MB With provenance Details for schemathesis-4.32.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for schemathesis 4.32.5
File Interpreter ABI Platform Actions
schemathesis-4.32.5-py3-none-any.whl Python 3 none any Details for schemathesis-4.32.5-py3-none-any.whl

Total release size: 5.0 MB

Release files / schemathesis-4.32.5.tar.gz

Download URL schemathesis-4.32.5.tar.gz
Size 3.8 MB
Tags Source
SHA-256 checksum
How to use checksums
641fddfef22120f263b60616935f125fa9b71bd32cb3175c6210f38e5ed1cb2f
BLAKE2b-256 checksum
How to use checksums
20500149a7be4db5a5b7fab41e3781aabbee0e5f9d72ad57d87243b6db9fa627
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 25, 2026.

Transparency log

Release files / schemathesis-4.32.5-py3-none-any.whl

Download URL schemathesis-4.32.5-py3-none-any.whl
Size 1.2 MB
Tags Python 3
SHA-256 checksum
How to use checksums
5ec7e532ebdf9b0e0239a943df2a565174aecda513b61e564d8ad2a3ac801f22
BLAKE2b-256 checksum
How to use checksums
52cde603f5243e5016c960974b8f0c6105407bc18a20fed08af58c7466308c41
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 25, 2026.

Transparency log

Security for schemathesis 4.32.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for schemathesis-4.32.5.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 25, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

4.32.5 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page