A Python CLI template boilerplate generator
Reason this release was yanked:
didnt work due to incorrect pyproject toml
Project description
Gentem
A Python CLI template boilerplate generator for quickly scaffolding Python projects.
Features
- Project Scaffolding: Generate Python projects with a single command
- Multiple Project Types: Support for library, CLI tool, and script projects
- FastAPI Templates: Pre-configured FastAPI project templates with optional database support
- Opinionated Structure: Best practices baked into every template
- Interactive Preview:
--dry-runoption to preview before creating files
Installation
pip install gentem
Or install from source:
git clone https://github.com/gentem/gentem.git
cd gentem
pip install -e .
Usage
Creating a New Project
# Create a library project
gentem new mylib --type library
# Create a CLI tool project
gentem new mycli --type cli
# Create a simple script project
gentem new myscript --type script
# With author and description
gentem new mylib --type library --author "John Doe" --description "My library"
# With license
gentem new mylib --type library --license mit
gentem new mylib --type library --license apache
gentem new mylib --type library --license gpl
# Preview without creating files
gentem new mylib --type library --dry-run
Creating a FastAPI Project
# Create a basic FastAPI project
gentem fastapi myapi
# Create with async mode and lifespan
gentem fastapi myapi --async
# Create with database support (asyncpg)
gentem fastapi myapi --db asyncpg
# Combine options
gentem fastapi myapi --async --db asyncpg --author "John Doe"
Project Structure
Library Template
mylib/
├── src/
│ └── mylib/
│ ├── __init__.py
│ └── core.py
├── tests/
│ ├── __init__.py
│ └── test_core.py
├── pyproject.toml
├── README.md
├── LICENSE
└── .gitignore
FastAPI Template
myapi/
├── src/
│ └── myapi/
│ ├── __init__.py
│ ├── main.py # FastAPI application
│ ├── core/
│ │ ├── __init__.py
│ │ ├── config.py # Settings
│ │ └── exceptions.py # Custom exceptions
│ ├── deps/
│ │ └── __init__.py # Dependencies
│ ├── utils/
│ │ └── __init__.py # Utility functions
│ ├── v1/
│ │ ├── __init__.py
│ │ └── apis/
│ │ ├── __init__.py
│ │ └── routes.py # API routes
│ ├── services/
│ │ └── __init__.py # Business logic
│ ├── schemas/
│ │ └── __init__.py # Pydantic schemas
│ └── models/
│ └── __init__.py # SQLAlchemy models
├── .env
├── requirements.txt
├── .gitignore
└── README.md
Development
# Install development dependencies
pip install -e ".[dev]"
# Run tests
pytest
# Format code
black .
ruff check --fix .
# Type checking
mypy .
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
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 gentem-0.1.2.tar.gz.
File metadata
- Download URL: gentem-0.1.2.tar.gz
- Upload date:
- Size: 22.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
df38fa65f728164cbfc8aabc73fd492e02ecd60b36bdf1696a6a0fd0400e36bd
|
|
| MD5 |
4f66306698464cac3cc3e9c6b2ad478c
|
|
| BLAKE2b-256 |
5b05bb1e6bf9ac89844664b1426235931b0ea8bf6ef1c49614118d013e607ede
|
File details
Details for the file gentem-0.1.2-py3-none-any.whl.
File metadata
- Download URL: gentem-0.1.2-py3-none-any.whl
- Upload date:
- Size: 3.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
716d47ff012ac6af0c393f1643f14faf775559fcc73c47ecedd87de3488f152b
|
|
| MD5 |
73f530a2323557470d057b5c78b32be3
|
|
| BLAKE2b-256 |
a69304ce5d484555435478a271e7722a4085a6025bc92f3618f98117c731ebf7
|