A comprehensive CRUD API generator for SQLALchemy.

Overview

FastAPI Quick CRUD

Codacy Badge Coverage Status CircleCI PyPidownload SupportedVersion develop dtatus


docs page

Introduction

I believe that everyone who's working with FastApi and building some RESTful of CRUD services, wastes the time to writing similar code for simple CRUD every time

FastAPI Quick CRUD can generate CRUD in FastApi with SQLAlchemy schema of PostgreSQL Database.

  • Get one
  • Get many
  • Update one
  • Update many
  • Patch one
  • Patch many
  • Create/Upsert one
  • Create/Upsert many
  • Delete One
  • Delete Many
  • Post Redirect Get

FastAPI Quick CRUDis developed based on SQLAlchemy 1.4.23 version and supports sync and async.

Advantage

  • Support SQLAlchemy 1.4 - Allow you build a fully asynchronous python service, also supports synchronization.

  • Support Pagination - Get many API support order by offset limit field in API

  • Rich FastAPI CRUD router generation - Many operations of CRUD are implemented to complete the development and coverage of all aspects of basic CRUD.

  • CRUD route automatically generated - Support Declarative class definitions and Imperative table

  • Flexible API request - UPDATE ONE/MANY FIND ONE/MANY PATCH ONE/MANY DELETE ONE/MANY supports Path Parameters (primary key) and Query Parameters as a command to the resource to filter and limit the scope of the scope of data in request.

Constraint

  • Only Support PostgreSQL yet (support MongoDB,MSSQL in schedule)
  • If there are multiple unique constraints, please use composite unique constraints instead
  • Composite primary key is not support
  • Not Support API requests with specific resource xxx/{primary key} when table have not primary key;
    • UPDATE ONE
    • FIND ONE
    • PATCH ONE
    • DELETE ONE
  • Alias is not support for imperative table yet
  • Some types of columns are not supported as query parameter
    • INTERVAL
    • JSON
    • JSONB
    • H-STORE
    • ARRAY
    • BYTE
    • Geography
    • box
    • line
    • point
    • lseg
    • polygon
    • inet
    • macaddr

Getting started

Installation

pip install fastapi-quickcrud

Usage

Start PostgreSQL using:

docker run -d -p 5432:5432 --name mypostgres --restart always -v postgresql-data:/var/lib/postgresql/data -e POSTGRES_PASSWORD=1234 postgres

Simple Code (get more example from ./example)

from datetime import datetime, timezone

import uvicorn
from fastapi import FastAPI
from sqlalchemy import Column, Integer, \
    String, Table, ForeignKey
from sqlalchemy.orm import declarative_base, sessionmaker

from fastapi_quickcrud import CrudMethods
from fastapi_quickcrud import crud_router_builder
from fastapi_quickcrud import sqlalchemy_table_to_pydantic
from fastapi_quickcrud import sqlalchemy_to_pydantic

app = FastAPI()

Base = declarative_base()
metadata = Base.metadata

from sqlalchemy.ext.asyncio import create_async_engine, AsyncSession

engine = create_async_engine('postgresql+asyncpg://postgres:[email protected]:5432/postgres', future=True, echo=True,
                             pool_use_lifo=True, pool_pre_ping=True, pool_recycle=7200)
async_session = sessionmaker(bind=engine, class_=AsyncSession)


async def get_transaction_session() -> AsyncSession:
    async with async_session() as session:
        async with session.begin():
            yield session


class User(Base):
    __tablename__ = 'users'

    id = Column(Integer, primary_key=True, autoincrement=True, unique=True)
    name = Column(String, nullable=False)
    email = Column(String, nullable=False, default=datetime.now(timezone.utc).strftime('%H:%M:%S%z'))


friend = Table(
    'friend', metadata,
    Column('id', ForeignKey('users.id', ondelete='CASCADE', onupdate='CASCADE'), nullable=False),
    Column('friend_name', String, nullable=False)
)

