Just Modern Python

It's all based on standard Python 3.6 type declarations (thanks to Pydantic). No new syntax to learn. Just standard modern Python.

If you need a 2 minute refresher of how to use Python types (even if you don't use FastAPI), check the tutorial section: Python types.

You write standard Python with types:

fromtypingimportList,DictfromdatetimeimportdatefrompydanticimportBaseModel# Declare a variable as an str# and get editor support inside the functiondefmain(user_id:str):returnuser_id# A Pydantic modelclassUser(BaseModel):id:intname:strjoined:date

No compromise with databases, frontends, etc. But easy integration with all of them.

Unlimited "plug-ins"

Or in other way, no need for them, import and use the code you need.

Any integration is designed to be so simple to use (with dependencies) that you can create a "plug-in" for your application in 2 lines of code using the same structure and syntax used for your path operations.

Tested

100% test coverage.

100% type annotated code base.

Used in production applications.

Starlette features

FastAPI is fully compatible with (and based on) Starlette. So, any additional Starlette code you have, will also work.

FastAPI is actually a sub-class of Starlette. So, if you already know or use Starlette, most of the functionality will work the same way.

With FastAPI you get all of Starlette's features (as FastAPI is just Starlette on steroids):