TentyPy Builder
Professional Python Project Structure Generator
Create production-ready projects with enterprise-grade architecture in seconds
Installation • Quick Start • Templates • Documentation • Contributing
Overview
TentyPy Builder is a command-line tool designed to scaffold Python projects with professional, production-ready architectures. Stop wasting time on boilerplate and focus on building features.
Key Features
Template Flexibility
- Multiple pre-built templates for common architectures
- Support for both JSON and YAML template formats
- Easy creation of custom templates
Developer Experience
- Interactive CLI with intuitive prompts
- Rich terminal output with progress indicators
- Comprehensive validation and error handling
Production Ready
- Clean Architecture and Domain-Driven Design patterns
- Pre-configured testing and linting setup
- Best practices for scalability and maintainability
Zero Dependencies
- Lightweight core with optional enhancements
- No heavy frameworks required
- Fast installation and execution
Installation
Basic Installation
pip install tentypy-builder
With Optional Features
# YAML template support
pip install tentypy-builder[yaml]
# All features
pip install tentypy-builder[all]
From Source
git clone https://github.com/keniding/tentypy-builder.git
cd tentypy-builder
pip install -e .
Requirements
- Python 3.8 or higher
- pip 20.0 or higher
Quick Start
Interactive Mode
The easiest way to create a new project:
tentypy-builder create -i
This will guide you through:
- Template selection
- Project naming
- Variable configuration
- Project generation
Direct Creation
Create a project with a specific template:
tentypy-builder create my_project -t clean_architecture
With Custom Variables
tentypy-builder create my_api \\
-t fastapi_basic \\
-v AUTHOR="John Doe" \\
-v PYTHON_VERSION=3.11 \\
-v DATABASE=postgresql
Using Custom Templates
tentypy-builder create my_project -c ./my_template.yaml
Available Templates
Clean Architecture
Best for: Enterprise applications, complex business logic
tentypy-builder create my_app -t clean_architecture
Structure:
- Domain layer with entities and value objects
- Application layer with use cases
- Infrastructure layer with repositories
- Presentation layer with controllers
FastAPI Basic
Best for: REST APIs, microservices
tentypy-builder create my_api -t fastapi_basic
Includes:
- FastAPI application setup
- Router structure
- Pydantic models
- Basic middleware configuration
FastAPI Advanced
Best for: Production APIs with database
tentypy-builder create my_api -t fastapi_advanced
Includes:
- SQLAlchemy ORM integration
- Alembic migrations
- Authentication setup
- Docker configuration
Django DDD
Best for: Web applications with complex domains
tentypy-builder create my_web -t django_ddd
Includes:
- Django project structure
- DDD layers implementation
- Custom user model
- Admin configuration
Microservices
Best for: Distributed systems
tentypy-builder create my_service -t microservices
Includes:
- Service isolation
- Event-driven architecture
- API gateway pattern
- Service discovery setup
CLI Commands
List Templates
View all available templates:
tentypy-builder list
Template Information
Get detailed information about a template:
tentypy-builder info fastapi_basic
Validate Template
Validate a custom template file:
tentypy-builder validate my_template.json
Help
tentypy-builder --help
tentypy-builder create --help
Creating Custom Templates
JSON Format
{
"name": "my_template",
"description": "My custom template",
"version": "1.0.0",
"author": "Your Name",
"structure": [
"src/",
"tests/",
{"config": ["settings.py", "__init__.py"]}
],
"files": {
"README.md": "# {{PROJECT_NAME}}\\n\\nCreated by {{AUTHOR}}",
"src/main.py": "def main():\\n pass"
},
"variables": {
"PROJECT_NAME": "my_project",
"AUTHOR": "Unknown",
"PYTHON_VERSION": "3.11"
}
}
YAML Format
name: my_template
description: My custom template
version: 1.0.0
author: Your Name
structure:
- src/
- tests/
- config:
- settings.py
- __init__.py
files:
README.md: |
# {{PROJECT_NAME}}
Created by {{AUTHOR}}
src/main.py: |
def main():
pass
variables:
PROJECT_NAME: my_project
AUTHOR: Unknown
PYTHON_VERSION: "3.11"
Documentation
Project Structure
tentypy-builder/
├── tentypy/
│ ├── builder/
│ │ ├── core/
│ │ │ ├── template_engine.py
│ │ │ ├── file_generator.py
│ │ │ └── validator.py
│ │ ├── templates/
│ │ │ ├── clean_architecture.json
│ │ │ ├── fastapi_basic.json
│ │ │ └── ...
│ │ └── cli.py
│ └── utils/
├── tests/
├── docs/
└── examples/
Architecture
TentyPy Builder follows a modular architecture:
- Template Engine: Loads and processes templates
- File Generator: Creates project structure
- Validator: Ensures template correctness
- CLI: User interface layer
Development
Setup Development Environment
# Clone repository
git clone https://github.com/keniding/tentypy-builder.git
cd tentypy-builder
# Create virtual environment
python -m venv venv
source venv/bin/activate # Linux/Mac
venv\\Scripts\\activate # Windows
# Install development dependencies
pip install -r requirements-dev.txt
pip install -e .
Running Tests
# Run all tests
pytest
# With coverage report
pytest --cov=tentypy --cov-report=html
# Run specific test file
pytest tests/test_builder.py -v
# Run with markers
pytest -m unit
pytest -m integration
Code Quality
# Format code
black tentypy tests
# Lint
flake8 tentypy
# Type checking
mypy tentypy
Building Package
# Build distribution
python -m build
# Check distribution
twine check dist/*
# Upload to TestPyPI
twine upload --repository testpypi dist/*
# Upload to PyPI
twine upload dist/*
Contributing
Contributions are welcome! Please follow these guidelines:
Reporting Issues
- Use the issue tracker for bug reports and feature requests
- Provide detailed information and reproduction steps
- Include Python version and OS information
Pull Requests
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Add tests for new functionality
- Ensure all tests pass
- Update documentation
- Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Development Standards
- Follow PEP 8 style guide
- Write comprehensive tests (maintain >95% coverage)
- Document all public APIs
- Use type hints
- Keep commits atomic and well-described
Changelog
Version 1.0.0 (2024-11-09)
Initial Release
- Core template engine with JSON/YAML support
- Interactive CLI with Rich integration
- Five pre-built templates
- Comprehensive test suite (97% coverage)
- Full documentation
Roadmap
Version 1.1.0
- Web-based template editor
- Template marketplace
- Docker integration
- CI/CD template generation
Version 1.2.0
- VS Code extension
- GitHub integration
- Template versioning
- Dependency management
Version 2.0.0
- Plugin system
- Multi-language support
- Cloud deployment templates
- Advanced customization options
License
This project is licensed under the MIT License - see the LICENSE file for details.
Support
Getting Help
- Documentation: GitHub Wiki
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Email: kenidingh@gmail.com
Security
For security issues, please email kenidingh@gmail.com directly instead of using the issue tracker.
Acknowledgments
Built with:
- Rich - Terminal formatting
- Click - CLI framework
- PyYAML - YAML processing
- pytest - Testing framework
Inspired by:
- cookiecutter
- yeoman
- Clean Architecture principles by Robert C. Martin
Author
Henry Keniding Tarazona Lazaro (Tenty)
- GitHub: @keniding
- Email: kenidingh@gmail.com
Statistics
Made with dedication by Keniding
If this project helped you, please consider giving it a ⭐
Release files for tentypy-builder 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| tentypy_builder-1.0.0.tar.gz | 34.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| tentypy_builder-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 59.2 kB
Release files / tentypy_builder-1.0.0.tar.gz
| Download URL | tentypy_builder-1.0.0.tar.gz |
|---|---|
| Size | 34.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a3243d6102923bf691921f9e199787307426c2619574489fa971ce945bcd99f4
|
|
BLAKE2b-256 checksum How to use checksums |
6919181f413b1d6f07acc1426a09a48906af757684560d3a31b6f5af9a1298b4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.3
|
Release files / tentypy_builder-1.0.0-py3-none-any.whl
| Download URL | tentypy_builder-1.0.0-py3-none-any.whl |
|---|---|
| Size | 25.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
598720e02be43ebb5dda2fdb2d99df3b79bcf5b02151dc77f2520a65c85d6048
|
|
BLAKE2b-256 checksum How to use checksums |
171d6f5819a8c24899d79a4a3f71b807a1456ee7a0b21406834aa7be85b9acb2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.3
|