📢 Connexion 3 was recently released!

If you are upgrading from Connexion 2, refer to the Connexion 3.0: API-first for all section.

Welcome to Connexion’s documentation!

Connexion is a modern Python web framework that makes spec-first and api-first development easy. You describe your API in an OpenAPI (or swagger) specification with as much detail as you want and Connexion will guarantee that it works as you specified.

Connexion Features

Based on your specification, Connexion provides the following functionality:

  • Automatic routing to your Python functions

  • Authentication

  • Request validation

  • Parameter parsing and injection

  • Response serialization

  • Response validation

  • A Swagger UI console with live documentation and ‘try it out’ feature

Connexion also helps you write your OpenAPI specification and develop against it by providing a command line interface which lets you test and mock your specification.

connexion run openapi.yaml


ML6 Fern

Sponsors help us dedicate time to maintain Connexion. Want to help?

Explore the options »

Why Connexion?

Being spec-first is what makes Connexion unique in the Python ecosystem. With Connexion, you write your API specification first, and automatically get a lot of functionality. With all other popular Python web frameworks, you write your functionality first, and automatically get your specification.

We choose the spec-first approach because it:

  • Stimulates thinking about the design of your API and enables quick feedback loops

  • Creates a common understanding of how the API should work

  • Allows server and client development in parallel

  • Enables contract testing

  • Allows for orchestrating multiple layers of your API stack from one contract (eg. API Gateway)

For a more detailed explanation about the benefits of working spec-first, or an overview of helpful tooling, have a look at our recommended resources.