Skip to main content

Python CLI for generate resource such as model, controller, service, schema and repository

Project description

Resource Generator For FastApi


Source Code: https://github.com/RatanaKH/resource_generator

Overview

A generate command for a FastAPI project simplifies the creation of common components like models, controllers, services, and schemas. It acts as a code scaffolding tool, ensuring consistent structure, reducing boilerplate, and accelerating development.

Key Reasons for Creating a generate Command

  1. Consistency Across the Codebase: Enforcing a consistent naming convention and folder structure. Preventing errors caused by manual file creation and misplaced code. Ensuring that all components follow best practices and are aligned with project standards.

  2. Improved Developer Productivity: Automating repetitive tasks like creating models, schemas, and services. Reducing time spent writing boilerplate code for new components. Allowing developers to focus on business logic instead of setup tasks.

  3. Scalability for Large Teams: Standardizing the creation process for teams to minimize onboarding effort. Reducing human errors and misunderstandings regarding file and module organization. Making collaboration smoother by enforcing project guidelines automatically.

  4. Maintainability: Encouraging modular and predictable code organization. Generating components with pre-defined templates ensures maintainable and testable code. Easy refactoring and debugging, as all components are structured consistently.

Installation

To install this package, use pip:

  pip install resource-generator

To install this package, use poetry:

  poetry add resource-generator

How to use command

  ratana-pls make-[OPTION] name [FILE_NAME]

Example:

  ratana-pls make-model name Users
  ratana-pls make-controller name Users
  ratana-pls make-repository name Users
  ratana-pls make-schema name Users
  ratana-pls make-service name Users

This package use build over typer library.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

resource_generator-0.1.3.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

resource_generator-0.1.3-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

Details for the file resource_generator-0.1.3.tar.gz.

File metadata

  • Download URL: resource_generator-0.1.3.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.0 CPython/3.12.8 Linux/6.8.0-1017-azure

File hashes

Hashes for resource_generator-0.1.3.tar.gz
Algorithm Hash digest
SHA256 a6ab923adda160fd03d00b0db231573bdadbe739b3317baede060f33ae9a5ab0
MD5 cb70db90c0d895efb736dbf72bcd511b
BLAKE2b-256 42ebf7a3e703982a89851c2dab5ff9e939cf5c5e05a48acd300d4e0328cab26f

See more details on using hashes here.

File details

Details for the file resource_generator-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: resource_generator-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 8.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.0 CPython/3.12.8 Linux/6.8.0-1017-azure

File hashes

Hashes for resource_generator-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 e5c24ff15a8c0b16f92b081623fe5a0da87c83fe526bae65690789c6db738021
MD5 4fe164736465c449f157610ee171a19f
BLAKE2b-256 5c1d59037ecca8247113c342aaeee1c6d289f5b4e6daca970570d9478bc803a6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page