Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • A awesome-python
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 13
    • Issues 13
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 317
    • Merge requests 317
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Vinta Chen
  • awesome-python
  • Merge requests
  • !1209

Add FastAPI to web frameworks

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Administrator requested to merge github/fork/tiangolo/fastapi into master Dec 22, 2018
  • Overview 0
  • Commits 2
  • Pipelines 0
  • Changes 1

Created by: tiangolo

What is this project?

FastAPI is a modern, fast (high-performance), web framework for building APIs with Python 3.6+.

Documentation: https://fastapi.tiangolo.com

Source Code: https://github.com/tiangolo/fastapi

The key features are:

  • Fast: Very high performance, on par with NodeJS and Go (thanks to Starlette and Pydantic).

  • Fast to code: Increase the speed to develop features by about 200% to 300% *.

  • Less bugs: Reduce about 40% of human (developer) induced errors. *

  • Intuitive: Great editor support. Completion everywhere. Less time debugging.

  • Easy: Designed to be easy to use and learn. Less time reading docs.

  • Short: Minimize code duplication. Multiple features from each parameter declaration. Less bugs.

  • Robust: Get production-ready code. With automatic interactive documentation.

  • Standards-based: Based on (and fully compatible with) the open standards for APIs: OpenAPI and JSON Schema.

* estimation based on tests on an internal development team, building production applications.

Why is it awesome?

Apart from the features above, the fact that with simple, standard Python 3.6+ type declarations, you get:

  • Great editor support (completion everywhere and type checks).
  • Data conversion (serialization, parsing).
  • Data validation.
  • Automatic annotations and documentation using OpenAPI and JSON Schema.
  • 2 automatic interactive API documentation user interfaces.

A block of code is worth a thousand words:

from fastapi import FastAPI

app = FastAPI()


@app.get("/")
def read_root():
    return {"Hello": "World"}


@app.get("/items/{item_id}")
def read_item(item_id: int, q: str = None):
    return {"item_id": item_id, "q": q}

And you get this, "for free":

Swagger UI

And the coding experience is great, with completion and type checks everywhere:

editor support

--

Anyone who agrees with this pull request could vote for it by adding a 👍 to it, and usually, the maintainer will merge it when votes reach 20.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/tiangolo/fastapi