This is the WIP documentation for Connexion 3.0 which is currently in alpha. You might want to read the documentation for the latest stable version instead.

If you want to try out Connexion 3.0, refer to the :ref: v3 section.

Welcome to Connexion’s documentation!

Connexion is a 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

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.