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
Sample-fastapi - A sample app using Fastapi that you can deploy on App Platform

Getting Started We provide a sample app using Fastapi that you can deploy on App

Erhan BÜTE 2 Jan 17, 2022
:rocket: CLI tool for FastAPI. Generating new FastAPI projects & boilerplates made easy.

Project generator and manager for FastAPI. Source Code: View it on Github Features ?? Creates customizable project boilerplate. Creates customizable a

Yagiz Degirmenci 1k Jan 2, 2023
Пример использования GraphQL Ariadne с FastAPI и сравнение его с GraphQL Graphene FastAPI

FastAPI Ariadne Example Пример использования GraphQL Ariadne с FastAPI и сравнение его с GraphQL Graphene FastAPI - GitHub ###Запуск на локальном окру

ZeBrains Team 9 Nov 10, 2022
Flask-vs-FastAPI - Understanding Flask vs FastAPI Web Framework. A comparison of two different RestAPI frameworks.

Flask-vs-FastAPI Understanding Flask vs FastAPI Web Framework. A comparison of two different RestAPI frameworks. IntroductionIn Flask is a popular mic

Mithlesh Navlakhe 1 Jan 1, 2022
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
fastapi-admin2 is an upgraded fastapi-admin, that supports ORM dialects, true Dependency Injection and extendability

FastAPI2 Admin Introduction fastapi-admin2 is an upgraded fastapi-admin, that supports ORM dialects, true Dependency Injection and extendability. Now

Glib 14 Dec 5, 2022
Code Specialist 27 Oct 16, 2022
Fastapi-ml-template - Fastapi ml template with python

FastAPI ML Template Run Web API Local $ sh run.sh # poetry run uvicorn app.mai

Yuki Okuda 29 Nov 20, 2022
FastAPI-Amis-Admin is a high-performance, efficient and easily extensible FastAPI admin framework. Inspired by django-admin, and has as many powerful functions as django-admin.

简体中文 | English 项目介绍 FastAPI-Amis-Admin fastapi-amis-admin是一个拥有高性能,高效率,易拓展的fastapi管理后台框架. 启发自Django-Admin,并且拥有不逊色于Django-Admin的强大功能. 源码 · 在线演示 · 文档 · 文

AmisAdmin 318 Dec 31, 2022
Generate Class & Decorators for your FastAPI project ✨🚀

Classes and Decorators to use FastAPI with class based routing. In particular this allows you to construct an instance of a class and have methods of that instance be route handlers for FastAPI & Python 3.8.

Yasser Tahiri 34 Oct 27, 2022