https://github.com/engageintellect/fast-api
A basic hello world with FastAPI
https://github.com/engageintellect/fast-api
Last synced: about 1 year ago
JSON representation
A basic hello world with FastAPI
- Host: GitHub
- URL: https://github.com/engageintellect/fast-api
- Owner: engageintellect
- Created: 2022-10-29T01:19:29.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-02-11T05:53:45.000Z (over 3 years ago)
- Last Synced: 2025-02-06T13:49:22.610Z (over 1 year ago)
- Language: Python
- Size: 12.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Fast API Demo
## Description:
FastAPI framework, high performance, easy to learn, fast to code, ready for production
## The key features are:
- **Fast** --> Very high performance, on par with NodeJS and Go (thanks to Starlette and Pydantic). One of the fastest Python frameworks available.
Fast to code: Increase the speed to develop features by about 200% to 300%.
- **Fewer bugs** --> Reduce about 40% of human (developer) induced errors.
- **Intuitive** --> Great editor support. Completion 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. Fewer bugs.
- **Robust** --> Get production-ready code. With automatic interactive documentation.
- **Standards-based** --> Based on (and fully compatible with) the open standards for APIs: OpenAPI (previously known as Swagger) and JSON Schema.
# Getting Started
1. clone repository
```
git clone
```
2. install dependencies
```
cd fast_api && sudo pip install -r requirements.txt
```
3. run code (dev)
```
uvicorn main:app --reload
```
4. run code (prod)
```
uvicorn main:app --host localhost --port 3000
```
To keep a persistent connection, and to refesh during updates, add the ```--reload``` switch.
```
uvicorn main:app --host localhost --port 3000 --reload
```
4. test endpoints
* [/](http://localhost:3000)
* [/api/info](http://localhost:3000/api/info)
* [/api/releases](http://localhost:3000/api/releases)
* [/api/projects](http://localhost:3000/api/projects)
* [/api/products](http://localhost:3000/api/products)
OR
* ```curl http://localhost:3000```
* ```curl http://localhost:3000/info```
* ```curl http://localhost:3000/releases```
* ```curl http://localhost:3000/projects```
* ```curl http://localhost:3000/products```