{"id":13412346,"url":"https://github.com/spec-first/connexion","last_synced_at":"2026-02-23T00:01:49.528Z","repository":{"id":32307460,"uuid":"35882519","full_name":"spec-first/connexion","owner":"spec-first","description":"Connexion is a modern Python web framework that makes spec-first and api-first development easy.","archived":false,"fork":false,"pushed_at":"2026-02-02T16:57:54.000Z","size":16780,"stargazers_count":4577,"open_issues_count":172,"forks_count":781,"subscribers_count":75,"default_branch":"main","last_synced_at":"2026-02-15T13:49:54.251Z","etag":null,"topics":["api-first","api-rest","flask-extensions","microservices","openapi","python","swagger","web"],"latest_commit_sha":null,"homepage":"https://connexion.readthedocs.io/en/latest/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"0Chencc/CTFCrackTools","license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/spec-first.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"docs/security.rst","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":"NOTICE","maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"spec-first"}},"created_at":"2015-05-19T13:05:58.000Z","updated_at":"2026-02-07T06:05:24.000Z","dependencies_parsed_at":"2023-01-16T22:31:17.768Z","dependency_job_id":"83e3b958-7c04-47e7-ac33-e50617370a05","html_url":"https://github.com/spec-first/connexion","commit_stats":{"total_commits":1268,"total_committers":234,"mean_commits":5.418803418803419,"dds":0.8454258675078864,"last_synced_commit":"1844a2fb3f1d09a37edfeab7a7200d52e97abbd9"},"previous_names":["zalando/connexion"],"tags_count":161,"template":false,"template_full_name":null,"purl":"pkg:github/spec-first/connexion","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spec-first%2Fconnexion","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spec-first%2Fconnexion/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spec-first%2Fconnexion/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spec-first%2Fconnexion/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spec-first","download_url":"https://codeload.github.com/spec-first/connexion/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spec-first%2Fconnexion/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29509258,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-16T09:05:14.864Z","status":"ssl_error","status_checked_at":"2026-02-16T08:55:59.364Z","response_time":115,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api-first","api-rest","flask-extensions","microservices","openapi","python","swagger","web"],"created_at":"2024-07-30T20:01:23.657Z","updated_at":"2026-02-23T00:01:49.489Z","avatar_url":"https://github.com/spec-first.png","language":"Python","readme":" \u003ca id=\"top\"\u003e\u003c/a\u003e\n \u003cp align=\"center\"\u003e\n     \u003cimg src=\"https://raw.githubusercontent.com/spec-first/connexion/main/docs/images/logo_banner.svg\" width=\"100%\"/\u003e\n \u003c/p\u003e\n \u003cp align=\"center\"\u003e\n     \u003ca href=\"https://pypi.org/project/connexion\"\u003e\u003cimg alt=\"coveralls\" src=\"https://img.shields.io/pypi/status/connexion.svg?style=flat-square\u0026color=brightgreen\"\u003e\u003c/a\u003e\n     \u003ca href=\"https://pypi.org/project/connexion\"\u003e\u003cimg alt=\"PyPI version\" src=\"https://img.shields.io/pypi/v/connexion?color=brightgreen\u0026style=flat-square\"\u003e\u003c/a\u003e\n     \u003ca href=\"https://pypistats.org/packages/connexion\"\u003e\u003cimg alt=\"PyPI\" src=\"https://img.shields.io/pypi/dm/connexion?style=flat-square\u0026color=brightgreen\"\u003e\u003c/a\u003e\n     \u003ca href=\"https://github.com/spec-first/connexion/blob/main/LICENSE\"\u003e\u003cimg alt=\"License\" src=\"https://img.shields.io/pypi/l/connexion?style=flat-square\u0026color=brightgreen\"\u003e\u003c/a\u003e\n     \u003ca href=\"https://github.com/spec-first/connexion/actions/workflows/pipeline.yml\"\u003e\u003cimg alt=\"GitHub Workflow Status\" src=\"https://img.shields.io/github/actions/workflow/status/spec-first/connexion/pipeline.yml?style=flat-square\"\u003e\u003c/a\u003e\n     \u003ca href=\"https://coveralls.io/github/spec-first/connexion?branch=main\"\u003e\u003cimg alt=\"Coveralls\" src=\"https://img.shields.io/coverallsCoverage/github/spec-first/connexion?style=flat-square\"\u003e\u003c/a\u003e\n     \u003ca href=\"https://gurubase.io/g/connexion\"\u003e\u003cimg alt=\"Gurubase\" src=\"https://img.shields.io/badge/Gurubase-Ask%20Connexion%20Guru-brightgreen?style=flat-square\"\u003e\u003c/a\u003e\n     \u003cbr\u003e\n     \u003cbr\u003e\n     \u003ca href=\"https://connexion.readthedocs.io/en/stable/\"\u003e\u003cstrong\u003eExplore the docs »\u003c/strong\u003e\u003c/a\u003e\n \u003c/p\u003e\n\n---\n\nConnexion is a modern Python web framework that makes spec-first and api-first development easy.\nYou describe your API in an [OpenAPI][OpenAPI] (or [Swagger][Swagger]) specification with as much \ndetail as you want and Connexion will guarantee that it works as you specified.\n\nIt works either standalone, or in combination with any ASGI or WSGI-compatible framework!\n\n\u003cp align=\"center\"\u003e\n   \u003cbr\u003e\n   \u003ca href=\"https://connexion.readthedocs.io/en/latest/v3.html\"\u003e\u003cstrong\u003e📢 Connexion 3 was recently released! Read about the changes here »\u003c/strong\u003e\u003c/a\u003e\n   \u003cbr\u003e\n   \u003cbr\u003e\n\u003c/p\u003e\n\n## ✨ Features\n\nConnexion provides the following functionality **based on your specification**:\n\n- 🚏 **Automatic route registration**, no ``@route`` decorators needed\n- 🔒 **Authentication**, split from your application logic\n- 🔎 **Request and response validation** of headers, parameters, and body\n- 📬 **Parameter parsing and injection**, no request object needed\n- 📨 **Response serialization**, you can return regular Python objects\n- 📺 **A Swagger UI console** with live documentation and ‘try it out’ feature\n- 🧩 **Pluggability**, in all dimensions\n\nConnexion 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.\n\n```shell\n   connexion run openapi.yaml\n```\n\n \u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n## 🫶 Sponsors\n\n\u003ca href=\"https://www.ml6.eu\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/spec-first/connexion/main/docs/images/sponsors/ML6.png\" title=ML6 height=\"100\"\u003e\u003c/a\u003e\n\nSponsors help us dedicate time to maintain Connexion. Want to help?\n\n\u003ca href=\"https://github.com/sponsors/spec-first\"\u003e\u003cstrong\u003eExplore the options »\u003c/strong\u003e\u003c/a\u003e\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n## 🪤 Why Connexion\n\nWith Connexion, you write the spec first. Connexion then calls your Python\ncode, handling the mapping from the specification to the code. This\nincentivizes you to write the specification so that all of your\ndevelopers can understand what your API does, even before you write a\nsingle line of code.\n\nIf multiple teams depend on your APIs, you can use Connexion to easily\nsend them the documentation of your API. This guarantees that your API will\nfollow the specification that you wrote. This is a different process from\nthe one offered by most frameworks, which generate a specification\n*after* you've written the code.\nSome disadvantages of generating specifications based on code is that\nthey often end up lacking details or mix your documentation with the implementation\nlogic of your application.\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n## ⚒️ How to Use\n\n### Installation\n\nYou can install connexion using pip:\n\n```shell\n    $ pip install connexion\n```\n\nConnexion provides 'extras' with optional dependencies to unlock additional features:\n\n- `swagger-ui`: Enables a Swagger UI console for your application.\n- `uvicorn`: Enables to run the your application using `app.run()` for\n  development instead of using an external ASGI server.\n- `flask`: Enables the `FlaskApp` to build applications compatible with the Flask\n  ecosystem.\n\nYou can install them as follows:\n\n```shell\n    $ pip install connexion[swagger-ui]\n    $ pip install connexion[swagger-ui,uvicorn]\n```\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n### Creating your application\n\nConnexion can be used either as a standalone application or as a middleware wrapping an existing\nASGI (or WSGI) application written using a different framework. The standalone application can be\nbuilt using either the `AsyncApp` or `FlaskApp`.\n\n- The `AsyncApp` is a lightweight application with native asynchronous support. Use it if you\n  are starting a new project and have no specific reason to use one of the other options.\n\n  ```Python\n      from connexion import AsyncApp\n\n      app = AsyncApp(__name__)\n  ```\n\n- The `FlaskApp` leverages the `Flask` framework, which is useful if you're migrating from\n  connexion 2.X or you want to leverage the `Flask` ecosystem.\n\n  ```python\n      from connexion import FlaskApp\n\n      app = FlaskApp(__name__)\n  ```\n\n- The `ConnexionMiddleware` can be wrapped around any existing ASGI or WSGI application.\n  Use it if you already have an application written in a different framework and want to add\n  functionality provided by connexion\n\n  ```python\n      from asgi_framework import App\n      from connexion import ConnexionMiddleware\n\n      app = App(__name__)\n      app = ConnexionMiddleware(app)\n  ```\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n### Registering an API\n\nWhile you can register individual routes on your application, Connexion really shines when you\nregister an API defined by an OpenAPI (or Swagger) specification.\nThe operation described in your specification is automatically linked to your Python view function via the ``operationId``\n\n**run.py**\n\n```python\n   def post_greeting(name: str, greeting: str):  # Paramaeters are automatically unpacked\n       return f\"{greeting} {name}\", 200          # Responses are automatically serialized\n\n   app.add_api(\"openapi.yaml\")\n```\n\n**openapi.yaml**\n\n```yaml\n   ...\n   paths:\n     /greeting/{name}:\n       post:\n         operationId: run.post_greeting\n         responses:\n           '200':\n             content:\n               text/plain:\n                 schema:\n                   type: string\n         parameters:\n           - name: name\n             in: path\n             required: true\n             schema:\n               type: string\n           - name: greeting\n             in: query\n             required: true\n             schema:\n               type: string\n```\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n### Running your application\n\nIf you installed connexion using `connexion[uvicorn]`, you can run it using the\n`run` method. This is only recommended for development:\n\n```python\n    app.run()\n```\n\nIn production, run your application using an ASGI server such as `uvicorn`. If you defined your\n`app` in a python module called `run.py`, you can run it as follows:\n\n```shell\n    $ uvicorn run:app\n```\n\nOr with gunicorn:\n\n```shell\n    $ gunicorn -k uvicorn.workers.UvicornWorker run:app\n```\n\n----\n\nNow you're able to run and use Connexion!\n\nSee the [examples][examples] folder for more examples.\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n## 📜 Changes\n\nA full changelog is maintained on the [GitHub releases page][Releases].\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n## 🤲 Contributing\n\nWe welcome your ideas, issues, and pull requests. Just follow the\nusual/standard GitHub practices.\n\nFor easy development, install connexion using poetry with all extras, and\ninstall the pre-commit hooks to automatically run black formatting and static analysis checks.\n\n```shell\n    pip install poetry\n    poetry install --all-extras\n    pre-commit install\n```\n\nYou can find out more about how Connexion works and where to apply your changes by having a look\nat our [architecture][Architecture].\n\nUnless you explicitly state otherwise in advance, any non trivial\ncontribution intentionally submitted for inclusion in this project by you\nto the steward of this repository shall be under the\nterms and conditions of Apache License 2.0 written below, without any\nadditional copyright information, terms or conditions.\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n## 🙏 Thanks\n\nWe'd like to thank all of Connexion's contributors for working on this\nproject, Swagger/OpenAPI for their support, and Zalando for originally developing and releasing Connexion.\n\n## 📚 Recommended Resources\n\nAbout the advantages of working spec-first:\n\n* [Blog Atlassian][Blog Atlassian]\n* [API guidelines Zalando][API guidelines Zalando]\n* [Blog ML6][Blog ML6]\n* [Blog Zalando][Blog Zalando]\n\nTools to help you work spec-first:\n\n* [Online swagger editor][Online swagger editor]\n* [VS Code plugin][VS Code plugin]\n* [Pycharm plugin][Pycharm plugin]\n\n[OpenAPI]: https://openapis.org/\n[Swagger]: http://swagger.io/open-source-integrations/\n[Blog atlassian]: https://www.atlassian.com/blog/technology/spec-first-api-development\n[Blog ML6]: https://blog.ml6.eu/why-we-decided-to-help-maintain-connexion-c9f449877083\n[Blog Zalando]: https://engineering.zalando.com/posts/2016/12/crafting-effective-microservices-in-python.html\n[API guidelines Zalando]: https://opensource.zalando.com/restful-api-guidelines/#api-first\n[Online swagger editor]: https://editor.swagger.io/\n[VS Code plugin]: https://marketplace.visualstudio.com/items?itemName=42Crunch.vscode-openapi\n[Pycharm plugin]: https://plugins.jetbrains.com/plugin/14837-openapi-swagger-editor\n[examples]: https://github.com/spec-first/connexion/blob/main/examples\n[Releases]: https://github.com/spec-first/connexion/releases\n[Architecture]: https://github.com/spec-first/connexion/blob/main/docs/images/architecture.png\n","funding_links":["https://github.com/sponsors/spec-first"],"categories":["Python","后端开发框架及项目","OpenAPI Utilities","APIs \u0026 Serialization","Web APIs"],"sub_categories":["后端项目_其他"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspec-first%2Fconnexion","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspec-first%2Fconnexion","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspec-first%2Fconnexion/lists"}