FastyAPI is a Stack boilerplate optimised for heavy loads.

Overview

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 development in mind.

Here's why:

  • FastAPI provides such a great development experience due to its simple structure and auto-generated docs.
  • we've improved this further by providing you with a simple design pattern, no subfolders ❤️
  • every Stack element is carefully chosen and tested/optimized against heavy workloads
  • boilerplate code for different situations, WebSocket, crud, etc.. yet without the 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
    • the 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 makes 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 it's 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)

You might also like...

Custom FastAPI boilerplate with Piccolo ORM, JWT auth, config.ini and Hashicorp Vault support

FastAPI boilerplate Work in progress! Another FastAPI Boilerplate with: Piccolo ORM and Piccolo Admin Ready JWT authentication (including DB schema an

Sep 7, 2022

Test your changes for issues before committing them - Python Boilerplate code

Commit-tester Use this boilerplate code inside your repo to test it before committing or pushing changes. Install "Make" # For windows (https://chocol

Aug 29, 2022

Flask-Vuejs3 Boilerplate

FLASK RESTX + VUJS FULLSTACK BOILER-PLATE WITH JWT Building and running the api Note: make sure you have pip and virtualenv installed. Initial install

Aug 25, 2022

Fast-api production ready boilerplate

Fast-api-Boilerplate FastAPI framework, high performance, easy to learn, fast to code, ready for production ENVIRONMENT For each Type of environment C

Sep 23, 2022

Boilerplate for GPU-Accelerated TensorFlow and PyTorch code on M1 Macbook

Boilerplate for GPU-Accelerated TensorFlow and PyTorch code on M1 Macbook

What is this repo? Quick start boilerplate for GPU acceleration working with Tensorflow and PyTorch on Macbook Air M1 (ARM-64 architecture) Uses Metal

Aug 21, 2022

A collection of opinionated scripts and configuration files that allows developers and researchers to easily start a PowerAPI monitoring stack.

PowerAPI Quickstart PowerAPI quickstart is a collection of opinionated scripts and configuration files that allows developers and researchers to easil

Jun 13, 2022

A full-stack blockchain and cryptocurrency app with Python and React!

A full-stack blockchain and cryptocurrency app with Python and React!

Fichain | A Blockchain & Cryptocurrency App Background 📖 Understanding blockchain isn't easy. At least it wasn't for me. I had to go through number o

Aug 28, 2022

Python scripts to visualise EKO CSV data, and stack irradiance plots to compare peaks and troughs

NERC Scripts, Personal Repo User warnings, potential points of improvement Visualise script uses psycopg to connect to postgres, pandas produces warni

Aug 30, 2022

Simplify editing modifiers stack through modal operators and abstraction layers.

EMTK Extended Modifiers Tool Kit Description EMTK is a Blender addon that uses EMTK to simplify editing modifiers stack through modal operators and ab

Jun 1, 2022
Owner
Ali Chaayb
Python | Flask/FastAPI, Scaling and cybersecurity enthusiast.
Ali Chaayb
A quick and dirty aggregation of all ~2500 heavy-rail train stations in Canada

canada-train-station-list A quick and dirty aggregation of all ~2500 heavy-rail train stations in Canada Purpose In 2022-06, https://railway-stations.

null 1 Jun 16, 2022
Coreference resolution for English, French, German and Polish, optimised for limited training data and easily extensible for further languages

Coreferee Author: Richard Paul Hudson, Explosion AI 1. Introduction 1.1 The basic idea 1.2 Getting started 1.2.1 English 1.2.2 French 1.2.3 German 1.2

Explosion 54 Oct 1, 2022
Created an optimised pipeline to provide accurate data for analysis, then used snowsight (provided by Snowflake) to create a dashboard.

youtube_data_analysis AIM The idea was to create an end-to-end automated data pipeline that can be used for analysis and answer common questions relat

NUPUR 10 Aug 23, 2022
ELT pipeline that extracts Reddit data, loads into s3 bucket, and transports into Redshift before being transformed via dbt and visualized in a PowerBI dashboard

Reddit ETL Pipeline A data pipeline to extract Reddit data from r/dataengineering. Output is a PowerBI dashboard, which provides an overview of topics

null 1 Apr 3, 2022
This script loads desired stock price training data, trains an XGBoost Regressor for Time Series Forecasting (allowing fine-tuning) and downloads the model to be used for prediction tasks

This script loads desired stock price training data, trains an XGBoost Regressor for Time Series Forecasting (allowing fine-tuning) and downloads the model to be used for prediction tasks. Specifically, it attempts to predict the following day's adjusted close price based on former days' adjusted close prices.

Lluís Salvat Niell 2 Jul 7, 2022
Loads CSV records from file, and maps them to FHIR resources.

CSV to FHIR Loads CSV records from file, and maps them to FHIR resources. Pre-requisites Python >= 3.9 for application development Quickstart CLI OS X

Linux For Health 7 Aug 20, 2022
Boilerplate Django Blog for production deployments! (COMING SOON!)

CFE Django Blog THIS IS COMING SOON This is boilerplate code that you can use to learn how to bring Django into production. TLDR; This is definitely c

Coding For Entrepreneurs 22 Sep 15, 2022
Generate boilerplate code for the Spigot API.

Generate boilerplate code for the Spigot API. Usage: Download the latest release on Releases. Extract the zip folder. Open a CLI and cd to the extract

Turp 1 Apr 25, 2022
This is a boilerplate for a Web Application using Django for backend and React for frontend. This is based on the testdrive.io tutorial.

DJANGO REACT APPLICATION This is a boilerplate for an application using Django for the backend and React for the frontend of a web application. This d

Ryan Nicholas 1 May 25, 2022
A boilerplate repo for a dockerized application running on Python 3.9 FastAPI with SQLAlchemy.

fastapi-sqlalchemy-boilerplate A boilerplate repo for a dockerized application running on Python 3.9 FastAPI with SQLAlchemy. Includes a sample model.

Chris 2 Jun 2, 2022