A tiny CLI for creating a clean project structure.
Project description
Tidygen
Overview
The Tidygen project is a command-line tool for creating and managing application components in a clean architectural manner.
All dependencies should flow from app > core > entities or app > data > entities. This ensures that the core and data layers are not dependent on each other. However, the adherence to this structure is wholly dependent on the user.
It uses the click library to provide a set of commands for generating application, core, and data classes in specified domains.
Installation
To install, run:
pip install tidygen
Usage
Initialize a New Project
To initialize a new project, use the init command:
tidygen init -d <destination>
Building the Project
Installation
To install the required dependencies, run:
poetry install
Usage
Initialize a New Project
To initialize a new project, use the init command:
python src/tidygen/main.py init -d <destination>
This will create the necessary directory structure and an abstract Operation class.
Create Application Components
Create an Application Class
To create a new application class, use the create command under the app group:
python src/tidygen/main.py app create -d <destination> -e <domain> -n <name>
This will create a new class in the specified domain under the app directory.
Create a Core Class
To create a new core class, use the create command under the core group:
python src/tidygen/main.py core create -d <destination> -e <domain> -n <name>
This will create a new class in the specified domain under the core directory.
Create Data Components
Create a Queries Class
To create a new queries class, use the create_queries command under the data group:
python src/tidygen/main.py data create_queries -d <destination> -e <domain>
This will create a new queries class in the specified domain under the data directory.
Create a Statement Class
To create a new statement class, use the create_statement command under the data group:
python src/tidygen/main.py data create_statement -d <destination> -e <domain>
This will create a new statement class in the specified domain under the data directory.
Directory Structure
The project will generate the following directory structure:
<destination>/
├── app/
│ ├── __init__.py
│ └── <domain>/
│ ├── __init__.py
│ └── <name>.py
├── core/
│ ├── __init__.py
│ └── <domain>/
│ ├── __init__.py
│ └── <name>.py
├── data/
│ ├── __init__.py
│ └── <domain>/
│ ├── __init__.py
│ ├── queries.py
│ └── statements.py
└── entities/
├── __init__.py
License
This project is licensed under the MIT License. See the LICENSE file for details.
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 tidygen-0.0.3.tar.gz.
File metadata
- Download URL: tidygen-0.0.3.tar.gz
- Upload date:
- Size: 2.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.0.1 CPython/3.13.2 Darwin/23.1.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
531ea4ed9be3d48b806eb0861a68d0b0b5ef7cbf207dcee1a3e01bfae0e822cb
|
|
| MD5 |
f8514ff893a1d30a3d901da54c6174a3
|
|
| BLAKE2b-256 |
a085f3bb0dee22e3a270f58eed69fc68fb17e4a302fd175b73bf7d66ad50aed4
|
File details
Details for the file tidygen-0.0.3-py3-none-any.whl.
File metadata
- Download URL: tidygen-0.0.3-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.0.1 CPython/3.13.2 Darwin/23.1.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
613c92cc5bf45e113aa8c1de4059ede96f59a45735badbc8219b7803f9a284e1
|
|
| MD5 |
4451dee479d9848eecd03d0261309be7
|
|
| BLAKE2b-256 |
99f4ae4d5787058f6b2582a03b858c0d7613c4a34bf84e87281588aec1c874ce
|