- python fast web framework
- ASGI (Asynchronous Server Gateway Interface)
- Rest API
Pros
- high performance
- supports asynchronous (concurrency)
- inbuilt documentation support
Cons
- Lack security System
- small community
- Python virtualenv , pakage managing
$ brew install pipenv
- install python llibrary
$ pipenv install
- Python 3.7+
- MacOS
$ pip install fastapi
- ASGI install
$ pip install "uvicorn[standard]
$ cd app
- using pipenv
pipenv run uvicorn main:app --reload
- using pip
$ uvicorn main:app --reload
-
reload
: make the server restart after code chages.
Swagger Docs
- github repo
$ docker pull ghcr.io/yeov/fastapi-tutorial:1.1
- docker hub
$ docker pull tjdduq97/fastapi:1.0