user_model_set = sqlalchemy_to_pydantic(db_model=User,
                                        crud_methods=[
                                            CrudMethods.FIND_MANY,
                                            CrudMethods.FIND_ONE,
                                            CrudMethods.UPSERT_ONE,
                                            CrudMethods.UPDATE_MANY,
                                            CrudMethods.UPDATE_ONE,
                                            CrudMethods.DELETE_ONE,
                                            CrudMethods.DELETE_MANY,
                                            CrudMethods.PATCH_MANY,

                                        ],
                                        exclude_columns=[])

friend_model_set = sqlalchemy_table_to_pydantic(db_model=friend,
                                                crud_methods=[
                                                    CrudMethods.FIND_MANY,
                                                    CrudMethods.UPSERT_MANY,
                                                    CrudMethods.UPDATE_MANY,
                                                    CrudMethods.DELETE_MANY,
                                                    CrudMethods.PATCH_MANY,

                                                ],
                                                exclude_columns=[])


crud_route_1 = crud_router_builder(db_session=get_transaction_session,
                                   crud_models=user_model_set,
                                   db_model=User,
                                   prefix="/user",
                                   dependencies=[],
                                   async_mode=True,
                                   tags=["User"]
                                   )
crud_route_2 = crud_router_builder(db_session=get_transaction_session,
                                   crud_models=friend_model_set,
                                   db_model=friend,
                                   async_mode=True,
                                   prefix="/friend",
                                   dependencies=[],
                                   tags=["Friend"]
                                   )


app.include_router(crud_route_1)
app.include_router(crud_route_2)
uvicorn.run(app, host="0.0.0.0", port=8000, debug=False)

Main module

covert SQLAlchemy to model set

use sqlalchemy_to_pydantic if SQLAlchemy model is Declarative Base Class

use sqlalchemy_table_to_pydantic if SQLAlchemy model is Table

  • argument:
    • db_model: SQLALchemy Declarative Base Class

    • crud_methods: CrudMethods

      • CrudMethods.FIND_ONE
      • CrudMethods.FIND_MANY
      • CrudMethods.UPDATE_ONE
      • CrudMethods.UPDATE_MANY
      • CrudMethods.PATCH_ONE
      • CrudMethods.PATCH_MANY
      • CrudMethods.UPSERT_ONE
      • CrudMethods.UPSERT_MANY
      • CrudMethods.DELETE_ONE
      • CrudMethods.DELETE_MANY
      • CrudMethods.POST_REDIRECT_GET
    • exclude_columns: list

      set the columns that not to be operated but the columns should nullable or set the default value)


Generate CRUD router

crud_router_builder

  • db_session: execute session generator
    • example:
      • sync SQLALchemy:
def get_transaction_session():
    try:
        db = sessionmaker(...)
        yield db
        db.commit()
    except Exception as e:
        db.rollback()
        raise e
    finally:
        db.close()
  • Async SQLALchemy
async def get_transaction_session() -> AsyncSession:
    async with async_session() as session:
        async with session.begin():
            yield session
  • db_model SQLALchemy Declarative Base Class

    Note: There are some constraint in the SQLALchemy Schema

  • async_modebool: if your db session is async

    Note: require async session generator if True

  • autocommitbool: if you don't need to commit by your self

    Note: require handle the commit in your async session generator if False

  • dependencies: API dependency injection of fastapi

    Note: Get the example usage in ./example

  • crud_models sqlalchemy_to_pydantic

  • dynamic argument (prefix, tags): extra argument for APIRouter() of fastapi

Design

In PUT DELETE PATCH, user can use Path Parameters and Query Parameters to limit the scope of the data affected by the operation, and the Query Parameters is same with FIND API

Path Parameter

In the design of this tool, Path Parameters should be a primary key of table, that why limited primary key can only be one.

Query Parameter

  • Query Operation will look like that when python type of column is

    string
    • support Approximate String Matching that require this
      • (<column_name>____str, <column_name>____str_____matching_pattern)
    • support In-place Operation, get the value of column in the list of input
      • (<column_name>____list, <column_name>____list____comparison_operator)
    • preview string
    numeric or datetime
    • support Range Searching from and to
      • (<column_name>____from, <column_name>____from_____comparison_operator)
      • (<column_name>____to, <column_name>____to_____comparison_operator)
    • support In-place Operation, get the value of column in the list of input
      • (<column_name>____list, <column_name>____list____comparison_operator)
    • preview numeric datetime
    uuid

    uuid supports In-place Operation only

    • support In-place Operation, get the value of column in the list of input
      • (<column_name>____list, <column_name>____list____comparison_operator)
  • EXTRA query parameter for GET_MANY:

    Pagination
    • limit
    • offset
    • order by
    • preview Pagination

