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
-
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.
-
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.
-
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.
-
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file resource_generator-0.1.2rc0.tar.gz.
File metadata
- Download URL: resource_generator-0.1.2rc0.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.5 CPython/3.12.8 Linux/6.8.0-1017-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
27393fc8973013032936802962d3fd2193e91053495edbbebe1fd6ea6bdfb80c
|
|
| MD5 |
85d05d0e84223317cb007f91e5139112
|
|
| BLAKE2b-256 |
110f7648ebc192fb653c0e071daf58e8ece2d5f4de649331a219178132b53f63
|
File details
Details for the file resource_generator-0.1.2rc0-py3-none-any.whl.
File metadata
- Download URL: resource_generator-0.1.2rc0-py3-none-any.whl
- Upload date:
- Size: 7.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.5 CPython/3.12.8 Linux/6.8.0-1017-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7c0c840e767acb21ae41136bb176bee985c2efc2f5b0bb0010c94f6d5588a2fc
|
|
| MD5 |
92a66f6784f8d1b6f41d7bcf88772f41
|
|
| BLAKE2b-256 |
e772fe684eee031b16010caf442428aff0aa467f88201c17a6570723361f20da
|