Introducing FastAPI
## FastAPI is a modern, fast (high-performance), web framework for building APIs with Python 3.6+ based on standard Python type hints.
**Documentation**: [https://fastapi.tiangolo.com](https://fastapi.tiangolo.com)
**Source Code**: [https://github.com/tiangolo/fastapi](https://github.com/tiangolo/fastapi)
## Key Features
* **Fast**: Very high performance, on par with **NodeJS** and **Go** (thanks to Starlette and Pydantic). [One of the fastest Python frameworks available](https://fastapi.tiangolo.com/#performance).
* **Fast to code**: Increase the speed to develop new features.
* **Less bugs**: Reduce a high amount of human (developer) induced errors.
* **Intuitive**: Great editor support. Completion (also known as auto-complete, autocompletion, IntelliSense) 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](https://github.com/OAI/OpenAPI-Specification) (previously known as Swagger) and [JSON Schema](http://json-schema.org/).
## Installation
$ pip install fastapi
You will also need an ASGI server, for production such as [Uvicorn](http://www.uvicorn.org).
$ pip install uvicorn
## Example
## Create it
* Create a file `main.py` with:
​
from fastapi import FastAPI
app = FastAPI()
@app.get("/")
/r/Python
https://redd.it/b0zxa9
## FastAPI is a modern, fast (high-performance), web framework for building APIs with Python 3.6+ based on standard Python type hints.
**Documentation**: [https://fastapi.tiangolo.com](https://fastapi.tiangolo.com)
**Source Code**: [https://github.com/tiangolo/fastapi](https://github.com/tiangolo/fastapi)
## Key Features
* **Fast**: Very high performance, on par with **NodeJS** and **Go** (thanks to Starlette and Pydantic). [One of the fastest Python frameworks available](https://fastapi.tiangolo.com/#performance).
* **Fast to code**: Increase the speed to develop new features.
* **Less bugs**: Reduce a high amount of human (developer) induced errors.
* **Intuitive**: Great editor support. Completion (also known as auto-complete, autocompletion, IntelliSense) 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](https://github.com/OAI/OpenAPI-Specification) (previously known as Swagger) and [JSON Schema](http://json-schema.org/).
## Installation
$ pip install fastapi
You will also need an ASGI server, for production such as [Uvicorn](http://www.uvicorn.org).
$ pip install uvicorn
## Example
## Create it
* Create a file `main.py` with:
​
from fastapi import FastAPI
app = FastAPI()
@app.get("/")
/r/Python
https://redd.it/b0zxa9
GitHub
GitHub - fastapi/fastapi: FastAPI framework, high performance, easy to learn, fast to code, ready for production
FastAPI framework, high performance, easy to learn, fast to code, ready for production - fastapi/fastapi
Optimizing our longest nightly job — a story of sessions, complexity, and toilets #SQLAlchemy #Performance
https://medium.com/alan/blog-post-optimizing-our-longest-nightly-job-a-story-of-sessions-complexity-and-toilets-750ef4dfaa51
/r/Python
https://redd.it/106fxa6
https://medium.com/alan/blog-post-optimizing-our-longest-nightly-job-a-story-of-sessions-complexity-and-toilets-750ef4dfaa51
/r/Python
https://redd.it/106fxa6
Medium
Optimizing our longest nightly job — a story of sessions, complexity, and toilets
Last year, James (the founding father of the Alan claim engine) shared some details about how the engine works, its requirements and…