Demonstrate HN: I made a FastApi CRUD API generator for SqlAlchemy model/desk

78
Demonstrate HN: I made a FastApi CRUD API generator for SqlAlchemy model/desk

Imgur

Codacy Badge
Coverage Status
CircleCI
Downloads
SupportedVersion
develop dtatus
PyPI version


intro

I judge that many those that work with FastApi to possess RESTful CRUD services finish up wasting time writing repitive boilerplate code.

FastAPI Rapid CRUD can generate CRUD techniques in FastApi from an SQLAlchemy schema:

  • Bag one
  • Bag one with foreign key
  • Bag many
  • Bag many with foreign key
  • Change one
  • Change many
  • Patch one
  • Patch many
  • Originate/Upsert one
  • Originate/Upsert many
  • Delete One
  • Delete Many
  • Post Redirect Bag

FastAPI Rapid CRUDis developed based completely on SQLAlchemy 1.4.23 version and helps sync and async.

docs page
docs_page_2

Advantages

  • Toughen SQLAlchemy 1.4 – Enables you possess a completely asynchronous or synchronous python carrier

  • Elephantine SQLAlchemy DBAPI Toughen – Toughen diversified SQL for SQLAlchemy

  • Toughen PaginationBag many API give a pick to shriek by offset restrict self-discipline in API

  • Affluent FastAPI CRUD router technology – Many operations of CRUD are implemented to total the mumble and protection of all aspects of general CRUD.

  • CRUD route robotically generated – Toughen Declarative class definitions and Imperative desk

  • Flexible API askUPDATE ONE/MANY FIND ONE/MANY PATCH ONE/MANY DELETE ONE/MANY helps Direction Parameters (considerable key) and Request Parameters as a expose to the resource to filter and restrict the scope of the scope of files in ask.

  • SQL RelationshipFIND ONE/MANY helps Direction get files with relationship

Obstacles

  • If there are a pair of outlandish constraints, please exercise composite outlandish constraints in its establish
  • Composite considerable key will not be supported
  • Unsupported API requests with on resources xxx/{considerable key} for tables with out a considerable key;
    • UPDATE ONE
    • FIND ONE
    • PATCH ONE
    • DELETE ONE

I strive to update the version dependencies as quickly as that you just’re going to be ready to imagine to be certain that the core dependencies of this project possess the absolute top version that you just’re going to be ready to imagine.

fastapi=0.68.2

=0.68.2
pydantic=1.8.2
SQLAlchemy=1.4.30
starlette==0.14.2>

Read More

Charlie Layers
WRITTEN BY

Charlie Layers

Fill your life with experiences so you always have a great story to tell