Lazy package to start your project using FastAPI✨

Overview

Fastapi-lazy 🦥

lazy

PyPI version Downloads

Utilities that you use in various projects made in FastAPI.


Source Code: https://github.com/yezz123/fastapi-lazy

Install the project: pip install fastapi-lazy


Features 🎉

  • Use the data contained in the JWT
  • Use the username contained in the JWT and fetch data.
  • Create User Models based on Pydantic.
  • Multi Database Support:
    • Creates the dependency to be used to connect to the Postgresql.
    • Creates the dependency to be used to connect to the MongoDB.
    • Create the dependency to be used to connect to the SQlite using SQLAlchemy.
  • Support Redis Cache:
    • Creates a pickle of the object passed as a parameter and saves it in the Redis which is also passed as a parameter.
    • Read the pickle of the object saved in RedisDB and return it as Python object.
  • Support UUID generator:
    • Create a custom UUID4 using the current timestamp.
    • Create a JWT token creator & verifier.
  • Create a simple Password hash using hashlib.
  • Create an Email Validator.

Development 🚧

You should create a virtual environment and activate it:

python -m venv venv/
source venv/bin/activate

And then install the development dependencies:

pip install -r requirements.dev.txt

Format the code 💅

Execute the following command to apply pre-commit formatting:

make lint

License 🍻

This project is licensed under the terms of the MIT license.

You might also like...
Sample project showing reliable data ingestion application using FastAPI and dramatiq
Sample project showing reliable data ingestion application using FastAPI and dramatiq

Create and deploy a reliable data ingestion service with FastAPI, SQLModel and Dramatiq This is the source code for the data ingestion service explain

A FastAPI WebSocket application that makes use of ncellapp package by @hemantapkh

ncellFastAPI author: @awebisam Used FastAPI to create WS application. Ncellapp module by @hemantapkh NOTE: Not following best practices and, needs ref

Opinionated authorization package for FastAPI

FastAPI Authorization Installation pip install fastapi-authorization Usage Currently, there are two models available: RBAC: Role-based Access Control

Sample FastAPI project that uses async SQLAlchemy, SQLModel, Postgres, Alembic, and Docker.

FastAPI + SQLModel + Alembic Sample FastAPI project that uses async SQLAlchemy, SQLModel, Postgres, Alembic, and Docker. Want to learn how to build th

 FastAPI Project Template
FastAPI Project Template

The base to start an openapi project featuring: SQLModel, Typer, FastAPI, JWT Token Auth, Interactive Shell, Management Commands.

FastAPI Auth Starter Project

This is a template for FastAPI that comes with authentication preconfigured.

Docker Sample Project - FastAPI + NGINX

Docker Sample Project - FastAPI + NGINX Run FastAPI and Nginx using Docker container Installation Make sure Docker is installed on your local machine

A dynamic FastAPI router that automatically creates CRUD routes for your models
A dynamic FastAPI router that automatically creates CRUD routes for your models

⚡ Create CRUD routes with lighting speed ⚡ A dynamic FastAPI router that automatically creates CRUD routes for your models

Easily integrate socket.io with your FastAPI app 🚀

fastapi-socketio Easly integrate socket.io with your FastAPI app. Installation Install this plugin using pip: $ pip install fastapi-socketio Usage To

