A FastAPI based Stack boilerplate for heavy loads.
Explore the docs »
View Demo
.
Donations
·
Report Bug
·
Request Feature
Table of Contents
FastyAPI is a FastAPI based Stack boilerplate designed for large scale workloads and simple developement in mind.
Here's why:
- FastAPI provides such a great developement experience due to its simple structure and the auto generated docs.
- we've improves this further by providing you with a simple design pattern, no subfolders <3
- every Stack element is carefully chosen and tested/optimised against heavy workloads
- boiletplate code for different situations, websocket, crud etc.. yet without bloat.
Our stack is as follows
- Gunicorn is a Python Web Server Gateway Interface (WSGI) HTTP server. It is a pre-fork worker model
- FastAPI is a Web framework for developing RESTful APIs in Python.
- Celery soon + optional
- Flower soon + optional
- AIOredis asyncio Redis client library.
- Motor presents a coroutine-based API for non-blocking access to MongoDB
- MongoDB is a source-available cross-platform document-oriented database program. Classified as a NoSQL database program, MongoDB uses JSON-like documents with optional schemas.
- Docker soon container is a standard unit of software that packages up code and all its dependencies so the application runs quickly and reliably from one computing environment to another.
-
✔️ Fully done
-
⌛ Needs Tweaks
-
[✔️] Auto generated Swagger Documentation
-
[✔️] http input validation
-
[✔️] MongoDB crud with smart returns
-
[✔️⌛] JWT authentication
-
[✔️⌛] WebSocket cross-server private and broadcast
-
WebSocket http protocols implementation (GET/POST/PATCH/DELETE)
-
[⌛] WebSocket json input validation
-
Celery and Flower
-
Unit testing
-
Application and Server health graphs
Set of instructions to get started with FastyAPI
- Python3
- pip3
- venv
pip3 install virtualenv
- CentOS preferably
- MongoDB
- Redis
- Create the project environment directory
mkdir project_name
- Create the environment
cd project_name python3 -m virtualenv .
- Activate the environment
source bin/activate
- Clone the repo
git clone https://github.com/achaayb/FastyAPI
- Install the dependencies
cd FastyAPI pip3 install -r requirements.txt
- Configure .env to your need
- better configuration soon
- please run mongo and redis on your local machine for now
- run FastyAPI on gunicorn with uvicorn workers
gunicorn app:app -w 4 -k uvicorn.workers.UvicornWorker --bind 0.0.0.0:5000
- api test
- navigate to : http://localhost:5000
- response should be something like this :
{"data":"","code":"success","message":"FastyAPI live!"}
- swaggers docs
- navigate to : http://localhost:5000/docs
- websocket test
- username : http://localhost:5000/static/test1.html
- username2 : http://localhost:5000/static/test2.html
- soon
See the open issues for a full list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
If this project was useful or you believe its interesting, feel free to donate ❤️
Paypal Link : Paypal.me
Distributed under the MIT License. See LICENSE.txt
for more information.
Project Link: https://github.com/achaayb/FastyAPI