Python OpenAPI

Open-source Python projects categorized as OpenAPI

Top 23 Python OpenAPI Projects

  • fastapi

    FastAPI framework, high performance, easy to learn, fast to code, ready for production

    Project mention: Help wanted: support for PR | /r/FastAPI | 2023-06-06

    Hey guys! Can you support my PR fixing nested lifespans ignoring to merge it faster?

  • full-stack-fastapi-postgresql

    Full stack, modern web application generator. Using FastAPI, PostgreSQL as database, Docker, automatic HTTPS and more.

    Project mention: Is there any open source project that uses FasAPI? | /r/FastAPI | 2023-04-25
  • Sonar

    Write Clean Python Code. Always.. Sonar helps you commit clean code every time. With over 225 unique rules to find Python bugs, code smells & vulnerabilities, Sonar finds the issues while you focus on the work.

  • django-ninja

    💨 Fast, Async-ready, Openapi, type hints based framework for building APIs

    Project mention: Built This GPT-Powered Document Search and Question Answering App with Django | /r/django | 2023-04-20

    Subscribe to this issue :D

  • connexion

    Swagger/OpenAPI First framework for Python on top of Flask with automatic endpoint validation & OAuth2 support

    Project mention: Ask HN: Why is there no specification for Command Line Interfaces? | news.ycombinator.com | 2023-02-27

    What's the use case? I was thinking about this exact issue because my product ships several CLI tools, but I wasn't convinced it would be worth the effort.

    An OpenAPI specification describes an HTTP interface, and I see it as useful because it makes it easier to write code in language-of-choice to generate HTTP requests (by generating client libraries from the OpenAPI spec).

    For a CLI, the interface is the command-line. Usually people type these commands, or they end up in bash scripts, or sometimes they get called from programming language of choice by shelling out to the CLI. So I could see a use case for a CLI spec, which would make it easier to generate client libraries (which would shell out to the CLI)... but it seems a little niche.

    Or maybe, as input to a documentation tool (like Swagger docs). I would imagine if you're using a CLI library like Python's Click, most of that data is already there. Click Parameters documentation: https://click.palletsprojects.com/en/8.1.x/parameters/

    Or maybe, you could start from the spec and then generate code which enforces it. So any changes pass through the spec, which would make it easy to write code (server and client-side) / documentation / changelogs. Some projects like this: Guardrail (Scala) https://github.com/guardrail-dev/guardrail , and Connexion (Python) https://github.com/spec-first/connexion .

    But without this ecosystem of tooling, documenting your CLI in a specification didn't really seem worth the effort. Of course, that's a bootstrapping problem.

  • flasgger

    Easy OpenAPI specs and Swagger UI for your Flask API

    Project mention: Faster time-to-market with API-first | dev.to | 2022-10-25

    When it comes to Flask, in particular, there’re plenty of choices. And in fairness, not all frameworks are created equal. You’ve got flasgger, restx (successor of flask-restplus), flask-RESTful, and flask-smorest, to mention a few. How do you choose among those???

  • drf-yasg

    Automated generation of real Swagger/OpenAPI 2.0 schemas from Django REST Framework code.

    Project mention: Swagger for Django api | /r/django | 2023-04-23

    I believe drf-yasg what you need. You can create a schema manually and define request and response types for your small API.

  • uvicorn-gunicorn-fastapi-docker

    Docker image with Uvicorn managed by Gunicorn for high-performance FastAPI web applications in Python with performance auto-tuning. Optionally with Alpine Linux.

    Project mention: Fastapi or Starlite for new project? | /r/Python | 2023-02-27

    You can use gunicorn to mange uvicorn processes, eg:https://github.com/tiangolo/uvicorn-gunicorn-fastapi-docker

  • InfluxDB

    Access the most powerful time series database as a service. Ingest, store, & analyze all types of time series data in a fully-managed, purpose-built database. Keep data forever with low-cost storage and superior data compression.

  • litestar

    Light, Flexible and Extensible ASGI API framework | Effortlessly Build Performant APIs

    Project mention: keeps old routes after changing, cache problem? | /r/FastAPI | 2023-05-22

    I think it's the uvicorn thing, because I know tried with https://litestar.dev/ and the same thing happening.

  • best-of-web-python

    🏆 A ranked list of awesome python libraries for web development. Updated weekly.

  • Schemathesis

    Guarantee flawless API functionality with thorough, high-quality test scenarios generated from your API specification.

    Project mention: OpenAPI v4 Proposal | news.ycombinator.com | 2023-05-31

    I'm sorry, but you have completely misunderstood the purpose of Open API.

    It is not a specification to define your business logic classes and objects -- either client or server side. Its goal is to define the interface of an API, and to provide a single source of truth that requests and responses can be validated against. It contains everything you need to know to make requests to an API; code generation is nice to have (and I use it myself, but mainly on the server side, for routing and validation), but not something required or expected from OpenAPI

    For what it's worth, my personal preferred workflow to build an API is as follows:

    1. Build the OpenAPI spec first. A smaller spec could easily be done by hand, but I prefer using a design tool like Stoplight [0]; it has the best Web-based OpenAPI (and JSON Schema) editor I have encountered, and integrates with git nearly flawlessly.

    2. Use an automated tool to generate the API code implementation. Again, a static generation tool such as datamodel-code-generator [1] (which generates Pydantic models) would suffice, but for Python I prefer the dynamic request routing and validation provided by pyapi-server [2].

    3. Finally, I use automated testing tools such as schemathesis [3] to test the implementation against the specification.

    [0] https://stoplight.io/

    [1] https://koxudaxi.github.io/datamodel-code-generator/

    [2] https://pyapi-server.readthedocs.io

    [3] https://schemathesis.readthedocs.io

  • datamodel-code-generator

    Pydantic model and dataclasses.dataclass generator for easy conversion of JSON, OpenAPI, JSON Schema, and YAML data sources.

    Project mention: OpenAPI v4 Proposal | news.ycombinator.com | 2023-05-31

    I'm sorry, but you have completely misunderstood the purpose of Open API.

    It is not a specification to define your business logic classes and objects -- either client or server side. Its goal is to define the interface of an API, and to provide a single source of truth that requests and responses can be validated against. It contains everything you need to know to make requests to an API; code generation is nice to have (and I use it myself, but mainly on the server side, for routing and validation), but not something required or expected from OpenAPI

    For what it's worth, my personal preferred workflow to build an API is as follows:

    1. Build the OpenAPI spec first. A smaller spec could easily be done by hand, but I prefer using a design tool like Stoplight [0]; it has the best Web-based OpenAPI (and JSON Schema) editor I have encountered, and integrates with git nearly flawlessly.

    2. Use an automated tool to generate the API code implementation. Again, a static generation tool such as datamodel-code-generator [1] (which generates Pydantic models) would suffice, but for Python I prefer the dynamic request routing and validation provided by pyapi-server [2].

    3. Finally, I use automated testing tools such as schemathesis [3] to test the implementation against the specification.

    [0] https://stoplight.io/

    [1] https://koxudaxi.github.io/datamodel-code-generator/

    [2] https://pyapi-server.readthedocs.io

    [3] https://schemathesis.readthedocs.io

  • fastapi-crudrouter

    A dynamic FastAPI router that automatically creates CRUD routes for your models

    Project mention: why when I search for Python jobs I find alot! but when I search for Django (the most used Python framework ) I get few compared to spring or nodejs ? | /r/Python | 2022-08-21

    FastAPI does have an equivalent. Something like this? https://github.com/awtkns/fastapi-crudrouter

  • apispec

    A pluggable API specification generator. Currently supports the OpenAPI Specification (f.k.a. the Swagger specification)..

  • apiflask

    A lightweight Python web API framework.

    Project mention: what popular wabsites uses Flask and Django and what popular companies uses Python? | /r/learnpython | 2022-06-11

    *some options that were mentioned in the thread I linked to include - Starlite (made to bypass perceived shortcomings of FastAPI) - Flama (Starlette w/ Marshmellow instead of Pydantic) - APIFlask (Flask w/ Pydantic) - Django Ninja - Quart-Schema

  • openapi-python-client

    Generate modern Python clients from OpenAPI

    Project mention: Microsoft Kiota: CLI for generating an API client to call OpenAPI-described API | news.ycombinator.com | 2023-04-11

    Has anyone tried Kiota, specifically the Python support? How does it compare to https://github.com/openapi-generators/openapi-python-client ?

  • bravado

    Bravado is a python client library for Swagger 2.0 services

    Project mention: What Dynamic REST Clients do you know that support OpenAPI | /r/Python | 2022-09-09
  • flask-smorest

    DB agnostic framework to build auto-documented REST APIs with Flask and marshmallow

    Project mention: Faster time-to-market with API-first | dev.to | 2022-10-25

    When it comes to Flask, in particular, there’re plenty of choices. And in fairness, not all frameworks are created equal. You’ve got flasgger, restx (successor of flask-restplus), flask-RESTful, and flask-smorest, to mention a few. How do you choose among those???

  • PublicDataReader

    공공 데이터 조회를 위한 오픈소스 파이썬 라이브러리

    Project mention: (Korean) PublicDataReader - Collect data easily | /r/Python | 2022-07-21

    GitHub:https://github.com/WooilJeong/PublicDataReader

  • safrs

    SqlAlchemy Flask-Restful Swagger Json:API OpenAPI

  • pyswagger

    An OpenAPI (fka Swagger) client & converter in python, which is type-safe, dynamic, spec-compliant.

    Project mention: Budozer not find swagger-client that satisfies | /r/kivy | 2023-02-02

    Yes exactly, adding a package to requirements is similar to doing a pip install on your regular Python. Look at pyswagger's requirements.txt and add them:

  • APIFuzzer

    Fuzz test your application using your OpenAPI or Swagger API definition without coding

  • spectree

    API spec validator and OpenAPI document generator for Python web frameworks.

    Project mention: Flask is Great! | /r/flask | 2023-02-04

    See Spectree for 1-4 for Flask, Flask also allows async if not see Quart and Quart-Schema. 6. It is not faster than Flask for production apps - only micro benchmarks.

  • fastapi-azure-auth

    Easy and secure implementation of Azure AD for your FastAPI APIs 🔒 B2C, single- and multi-tenant support.

    Project mention: Implement AzureAD in 10 minutes with FastAPI-Azure-Auth - full tutorial in the documentation | /r/FastAPI | 2022-10-24
  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

NOTE: The open source projects on this list are ordered by number of github stars. The number of mentions indicates repo mentiontions in the last 12 Months or since we started tracking (Dec 2020). The latest post mention was on 2023-06-06.

Python OpenAPI related posts

Index

What are some of the best open-source OpenAPI projects in Python? This list will help you:

Project Stars
1 fastapi 58,684
2 full-stack-fastapi-postgresql 12,112
3 django-ninja 4,455
4 connexion 4,247
5 flasgger 3,284
6 drf-yasg 3,104
7 uvicorn-gunicorn-fastapi-docker 2,244
8 litestar 2,180
9 best-of-web-python 1,914
10 Schemathesis 1,720
11 datamodel-code-generator 1,630
12 fastapi-crudrouter 1,114
13 apispec 1,035
14 apiflask 788
15 openapi-python-client 722
16 bravado 591
17 flask-smorest 549
18 PublicDataReader 385
19 safrs 377
20 pyswagger 371
21 APIFuzzer 293
22 spectree 275
23 fastapi-azure-auth 264
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com