https://github.com/sachnaror/python-fastapi-framework
FastAPI is a modern, high-performance web framework for building APIs with Python based on standard type hints
https://github.com/sachnaror/python-fastapi-framework
api-rest fastapi python3
Last synced: about 2 months ago
JSON representation
FastAPI is a modern, high-performance web framework for building APIs with Python based on standard type hints
- Host: GitHub
- URL: https://github.com/sachnaror/python-fastapi-framework
- Owner: sachnaror
- Created: 2023-12-25T01:13:53.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-12-25T16:30:08.000Z (over 2 years ago)
- Last Synced: 2025-05-31T19:39:18.429Z (about 1 year ago)
- Topics: api-rest, fastapi, python3
- Language: Python
- Homepage:
- Size: 12.5 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Okay, so, typing whatever is coming to my mind quickly about FastAPI:
---------------------------------------------------------------------
Creating APIs, or **application programming interfaces**, is an important part of making software accessible to a broad range of users. A quick run through the main concepts of **FastAPI** and how to use it to quickly create web APIs that implement best practices by default.
By the end of it, i will have production-ready web APIs, and better understanding to go deeper and learn more for your specific use cases.
**This quick FastAPI practice repo will ensure how to**:
* Use **path parameters** to get a unique URL path per item
* Receive JSON data in your requests using **pydantic**
* Use API best practices, including **validation**, **serialization**, and **documentation**
* Will continue exploring more about FastAPI for **your use cases**
It contains a careful selection of fragments from the official documentation, avoiding getting lost in technical details while helping you get up to speed as fast as possible.
To get the most out of it, i first read through the basics of "What HTTP is and how it works", "What JSON is", and "Python type hints". You will also benefit from using a virtual environment, as is the case for any Python project.
So, What Is FastAPI?
-----------------------------------------------------
FastAPI is a modern, high-performance web framework for building APIs with Python based on standard type hints. It has the following key features:
* **Fast to run**: It offers very high performance, on par with **NodeJS** and **Go**, thanks to [Starlette] and [pydantic]
* **Fast to code**: It allows for significant increases in development speed.
* **Reduced number of bugs**: It reduces the possibility for human-induced errors.
* **Intuitive**: It offers great editor support, with completion everywhere and less time debugging.
* **Straightforward**: It’s designed to be uncomplicated to use and learn, so you can spend less time reading documentation.
* **Short**: It minimizes code duplication.
* **Robust**: It provides production-ready code with automatic interactive documentation.
* **Standards-based**: It’s based on the open standards for APIs, [OpenAPI](https://github.com/OAI/OpenAPI-Specification) and [JSON Schema](https://json-schema.org/).
The framework is designed to optimize our development experience so that we all can write simple code to build production-ready APIs with best practices by default.
Install FastAPI
----------------------------------------------------
As with any other Python project, it would be best to start by creating a virtual environment.
The first step is to install FastAPI and [Uvicorn](https://www.uvicorn.org/#introduction) using [`pip`]:
...
http://127.0.0.1:8000/docs
.