Comments
  • Provide More Config: Add Crud for MongoDB & Authentication ✨

    Provide More Config: Add Crud for MongoDB & Authentication ✨

    • Provide a Token Creator for login after adding a new package passlib.
    • Add A simple Crud file for MongoDB Provider.
      • Soon will be added for Postgresql Provider, & SQLite Provider.
    documentation enhancement Medium 
    opened by yezz123 2
  • Bump aioredis from 2.0.0 to 2.0.1

    Bump aioredis from 2.0.0 to 2.0.1

    Bumps aioredis from 2.0.0 to 2.0.1.

    Release notes

    Sourced from aioredis's releases.

    v2.0.1

    Version v2.0.1

    Features

    • Added Python 3.10 to CI & Updated the Docs (see #1160)
    • Enable mypy in CI (see #1101)
    • Synchronized reading the responses from a connection (see #1106)

    Fixes

    • Remove del from Redis (Fixes #1115) (see #1227)
    • fix socket.error raises (see #1129)
    • Fix buffer is closed error when using PythonParser class (see #1213)
    Changelog

    Sourced from aioredis's changelog.

    2.0.1 - (2021-12-20)

    Features

    • Added Python 3.10 to CI & Updated the Docs (see #1160)
    • Enable mypy in CI (see #1101)
    • Synchronized reading the responses from a connection (see #1106)

    Fixes

    • Remove del from Redis (Fixes #1115) (see #1227)
    • fix socket.error raises (see #1129)
    • Fix buffer is closed error when using PythonParser class (see #1213)
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    Extra Small dependencies 
    opened by dependabot[bot] 1
  • Add DB host and port to mongo DB connection string

    Add DB host and port to mongo DB connection string

    In the mongo.py file the link uses mongo as host and 27017 as a port, in some cases, user might want to use a different host and port, so these fields should be modifiable ? Maybe use os.environ.get('MONOGO_HOST','some-default-value') ?

    question 
    opened by Aymane11 1
Releases(1.2.6)
  • 1.2.6(Nov 21, 2021)

    What's Changed

    • Chore: Add FastAPI To Trove by @yezz123 in https://github.com/yezz123/fastapi-lazy/pull/22
    • Bump From 1.2.5 to 1.2.6 🌟 by @yezz123 in https://github.com/yezz123/fastapi-lazy/pull/23

    Full Changelog: https://github.com/yezz123/fastapi-lazy/compare/1.2.5...1.2.6

    Source code(tar.gz)
    Source code(zip)
  • 1.2.5(Nov 7, 2021)

    What's Changed

    • chore: Support GraphQL ✨ by @yezz123 in https://github.com/yezz123/fastapi-lazy/pull/20
    • Bump from 1.2.4 to 1.2.5 ✨ by @yezz123 in https://github.com/yezz123/fastapi-lazy/pull/21

    Full Changelog: https://github.com/yezz123/fastapi-lazy/compare/1.2.4...1.2.5

    Source code(tar.gz)
    Source code(zip)
  • 1.2.4(Oct 17, 2021)

    What's Changed

    • Bump Version to 1.2.4 ✨ by @yezz123 in https://github.com/yezz123/fastapi-lazy/pull/19

    Full Changelog: https://github.com/yezz123/fastapi-lazy/compare/1.2.3...1.2.4

    Source code(tar.gz)
    Source code(zip)
  • 1.2.3(Oct 9, 2021)

    1.2.3

    • Provide a Token Creator for login after adding a new package passlib.
    • Add A simple Crud file for MongoDB Provider.
      • Soon will be added for Postgresql Provider, & SQLite Provider.

    What's Changed

    • Provide More Config: Add Crud for MongoDB & Authentication ✨ by @yezz123 in https://github.com/yezz123/fastapi-lazy/pull/16
    • Change token to token_provider ✨ by @yezz123 in https://github.com/yezz123/fastapi-lazy/pull/17
    • Bump to 1.2.3 by @yezz123 in https://github.com/yezz123/fastapi-lazy/pull/18

    Full Changelog: https://github.com/yezz123/fastapi-lazy/compare/1.2.2...1.2.3

    Source code(tar.gz)
    Source code(zip)
  • 1.2.2(Oct 3, 2021)

  • 1.2.1(Sep 30, 2021)

    Features 🎉

    • Use the data contained in the JWT
    • Use the username contained in the JWT and fetch data.
    • Create User Models based on Pydantic.
    • Multi Database Support:
      • Creates the dependency to be used to connect to the Postgresql.
      • Creates the dependency to be used to connect to MongoDB.
      • Create the dependency to be used to connect to the SQLite using SQLAlchemy.
    • Support Redis Cache:
      • Creates a pickle of the object passed as a parameter and saves it in the Redis which is also passed as a parameter.
      • Read the pickle of the object saved in RedisDB and return it as a Python object.
    • Support UUID generator:
      • Create a custom UUID4 using the current timestamp.
      • Create a JWT token creator & verifier.
    Source code(tar.gz)
    Source code(zip)
  • 1.1.0(Sep 30, 2021)

  • 0.0.1(Sep 30, 2021)

    Features 🎉

    • Use the data contained in the JWT
    • Use the username contained in the JWT and fetch data.
    • Multi Database Support:
      • Creates the dependency to be used to connect to the Postgresql.
      • Creates the dependency to be used to connect to MongoDB.
    • Support Redis Cache:
      • Creates a pickle of the object passed as a parameter and saves it in the Redis which is also passed as a parameter.
      • Read the pickle of the object saved in RedisDB and return it as a Python object.
    • Support UUID generator:
      • Create a custom UUID4 using the current timestamp.
    Source code(tar.gz)
    Source code(zip)
Owner
Yasser Tahiri
API Ninja / Backend Developer who speaks @python. Creator of @BnademOverflow. I love Open Source & Ancient Greece.
Yasser Tahiri
Easy and secure implementation of Azure AD for your FastAPI APIs 🔒

FastAPI-Azure-auth Azure AD Authentication for FastAPI apps made easy. 🚀 Description FastAPI is a modern, fast (high-performance), web framework for

Intility 216 Dec 27, 2022
A rate limiter for Starlette and FastAPI

SlowApi A rate limiting library for Starlette and FastAPI adapted from flask-limiter. Note: this is alpha quality code still, the API may change, and

Laurent Savaete 562 Jan 01, 2023
Easily integrate socket.io with your FastAPI app 🚀

fastapi-socketio Easly integrate socket.io with your FastAPI app. Installation Install this plugin using pip: $ pip install fastapi-socketio Usage To

Srdjan Stankovic 210 Dec 23, 2022
An alternative implement of Imjad API | Imjad API 的开源替代

HibiAPI An alternative implement of Imjad API. Imjad API 的开源替代. 前言 由于Imjad API这是什么?使用人数过多, 致使调用超出限制, 所以本人希望提供一个开源替代来供社区进行自由的部署和使用, 从而减轻一部分该API的使用压力 优势

Mix Technology 450 Dec 29, 2022
MQTT FastAPI Wrapper With Python

mqtt-fastapi-wrapper Quick start Create mosquitto.conf with the following content: ➜ /tmp cat mosquitto.conf persistence false allow_anonymous true

Vitalii Kulanov 3 May 09, 2022
Voucher FastAPI

Voucher-API Requirement Docker Installed on system Libraries Pandas Psycopg2 FastAPI PyArrow Pydantic Uvicorn How to run Download the repo on your sys

Hassan Munir 1 Jan 26, 2022
FastAPI backend for Repost

Repost FastAPI This is the FastAPI implementation of the Repost API. Installation Python 3 must be installed and accessible through the use of a termi

PC 7 Jun 15, 2021
Simple FastAPI Example : Blog API using FastAPI : Beginner Friendly

fastapi_blog FastAPI : Simple Blog API with CRUD operation Steps to run the project: git clone https://github.com/mrAvi07/fastapi_blog.git cd fastapi-

Avinash Alanjkar 1 Oct 08, 2022
cookiecutter template for web API with python

Python project template for Web API with cookiecutter What's this This provides the project template including minimum test/lint/typechecking package

Hitoshi Manabe 4 Jan 28, 2021
FastAPI Server Session is a dependency-based extension for FastAPI that adds support for server-sided session management

FastAPI Server-sided Session FastAPI Server Session is a dependency-based extension for FastAPI that adds support for server-sided session management.

DevGuyAhnaf 5 Dec 23, 2022
Opentracing support for Starlette and FastApi

Starlette-OpenTracing OpenTracing support for Starlette and FastApi. Inspired by: Flask-OpenTracing OpenTracing implementations exist for major distri

Rene Dohmen 63 Dec 30, 2022
SQLAlchemy Admin for Starlette/FastAPI

SQLAlchemy Admin for Starlette/FastAPI SQLAdmin is a flexible Admin interface for SQLAlchemy models. Main features include: SQLAlchemy sync/async engi

Amin Alaee 683 Jan 03, 2023
CURSO PROMETHEUS E GRAFANA: Observability in a real world

Curso de monitoração com o Prometheus Esse curso ensina como usar o Prometheus como uma ferramenta integrada de monitoração, entender seus conceitos,

Rafael Cirolini 318 Dec 23, 2022
This project shows how to serve an ONNX-optimized image classification model as a web service with FastAPI, Docker, and Kubernetes.

Deploying ML models with FastAPI, Docker, and Kubernetes By: Sayak Paul and Chansung Park This project shows how to serve an ONNX-optimized image clas

Sayak Paul 104 Dec 23, 2022
A Flask extension that enables or disables features based on configuration.

Flask FeatureFlags This is a Flask extension that adds feature flagging to your applications. This lets you turn parts of your site on or off based on

Rachel Greenfield 131 Sep 26, 2022
A comprehensive CRUD API generator for SQLALchemy.

FastAPI Quick CRUD Introduction Advantage Constraint Getting started Installation Usage Design Path Parameter Query Parameter Request Body Upsert Intr

192 Jan 06, 2023
fastapi-mqtt is extension for MQTT protocol

fastapi-mqtt MQTT is a lightweight publish/subscribe messaging protocol designed for M2M (machine to machine) telemetry in low bandwidth environments.

Sabuhi 144 Dec 28, 2022
CLI and Streamlit applications to create APIs from Excel data files within seconds, using FastAPI

FastAPI-Wrapper CLI & APIness Streamlit App Arvindra Sehmi, Oxford Economics Ltd. | Website | LinkedIn (Updated: 21 April, 2021) fastapi-wrapper is mo

Arvindra 49 Dec 03, 2022
Code for my FastAPI tutorial

FastAPI tutorial Code for my video tutorial FastAPI tutorial What is FastAPI? FastAPI is a high-performant REST API framework for Python. It's built o

José Haro Peralta 9 Nov 15, 2022
Cbpa - Coinbase Pro Automation for buying your favourite cryptocurrencies

cbpa Coinbase Pro Automation for making buy orders from a default bank account.

Anthony Corletti 3 Nov 27, 2022