--- id: connexion version: "3.3.0" license: Apache-2.0 license_treatment: permissive maintenance: active --- # connexion — Connexion - API first applications with OpenAPI/Swagger License: permissive · Maintenance: active · Downloads: 10.6M/mo ## What it is and what it does Connexion is a Python web framework that inverts the typical API development workflow: you write an OpenAPI specification first, then Connexion automatically wires your Python functions to the routes, validates all requests and responses against the spec, and handles parameter unpacking and serialization. It works standalone via AsyncApp or FlaskApp, or as middleware wrapping any existing ASGI or WSGI application. The framework guarantees your API behaves exactly as specified—no manual route decorators, no hand-written validation logic, no documentation drift. The core appeal is spec-first development: your OpenAPI file becomes the single source of truth for API behavior, shared with clients and teams before implementation begins. Connexion handles the plumbing (request validation, response serialization, authentication separation, Swagger UI console) so you focus on business logic. It depends on Starlette for async handling, Werkzeug for WSGI compatibility, PyYAML for spec parsing, jsonschema for validation, and several other standard libraries. Use it for: - Build a new REST API where the spec is written first and serves as the contract for frontend and backend teams. - Add OpenAPI validation and documentation to an existing Flask or Starlette application via ConnexionMiddleware. - Rapidly prototype and mock an API using connexion run openapi.yaml before writing handler code. - Enforce strict request/response validation and automatic serialization to reduce bugs in parameter handling. - Generate live Swagger UI documentation with 'try it out' capability directly from your specification. - Migrate a Connexion 2.x application to the new Connexion 3 async-first architecture. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Connexion builds REST APIs from OpenAPI/Swagger specifications, automatically mapping routes, validating requests and responses, and handling parameter injection without decorators. Yes. Connexion is actively maintained, has no known vulnerabilities, and offers a genuinely different development model—spec-first rather than code-first—that appeals to teams prioritizing API contracts and documentation. Low install friction and broad Python version support (3.9–3.14) make it accessible. Choose it if your workflow benefits from writing the spec first and letting the framework enforce it; avoid it if you prefer decorators and implicit routing. ## Install pip install connexion uv add connexion poetry add connexion ## Installing connexion Before you install: Low install friction with a pure-Python wheel. Active maintenance with recent commits; last release 305 days ago. Supports Python 3.9 through 3.14. Eleven runtime dependencies are all widely-used libraries (Starlette, Werkzeug, PyYAML, jsonschema, etc.), so environment resolution is straightforward. License in practice: Apache-2.0 permissive license allows commercial use, modification, and redistribution with minimal restrictions—suitable for both open-source and proprietary projects. Quickstart: pip install connexion from connexion import AsyncApp app = AsyncApp(__name__) app.add_api('openapi.yaml') # In openapi.yaml, link operationId to your Python function # Connexion automatically unpacks parameters and serializes responses Requires Python 3.9 or later. For development use of app.run(), install connexion[uvicorn]; for production, use an external ASGI server like uvicorn or gunicorn. Verify before relying: - Performance characteristics and throughput under load compared to other ASGI frameworks. - Maturity and stability of Connexion 3 relative to the 2.x line it recently replaced. - Real-world adoption and community size beyond GitHub stars. ## Package facts - License: Apache-2.0 (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 10.6M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags openapi rest api framework, swagger spec-first development, automatic route registration from spec, api validation and serialization, openapi to python mapping, spec-first web framework, asgi wsgi api framework, openapi-first, asgi-wsgi-compatible, spec-driven [View on SkillFed](https://skillfed.io/packages/connexion) · [View on PyPI](https://pypi.org/project/connexion/)