Python Daily
2.57K subscribers
1.48K photos
53 videos
2 files
38.9K links
Daily Python News
Question, Tips and Tricks, Best Practices on Python Programming Language
Find more reddit channels over at @r_channels
Download Telegram
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