skillfed

connexion

Connexion - API first applications with OpenAPI/Swagger

connexion v3.3.0 10.6M downloads/30d#1,444 on PyPI4,608
Permissive license Apache-2.0 Active released

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 on this page — 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

connexion on PyPI

pip

pip install connexion

uv

uv add connexion

poetry

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 the current Python release (<4.0,>=3.9)
Install friction low — pure-Python wheel
Runtime dependencies 11 — Jinja2, PyYAML, asgiref, httpx, inflection, jsonschema, python-multipart, requests, starlette, typing-extensions, werkzeug
Maintenance actively maintained — 305 days since the last release
Last repo commit
First released
Downloads 10,584,452/month — #1,444 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: connexion-3.3.0-py3-none-any.whl

Keywords: api, swagger, openapi

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9Topic :: InternetTopic :: Internet :: WWW/HTTPTopic :: Internet :: WWW/HTTP :: HTTP ServersTopic :: Software DevelopmentTopic :: Software Development :: LibrariesTopic :: Software Development :: Libraries :: Python ModulesTyping :: Typed

Tags

openapi rest api frameworkswagger spec-first developmentautomatic route registration from specapi validation and serializationopenapi to python mappingspec-first web frameworkasgi wsgi api framework
openapi-firstasgi-wsgi-compatiblespec-driven

More Software Development packages