Simple API Structure Generator using tecnologies:
- FastAPI
- SQLAlchemy
- aiohttp
- aiomysql or asyncpg
-
create:api: Creates the project structure and base classesOptional
--codeoption auto opens code through acode project_folder_namecommand. Optional--db-typeoption allows to select database type from "postgres" or "mysql". (default: mysql)api-project create
-
create:table: Creates a new table in file in {project_name}/database/tables/{table_module}/{table_file}.pyapi-project create:table [table_module] [table_name]
-
create:dto: Creates a new DTO file in {project_name}/dtos/{dtos_module}/{dto_name}.pyapi-project create:dto [dtos_module] [dto_name]
-
create:enum: Creates a new Enum file in {project_name}/dtos/enums/{enum_name}.pyThe
auto-optsoption in the command can be repeated and will be used as the enum fieldapi-project create:enum [enum_name] --auto-opts [opt_name]
-
create:entity: Creates dtos, routes, repository and table for desired entityOptional
--syncoption allow to toggle between async repositories and routes or synchronous ones.api-project create:entity [entity_module] [entity_name]
All filenames and foldernames are
normalized automatically to snake_case.