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.1

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.1
File Size Uploaded Provenance Actions
schemathesis-4.32.1.tar.gz 3.8 MB With provenance Details for schemathesis-4.32.1.tar.gz

Built distribution (wheel)

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

Total release size: 5.0 MB

Release files / schemathesis-4.32.1.tar.gz

Download URL schemathesis-4.32.1.tar.gz
Size 3.8 MB
Tags Source
SHA-256 checksum
How to use checksums
4a0e1841feba1026dc9a0fa9b0ee0d0d44937bfb737c06caee0c924a9b4210ed
BLAKE2b-256 checksum
How to use checksums
809731a0629cd6611a7383f4b6c701c9b73964324104795d0d40ebbba5a92934
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 19, 2026.

Transparency log

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

Download URL schemathesis-4.32.1-py3-none-any.whl
Size 1.2 MB
Tags Python 3
SHA-256 checksum
How to use checksums
95d700ec8b6ec44ba508f5c75f10afe902e0bbe64934bff9b1b1d4dcbe9abaed
BLAKE2b-256 checksum
How to use checksums
950a2139fc508a2a682522ec60e99ec890f200f84578645c158ec09f6f3c98af
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 19, 2026.

Transparency log

Security for schemathesis 4.32.1

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.1.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 19, 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.1 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