bravado
Library for accessing Swagger-enabled API's
What it is and what it does
Bravado is a Python library that reads an OpenAPI Specification 2.0 document and constructs a live REST client from it, letting you call API operations as Python method calls without writing boilerplate or running a code generator. It was created by Yelp as a maintained fork of the original swagger-py project and aims to replace the need for swagger-codegen in Python workflows.
The library handles HTTP communication, authentication (basic auth, API keys, custom headers), and response parsing automatically. It supports both synchronous HTTP clients (via RequestsClient) and asynchronous clients (via FidoClient when installed with the fido extra). You point it at a Swagger JSON URL, and it builds a client object whose attributes and methods mirror the API structure defined in the specification.
Use it for:
- Build a Python client for a third-party REST API that publishes an OpenAPI 2.0 spec without writing manual HTTP code.
- Integrate with internal microservices that expose OpenAPI specifications, generating clients on the fly at runtime.
- Test or prototype against a Swagger-documented API without waiting for code generation or maintaining hand-written client stubs.
- Add basic or header-based authentication to API calls through a simple configuration interface.
- Use asynchronous HTTP requests to a Swagger API by swapping in FidoClient for concurrent operations.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Bravado generates a dynamic REST client from an OpenAPI Specification 2.0 document, allowing you to call API endpoints as Python methods without code generation.
Yes, with conditions. Bravado is stable (Production/Stable status, 609 GitHub stars, active repository) and solves a real problem—eliminating code generation for OpenAPI 2.0 clients. However, high install friction and a 464-day release gap warrant checking that your environment can satisfy its dependencies and that OpenAPI 2.0 is your target (not 3.0+). If you need dynamic REST clients and your APIs publish OpenAPI 2.0 specs, it is worth the setup cost.
Install
bravado on PyPI
pip
pip install bravadouv
uv add bravadopoetry
poetry add bravadoInstalling bravado
Before you install
High install friction: no runtime dependencies listed, but the package itself is marked as high-friction. Last release was 464 days ago; repository is active with recent commits (2026-04-02) and 609 stars, suggesting ongoing maintenance despite the release gap.
License in practice
BSD 3-Clause License is permissive and poses no restrictions on commercial or private use. You may use, modify, and distribute Bravado freely provided you include the license notice.
Quickstart
from bravado.client import SwaggerClient
client = SwaggerClient.from_url('http://petstore.swagger.io/v2/swagger.json')
pet = client.pet.getPetById(petId=1).response().result
Requires Python 3.8 or later; the OpenAPI Specification document must be accessible at the provided URL.
Verify before relying
- Whether high install friction stems from compiled dependencies, system library requirements, or network access during installation.
- Current compatibility with OpenAPI 3.0+ specifications (fact sheet only mentions 2.0 support).
- Whether the 464-day gap since last release indicates maintenance slowdown or stability-driven infrequent updates.
Package facts
| License | BSD 3-Clause License (permissive) |
| Python support | supports the current Python release (>=3.8) |
| Install friction | high — source build required |
| Runtime dependencies | none |
| Maintenance | actively maintained — 464 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 328,167/month — #7,558 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: bravado-12.0.1.tar.gz
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
bravado-corebravado-core validates, marshals, and…
permissive · top 15,000 on PyPI
drf-yasgGenerates Swagger/OpenAPI 2.0 specifications…
permissive · top 5,000 on PyPI
apispecGenerates OpenAPI specification documents from…
permissive · top 5,000 on PyPI
yelpapiyelpapi wraps the Yelp Fusion API, letting you…
permissive · top 15,000 on PyPI
connexionConnexion builds REST APIs from OpenAPI/Swagger…
permissive · top 5,000 on PyPI
sphinxcontrib-openapiSphinx extension that renders OpenAPI (Swagger)…
permissive · top 15,000 on PyPI
django-rest-swaggerGenerates Swagger UI documentation and OpenAPI…
permissive · top 15,000 on PyPI
essentials-openapiGenerates OpenAPI v2 and v3 documentation in…
permissive · top 15,000 on PyPI
openapi-codecConverts between OpenAPI/Swagger schemas and…
permissive · top 15,000 on PyPI
turnkey-httpTurnkey HTTP is an HTTP client for the Turnkey…
permissive · top 15,000 on PyPI