Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

api-project-generator

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

api-project-generator

  • 0.6.0
  • PyPI
  • Socket score

Maintainers
1

API Project Generator

Simple API Structure Generator using tecnologies:

  • FastAPI
  • SQLAlchemy
  • aiohttp
  • aiomysql or asyncpg

Commands

  • create:api: Creates the project structure and base classes

    Optional --code option auto opens code through a code project_folder_name command. Optional --db-type option 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}.py

    api-project create:table [table_module] [table_name]
    
  • create:dto: Creates a new DTO file in {project_name}/dtos/{dtos_module}/{dto_name}.py

    api-project create:dto [dtos_module] [dto_name]
    
  • create:enum: Creates a new Enum file in {project_name}/dtos/enums/{enum_name}.py

    The auto-opts option in the command can be repeated and will be used as the enum field

    api-project create:enum [enum_name] --auto-opts [opt_name]
    
  • create:entity: Creates dtos, routes, repository and table for desired entity

    Optional --sync option allow to toggle between async repositories and routes or synchronous ones.

    api-project create:entity [entity_module] [entity_name]
    

Observations

All filenames and foldernames are

normalized automatically to snake_case.

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc