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

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

Built distribution (wheel)

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

Total release size: 5.0 MB

Release files / schemathesis-4.32.6.tar.gz

Download URL schemathesis-4.32.6.tar.gz
Size 3.8 MB
Tags Source
SHA-256 checksum
How to use checksums
584151776444a942d849d06f741d6466d87e81c73658178dbec4f07d7cf97cdd
BLAKE2b-256 checksum
How to use checksums
5a4a5e38d60748a58dc37e2dc5e00ab2f8734c0d83d7ab533c0cee5ead5f23ac
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 27, 2026.

Transparency log

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

Download URL schemathesis-4.32.6-py3-none-any.whl
Size 1.2 MB
Tags Python 3
SHA-256 checksum
How to use checksums
4862a59054fcff108dd6a3d1e40a81d24a70ad31756aecf14df6c39177a9bb7d
BLAKE2b-256 checksum
How to use checksums
89eaf6edac8f185f92e4ba57e14e3b0daec7d31822ba8b5d67f5da34432fd4de
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 27, 2026.

Transparency log

Security for schemathesis 4.32.6

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.6.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 27, 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.6 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