Create Structure is a Python tool designed to help developers quickly generate file and folder structures based on an outline provided in a text file. It simplifies the process of organizing projects, creating Python classes, and generating __init__.py files automatically.
With this tool, you can easily:
- Generate a project structure with folders and files.
- Automatically create Python class files with a basic class template.
- Generate
__init__.pyfiles that import classes for easier module management. - Creating a
setup.pyfile. - Creating a
README.mdfile. - Creating a
LICENSEfile.
- Flexible Input: Provide a text file that outlines the structure of your project.
- Automatic Class Creation: Automatically creates Python class templates in
.pyfiles. - Init File Generation: Automatically generates
__init__.pyfiles for importing modules. - Setup File Generation: Automatically generates
setup.pyfile, The file is generated with ready-to-use content for installation. - Cross-Platform: Works on Windows, Linux, and macOS.
You can install the tool directly from source or by using pip.
git clone https://github.com/hemaabokila/create_structure.git
cd create_structure
python install .pip install create_strucAfter installing the tool, you can run it directly from the command line.
Syntax:
ceartes <path_to_outline_file>1- Example: Create a text file, e.g., structure.txt:
src/
main.py
utils.py
tests/
test_main.py
test_utils.py2- Run the command:
ceartes structure.txt3- The tool will generate the following structure:
├── src/
│ ├── main.py
│ ├── utils.py
│ └── __init__.py
├── tests/
│ ├── test_main.py
│ ├── test_utils.py
│ └── __init__.py
├── README.md
├── setup.py
└── LICENSEfile (Required): Path to the outline text file that specifies the project structure.
ceartes my_structure.txt1- Reads the outline from a text file.
2- Creates directories and files based on the provided structure.
3- For Python files:
- Adds a basic class template.
- Generates init.py files for importing classes in submodules.
If you clone or download the repository, here’s what the directory structure looks like:
create_structure/
├── structure/ # Core functionality of the tool
│ ├── main.py # Main entry point of the tool
│ └── __init__.py
├── setup.py # Setup script for packaging
├── LICENSE # MIT License file
├── README.md # Documentation file
└── tests/ # Unit tests for the toolThis project is licensed under the MIT License.
See the LICENSE file for more details.
Developed by Ibrahem abo kila.