Skip to content

Yusfuu/FastyAPI

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Logo

FastyAPI

A FastAPI based Stack boilerplate for heavy loads.
Explore the docs »

View Demo . Donations · Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Contributing
  4. Donations
  5. License

About The Project

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.

(back to top)

Built With

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.

(back to top)

Features

  • ✔️ 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

(back to top)

Getting Started

Set of instructions to get started with FastyAPI

Prerequisites

Environment setup

  1. Create the project environment directory
    mkdir project_name
  2. Create the environment
    cd project_name
    python3 -m virtualenv .
  3. Activate the environment
    source bin/activate

Installation

  1. Clone the repo
    git clone https://github.com/achaayb/FastyAPI
  2. Install the dependencies
    cd FastyAPI 
    pip3 install -r requirements.txt
  3. Configure .env to your need
    • better configuration soon
    • please run mongo and redis on your local machine for now

Running and testing

  1. run FastyAPI on gunicorn with uvicorn workers
    gunicorn app:app -w 4 -k uvicorn.workers.UvicornWorker --bind 0.0.0.0:5000
  2. api test
    • navigate to : http://localhost:5000
    • response should be something like this :
      {"data":"","code":"success","message":"FastyAPI live!"}
  3. swaggers docs
  4. websocket test

Minify the boilerplate to your needs

  1. soon

(back to top)

See the open issues for a full list of proposed features (and known issues).

(back to top)

Contributing

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!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

Donations

If this project was useful or you believe its interesting, feel free to donate ❤️

Paypal Link : Paypal.me

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Project Link: https://github.com/achaayb/FastyAPI

(back to top)

About

FastyAPI is a Stack boilerplate optimised for heavy loads.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 84.7%
  • HTML 14.8%
  • Shell 0.5%