Query to SQL statement example

  • Approximate String Matching

    example
    • request url
      /test_CRUD?
      char_value____str_____matching_pattern=match_regex_with_case_sensitive&
      char_value____str_____matching_pattern=does_not_match_regex_with_case_insensitive&
      char_value____str_____matching_pattern=case_sensitive&
      char_value____str_____matching_pattern=not_case_insensitive&
      char_value____str=a&
      char_value____str=b
      
    • generated sql
        SELECT *
        FROM untitled_table_256 
        WHERE (untitled_table_256.char_value ~ 'a') OR 
        (untitled_table_256.char_value ~ 'b' OR 
        (untitled_table_256.char_value !~* 'a') OR 
        (untitled_table_256.char_value !~* 'b' OR 
        untitled_table_256.char_value LIKE 'a' OR 
        untitled_table_256.char_value LIKE 'b' OR 
        untitled_table_256.char_value NOT ILIKE 'a' 
        OR untitled_table_256.char_value NOT ILIKE 'b'
  • In-place Operation

    example
    • In-place support the following operation

    • generated sql if user select Equal operation and input True and False

    • preview in

    • generated sql

        select * FROM untitled_table_256 
        WHERE untitled_table_256.bool_value = true OR 
        untitled_table_256.bool_value = false
  • Range Searching

    example
    • Range Searching support the following operation

      greater

      less

    • generated sql

        select * from untitled_table_256
        WHERE untitled_table_256.date_value > %(date_value_1)s 
        select * from untitled_table_256
        WHERE untitled_table_256.date_value < %(date_value_1)s 
  • Also support your custom dependency for each api(there is a example in ./example)

Request Body

In the design of this tool, the columns of the table will be used as the fields of request body.

In the basic request body in the api generated by this tool, some fields are optional if :

  • it is primary key with autoincrement is True or the server_default or default is True
  • it is not a primary key, but the server_default or default is True
  • The field is nullable

Upsert

POST API will perform the data insertion action with using the basic Request Body, In addition, it also supports upsert(insert on conflict do)

The operation will use upsert instead if the unique column in the inserted row that is being inserted already exists in the table

The tool uses unique columns in the table as a parameter of on conflict , and you can define which column will be updated

upsert

Alias

Alias is supported already

usage:

id = Column('primary_key',Integer, primary_key=True, server_default=text("nextval('untitled_table_256_id_seq'::regclass)"))

you can use info argument to set the alias name of column, and use synonym to map the column between alias column and original column

id = Column(Integer, info={'alias_name': 'primary_key'}, primary_key=True, server_default=text("nextval('untitled_table_256_id_seq'::regclass)"))
primary_key = synonym('id')

FastAPI_quickcrud Response Status Code standard

When you ask for a specific resource, say a user or with query param, and the user doesn't exist

GET: get one : https://0.0.0.0:8080/api/:userid?xx=xx

UPDATE: update one : https://0.0.0.0:8080/api/:userid?xx=xx

PATCH: patch one : https://0.0.0.0:8080/api/:userid?xx=xx

DELETE: delete one : https://0.0.0.0:8080/api/:userid?xx=xx

then fastapi-qucikcrud should return 404. In this case, the client requested a resource that doesn't exist.


In the other case, you have an api that operate data on batch in the system using the following url:

GET: get many : https://0.0.0.0:8080/api/user?xx=xx

UPDATE: update many : https://0.0.0.0:8080/api/user?xx=xx

DELETE: delete many : https://0.0.0.0:8080/api/user?xx=xx

PATCH: patch many : https://0.0.0.0:8080/api/user?xx=xx

If there are no users in the system, then, in this case, you should return 204.

TODO

  • handle relationship
  • support MYSQL , MSSQL cfand Sqllite
Comments
  • Postgres SqlAlchemy model with server defaults and different schema cannot be used

    Postgres SqlAlchemy model with server defaults and different schema cannot be used

    I am using a PostgreSQL 14.2-1 Windows x64 database using pgAdmin to which I am connecting to like so:

    engine = create_async_engine(DATABASE_URL,
                                 future=True, echo=True,
                                 pool_use_lifo=True, pool_pre_ping=True, pool_recycle=7200
                                 )
    async_session_maker = sessionmaker(engine, class_=AsyncSession,
                                       expire_on_commit=False)
    
    Base: DeclarativeMeta = declarative_base()
    

    Using the following SQL script I have made the table dbo.Quote, like so:

    CREATE TABLE dbo.Quote
    (
        "ID" bigint GENERATED ALWAYS AS IDENTITY,
        "UUID" uuid NOT NULL DEFAULT gen_random_uuid(),
        "DateCreated" timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP,
        "DateModified" timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP,
        "IsActive" boolean NOT NULL DEFAULT TRUE,
        "Text" character varying(512) NOT NULL,
        "Author" character varying(126) DEFAULT 'Unknown',
        "Origin" character varying(126) DEFAULT 'Unknown',
        "UserID" bigint,
          CONSTRAINT "FK_Quote_Users" FOREIGN KEY ("UserID")
            REFERENCES auth.users ("ID") MATCH SIMPLE
            ON UPDATE NO ACTION
            ON DELETE NO ACTION
            NOT VALID,
        PRIMARY KEY ("ID")
    );
    
    ALTER TABLE IF EXISTS dbo.Quote
        OWNER to postgres;
    

    I have also developed an SQLAlchemy model for the dbo.Quote postgres table:

    class Quote(Base):
        __tablename__ = 'quote'
        __table_args__ = {'schema': 'dbo'}
    
        ID = Column(BigInteger, Identity(always=True, start=1, increment=1,
                                         minvalue=1, maxvalue=9223372036854775807, cycle=False, cache=1), primary_key=True)
        UUID = Column(UUID, nullable=False, server_default=text("gen_random_uuid()"))
        DateCreated = Column(DateTime(True), nullable=False, server_default=text("CURRENT_TIMESTAMP"))
        DateModified = Column(DateTime(True), nullable=False, server_default=text("CURRENT_TIMESTAMP"))
        IsActive = Column(Boolean, nullable=False, server_default=text("true"))
        Text = Column(String(512), nullable=False)
        Author = Column(String(126), server_default=text("'Unknown'::character varying"))
        Origin = Column(String(126), server_default=text("'Unknown'::character varying"))
        UserID = Column(BigInteger, ForeignKey('auth.users.ID'))
    `
    
    I am using an AsyncSession generator, such as you have exemplified in your simple example, namely:
    `
    async def get_transaction_session() -> AsyncSession:
        async with async_session_maker() as session:
            async with session.begin():
                yield session
    

    and I am adding the crud router builder like so

    QuoteCRUDRouter = crud_router_builder(db_model=Quote,
                                          prefix='/quote', tags=['Quote'],
    
                                          exclude_columns=['UUID','DateCreated','DateModified','IsActive'],
                                          crud_methods=[CrudMethods.CREATE_ONE],
    
                                          async_mode=True,
                                          autocommit=False,
                                          db_session=get_transaction_session,
                                          )
    

    Finally, when I run

    import uvicorn
    
    if __name__ == "__main__":
        uvicorn.run("app.app:app",
                    # host="0.0.0.0", # defaults to localhost
                    log_level="info", reload=True)
    

    I get the following error

    INFO:     Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
    INFO:     Started reloader process [14456] using watchgod
    Process SpawnProcess-1:
    Traceback (most recent call last):
      File "C:\Users\DELL\AppData\Local\Programs\Python\Python37\lib\multiprocessing\process.py", line 297, in _bootstrap
        self.run()
      File "C:\Users\DELL\AppData\Local\Programs\Python\Python37\lib\multiprocessing\process.py", line 99, in run
        self._target(*self._args, **self._kwargs)
      File "C:\Users\DELL\Documents\code\fastapi-learning\.env\lib\site-packages\uvicorn\subprocess.py", line 76, in subprocess_started
        target(sockets=sockets)
      File "C:\Users\DELL\Documents\code\fastapi-learning\.env\lib\site-packages\uvicorn\server.py", line 67, in run
        return asyncio.run(self.serve(sockets=sockets))
      File "C:\Users\DELL\AppData\Local\Programs\Python\Python37\lib\asyncio\runners.py", line 43, in run
        return loop.run_until_complete(main)
      File "C:\Users\DELL\AppData\Local\Programs\Python\Python37\lib\asyncio\base_events.py", line 579, in run_until_complete
        return future.result()
      File "C:\Users\DELL\Documents\code\fastapi-learning\.env\lib\site-packages\uvicorn\server.py", line 74, in serve
        config.load()
      File "C:\Users\DELL\Documents\code\fastapi-learning\.env\lib\site-packages\uvicorn\config.py", line 458, in load
        self.loaded_app = import_from_string(self.app)
      File "C:\Users\DELL\Documents\code\fastapi-learning\.env\lib\site-packages\uvicorn\importer.py", line 21, in import_from_string
        module = importlib.import_module(module_str)
      File "C:\Users\DELL\AppData\Local\Programs\Python\Python37\lib\importlib\__init__.py", line 127, in import_module
        return _bootstrap._gcd_import(name[level:], package, level)
      File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
      File "<frozen importlib._bootstrap>", line 983, in _find_and_load
      File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
      File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
      File "<frozen importlib._bootstrap_external>", line 728, in exec_module
      File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
      File "C:\Users\DELL\Documents\code\fastapi-learning\app\app.py", line 36, in <module>
        db_session=get_transaction_session,
      File "C:\Users\DELL\Documents\code\fastapi-learning\.env\lib\site-packages\fastapi_quickcrud\crud_router.py", line 114, in crud_router_builder
        sql_type, = asyncio.get_event_loop().run_until_complete(async_runner(db_session))
      File "C:\Users\DELL\AppData\Local\Programs\Python\Python37\lib\asyncio\base_events.py", line 566, in run_until_complete
        self.run_forever()
      File "C:\Users\DELL\AppData\Local\Programs\Python\Python37\lib\asyncio\base_events.py", line 521, in run_forever
        raise RuntimeError('This event loop is already running')
    RuntimeError: This event loop is already running
    

    Why am I getting this error?

    Also, because SQLite does not have schemas, the __table_args__ in the SQLAlchemy model cause a problem, so what is the issue with that as well?

    bug documentation help wanted 
    opened by filipmarkoski 10
  • Support for PostgreSQL data types

    Support for PostgreSQL data types

    I created a few SQLAlchemy models containing some PostgreSQL data types such as from sqlalchemy.dialects.postgresql import BYTEA, INTERVAL, JSONB, UUID

    and I encountered the following exception fastapi_quickcrud.misc.exceptions.ColumnTypeNotSupportedException: The type of column Blob (BYTEA) not supported yet

    I haven't tested the other types except for Postgres BYTEA, however, there might be an issue for from sqlalchemy import ARRAY as well.

    I want to build a ReactJS app in which I can upload a photo via a FastAPI endpoint and store it in the BYTEA field. Afterwards, I would also like to have a FastAPI endpoint that lists all of the BYTEA entries, which I can use to make a gallery in ReactJS.

    class Photo(Base):
        __tablename__ = 'photo'
        __table_args__ = {'schema': 'dbo'}
    
        ID = Column(BigInteger,
                    Identity(always=True, start=1, increment=1, minvalue=1, maxvalue=9223372036854775807, cycle=False,
                             cache=1), primary_key=True)
        UUID_ = Column('UUID', UUID, nullable=False, server_default=text('gen_random_uuid()'))
        DateCreated = Column(DateTime(True), nullable=False, server_default=text('CURRENT_TIMESTAMP'))
        DateModified = Column(DateTime(True), nullable=False, server_default=text('CURRENT_TIMESTAMP'))
        IsActive = Column(Boolean, nullable=False, server_default=text('true'))
        
        Blob = Column(BYTEA, nullable=False)
    
        ...
    
    
    PhotoCRUDRouter = crud_router_builder(db_model=Photo,
                                          db_session=get_transaction_session,
                                          prefix='/quote', tags=['Photo'],
                                          exclude_columns=['UUID','DateCreated','DateModified','IsActive'],
                                          async_mode=True,
                                          autocommit=False,
                                          sql_type=SqlType.postgresql,
                                          )
    app.include_router(PhotoCRUDRouter)
    
    opened by filipmarkoski 2
  • New feature discussion

    New feature discussion

    After the foreign tree feature, I will focus on the Codegen feature, since #6 . Which make it easier for us to develop the API we want than now, you can modify the code to develop your own api based on this project

    2022-03-07  9 36 03

    The CodeGen feature will not generate with join_foreign_table field

    13 mar 2022 The development is quite smooth and no blocking, I thing it can be released after 3 week

    enhancement developing 
    opened by LuisLuii 2
  • Use tree-like API for foreign keys.

    Use tree-like API for foreign keys.

    This is such a cool package, but I ended up not using it because I wanted my API to look like this. I thought I would just leave it as a suggestion.

    Suppose I have this in sqlalchemy:

    import sqlalchemy as sa
    
    class Account(Base):
        __tablename__ = "account"
        id = sa.Column(sa.Integer, primary_key=True, autoincrement=True)
    
    class BlogPost(Base):
        __tablename__ = "blog_post"
        id = sa.Column(sa.Integer, primary_key=True, autoincrement=True)
        account_id = sa.Column(sa.Integer, sa.ForeignKey("account.id"), nullable=False)
    
    class BlogComment(Base)
        __tablename__ = "blog_comment"
        id = sa.Column(sa.Integer, primary_key=True, autoincrement=True)
        blog_id = sa.Column(sa.Integer, sa.ForeignKey("blog_post.id"), nullable=False)
    

    I might want routes like this:

    GET /account/<account_id>/post/
    { list of blog posts by the author }
    POST /account/<account_id>/post/
    # creates a new blog post for the author
    GET /post/<post_id>/comment
    { list of comments on the blog post }
    GET /account<account_id>/post/<post_id>/comment
    { list of comments on the blog post - not sure how this is compared to the one above }
    

    Anyways, just a thought!

    enhancement 
    opened by aebrahim 2
  • Which FastApi version is required ?

    Which FastApi version is required ?

    Hi,

    I would like to test your module which suits with my needs, but I'm facing out issue with tutorial/sample.py. When I launch this, I get this error:

    .\global_venv\lib\site-packages\fastapi_quickcrud\misc\schema_builder.py:263: UserWarning: The column of id has not default value and it is not nullable and in exclude_listit may throw error when you insert data 
      warnings.warn(
    Traceback (most recent call last):
      File "./api/run3.py", line 23, in <module>
        crud_route_parent = generic_sql_crud_router_builder(
      File ".\global_venv\lib\site-packages\fastapi_quickcrud\crud_router.py", line 400, in crud_router_builder
        api = APIRouter(**router_kwargs)
    TypeError: __init__() got an unexpected keyword argument 'sql_type'
    

    It seems, the parameter sql_type is not expected by the FastApi class APIRouter. I checked quickly this class on FastAPI github, but I found no change for a while, missed I something ?

    Best regards,

    good first issue 
    opened by OlivierPonant 2
  • pip install error

    pip install error

    Environment: Windows 10 + Python 3.10.1 (x64) (Issue also with 3.7)

    Facing the following error while trying to install via pip:

    pip install fastapi_quickcrud==0.0.2
    Collecting fastapi_quickcrud==0.0.2
      Using cached fastapi_quickcrud-0.0.2.tar.gz (37 kB)
      Installing build dependencies ... done
      Getting requirements to build wheel ... done
      Preparing metadata (pyproject.toml) ... error
      ERROR: Command errored out with exit status 1:
       command: 'c:\users\rob-work\pycharmprojects\xconnect.agent\venv310\scripts\python.exe' 'c:\users\rob-work\pycharmprojects\xconnect.agent\venv310\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py' prepare_metadata_for_build_wheel 'C:\Users\Rob-Work\A
    ppData\Local\Temp\tmp9kjdrdoz'
           cwd: C:\Users\Rob-Work\AppData\Local\Temp\pip-install-v4nip7h_\fastapi-quickcrud_9c5e5ca136504d1185d5c4dd9e880cca
      Complete output (16 lines):
      Traceback (most recent call last):
        File "c:\users\rob-work\pycharmprojects\xconnect.agent\venv310\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 363, in <module>
          main()
        File "c:\users\rob-work\pycharmprojects\xconnect.agent\venv310\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 345, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "c:\users\rob-work\pycharmprojects\xconnect.agent\venv310\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 164, in prepare_metadata_for_build_wheel
          return hook(metadata_directory, config_settings)
        File "C:\Users\Rob-Work\AppData\Local\Temp\pip-build-env-4fol05yn\overlay\Lib\site-packages\poetry\core\masonry\api.py", line 44, in prepare_metadata_for_build_wheel
          builder = WheelBuilder(poetry)
        File "C:\Users\Rob-Work\AppData\Local\Temp\pip-build-env-4fol05yn\overlay\Lib\site-packages\poetry\core\masonry\builders\wheel.py", line 57, in __init__
          super(WheelBuilder, self).__init__(poetry, executable=executable)
        File "C:\Users\Rob-Work\AppData\Local\Temp\pip-build-env-4fol05yn\overlay\Lib\site-packages\poetry\core\masonry\builders\builder.py", line 85, in __init__
          self._module = Module(
        File "C:\Users\Rob-Work\AppData\Local\Temp\pip-build-env-4fol05yn\overlay\Lib\site-packages\poetry\core\masonry\utils\module.py", line 63, in __init__
          raise ModuleOrPackageNotFound(
      poetry.core.masonry.utils.module.ModuleOrPackageNotFound: No file/folder found for package fastapiquickcrud
      ----------------------------------------
    WARNING: Discarding https://files.pythonhosted.org/packages/47/a3/8af39857ce62afcb563fd700be27954ad9d28f6ae19f3e8570182edbf604/fastapi_quickcrud-0.0.2.tar.gz#sha256=e72fd906359072e48a67745e9c4be19b4f1ce92a43d0d3b5c2d2685077b3e5a5 (from https://pypi.org/simple/fasta
    pi-quickcrud/) (requires-python:>=3.7). Command errored out with exit status 1: 'c:\users\rob-work\pycharmprojects\xconnect.agent\venv310\scripts\python.exe' 'c:\users\rob-work\pycharmprojects\xconnect.agent\venv310\lib\site-packages\pip\_vendor\pep517\in_process\_
    in_process.py' prepare_metadata_for_build_wheel 'C:\Users\Rob-Work\AppData\Local\Temp\tmp9kjdrdoz' Check the logs for full command output.
    ERROR: Could not find a version that satisfies the requirement fastapi_quickcrud==0.0.2 (from versions: 0.0.1a1, 0.0.1a2, 0.0.1a3, 0.0.1a4, 0.0.1a5, 0.0.1a6, 0.0.1a7, 0.0.1a8, 0.0.1a9, 0.0.1a10, 0.0.1a11, 0.0.1a12, 0.0.1a13, 0.0.1a14, 0.0.1a15, 0.0.1a16, 0.0.1a17, 
    0.0.1a18, 0.0.1a19, 0.0.1, 0.0.2)
    ERROR: No matching distribution found for fastapi_quickcrud==0.0.2
    
    opened by nemrx 2
  • Add license scan report and status

    Add license scan report and status

    Your FOSSA integration was successful! Attached in this PR is a badge and license report to track scan status in your README.

    Below are docs for integrating FOSSA license checks into your CI:

    opened by fossabot 0
  • How to run the FastAPIQuickCRUD is NOT Clear

    How to run the FastAPIQuickCRUD is NOT Clear

    Dear Sir, I have installed the FastAPIQuickCRUD and also generator.

    BUT How to run and which path IS NOT clear in the README File.

    Please guide

    Also Where should the user setup the variable SQLALCHEMY

    Please reply

    Regards,

    documentation 
    opened by pvssrikanth 33
  • Extraneous `local_kw` added to mandatory arguments in swagger

    Extraneous `local_kw` added to mandatory arguments in swagger

    Hi all, I've noticed that this seems to appear in the swagger documentation, I've not specified it

    image

    I've tried posting using thunder client, and without a 'local_kw" a 422 error is returned, however if it's specified we get Session.__init__() got an unexpected keyword argument 'local_kw'

    opened by AntonyM71 6
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

Adam Watkins 950 Jan 8, 2023
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 Documentation: https://fast

Adam Watkins 943 Jan 1, 2023
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 Documentation: https://fast

Adam Watkins 130 Feb 13, 2021
FastAPI CRUD template using Deta Base

Deta Base FastAPI CRUD FastAPI CRUD template using Deta Base Setup Install the requirements for the CRUD: pip3 install -r requirements.txt Add your D

Sebastian Ponce 2 Dec 15, 2021
🍃 A comprehensive monitoring and alerting solution for the status of your Chia farmer and harvesters.

chia-monitor A monitoring tool to collect all important metrics from your Chia farming node and connected harvesters. It can send you push notificatio

Philipp Normann 153 Oct 21, 2022
Adds simple SQLAlchemy support to FastAPI

FastAPI-SQLAlchemy FastAPI-SQLAlchemy provides a simple integration between FastAPI and SQLAlchemy in your application. It gives access to useful help

Michael Freeborn 465 Jan 7, 2023
🚀 Cookiecutter Template for FastAPI + React Projects. Using PostgreSQL, SQLAlchemy, and Docker

FastAPI + React · A cookiecutter template for bootstrapping a FastAPI and React project using a modern stack. Features FastAPI (Python 3.8) JWT authen

Gabriel Abud 1.4k Jan 2, 2023
🚀 Cookiecutter Template for FastAPI + React Projects. Using PostgreSQL, SQLAlchemy, and Docker

FastAPI + React · A cookiecutter template for bootstrapping a FastAPI and React project using a modern stack. Features FastAPI (Python 3.8) JWT authen

Gabriel Abud 448 Feb 19, 2021
Mixer -- Is a fixtures replacement. Supported Django, Flask, SqlAlchemy and custom python objects.

The Mixer is a helper to generate instances of Django or SQLAlchemy models. It's useful for testing and fixture replacement. Fast and convenient test-

Kirill Klenov 871 Dec 25, 2022
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

null 228 Jan 2, 2023
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 3, 2023
This code generator creates FastAPI app from an openapi file.

fastapi-code-generator This code generator creates FastAPI app from an openapi file. This project is an experimental phase. fastapi-code-generator use

Koudai Aono 632 Jan 5, 2023
FastAPI client generator

FastAPI-based API Client Generator Generate a mypy- and IDE-friendly API client from an OpenAPI spec. Sync and async interfaces are both available Com

David Montague 283 Jan 4, 2023
FastAPI client generator

FastAPI-based API Client Generator Generate a mypy- and IDE-friendly API client from an OpenAPI spec. Sync and async interfaces are both available Com

David Montague 135 Feb 12, 2021
Full stack, modern web application generator. Using FastAPI, PostgreSQL as database, Docker, automatic HTTPS and more.

Full Stack FastAPI and PostgreSQL - Base Project Generator Generate a backend and frontend stack using Python, including interactive API documentation

Sebastián Ramírez 10.8k Jan 8, 2023
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
Run your jupyter notebooks as a REST API endpoint. This isn't a jupyter server but rather just a way to run your notebooks as a REST API Endpoint.

Jupter Notebook REST API Run your jupyter notebooks as a REST API endpoint. This isn't a jupyter server but rather just a way to run your notebooks as

Invictify 54 Nov 4, 2022
Beyonic API Python official client library simplified examples using Flask, Django and Fast API.

Beyonic API Python Examples. The beyonic APIs Doc Reference: https://apidocs.beyonic.com/ To start using the Beyonic API Python API, you need to start

Harun Mbaabu Mwenda 46 Sep 1, 2022
Practice-python is a simple Fast api project for dealing with modern rest api technologies.

Practice Python Practice-python is a simple Fast api project for dealing with modern rest api technologies. Deployment with docker Go to the project r

null 0 Sep 19, 2022