A powerful CLI tool to generate Python project boilerplates
Project description
๐จ Projex
A powerful CLI tool to generate production-ready Python project boilerplates instantly. Skip the boring setup and jump straight into coding!
โจ Features
- ๐ Quick Setup - Generate complete project structures in seconds
- ๐ฏ Multiple Templates - FastAPI, Django, and Flask templates
- ๐ฆ Batteries Included - Pre-configured with best practices
- ๐ณ Docker Ready - Includes Dockerfile and docker-compose
- โ Testing Setup - pytest configuration out of the box
- ๐ง Customizable - Easy to modify and extend
- ๐จ Beautiful CLI - Rich terminal output with progress indicators
๐ Available Templates
FastAPI
Modern, fast API framework with automatic documentation
- โ Async/await support
- โ Automatic API docs (Swagger UI)
- โ Pydantic models for validation
- โ SQLAlchemy ORM integration
- โ Alembic migrations
- โ JWT authentication ready
- โ Docker support
Django
Batteries-included web framework for perfectionists
- โ Django REST Framework
- โ Admin panel
- โ ORM with migrations
- โ Custom user model ready
- โ CORS headers configured
- โ Environment variables
- โ pytest-django setup
Flask
Lightweight and flexible web framework
- โ Flask-RESTful
- โ Flask-SQLAlchemy
- โ Flask-Migrate
- โ JWT authentication
- โ CORS support
- โ Blueprints structure
- โ Config management
๐ Installation
From PyPI (recommended)
pip install projex
From Source
git clone https://github.com/ChAbdulWahhab/projex.git
cd projex
pip install -e .
๐ป Usage
Interactive Mode (Recommended)
projex create
The CLI will guide you through the project creation process with interactive prompts.
Quick Start with Arguments
# Create a FastAPI project
projex create my-api --template fastapi --author "Your Name"
# Create a Django project
projex create my-site --template django --description "My awesome site"
# Create a Flask project
projex create my-app --template flask
Command Options
projex create [PROJECT_NAME] [OPTIONS]
Options:
-t, --template [fastapi|django|flask] Project template type
-p, --path PATH Directory path (default: current)
-a, --author TEXT Author name
-d, --description TEXT Project description
--no-git Skip git initialization
--no-venv Skip virtual environment creation
--help Show help message
List Available Templates
projex list
๐ Generated Project Structure
FastAPI
my-api/
โโโ app/
โ โโโ __init__.py
โ โโโ main.py
โ โโโ core/
โ โ โโโ config.py
โ โ โโโ database.py
โ โโโ api/
โ โ โโโ v1/
โ โ โโโ router.py
โ โ โโโ endpoints/
โ โโโ models/
โ โโโ schemas/
โโโ tests/
โ โโโ test_main.py
โโโ .env.example
โโโ .gitignore
โโโ Dockerfile
โโโ docker-compose.yml
โโโ requirements.txt
โโโ requirements-dev.txt
โโโ README.md
Django
my-site/
โโโ config/
โ โโโ settings.py
โ โโโ urls.py
โ โโโ wsgi.py
โ โโโ asgi.py
โโโ apps/
โ โโโ core/
โ โโโ models.py
โ โโโ views.py
โ โโโ urls.py
โ โโโ tests.py
โโโ manage.py
โโโ .env.example
โโโ .gitignore
โโโ Dockerfile
โโโ docker-compose.yml
โโโ requirements.txt
โโโ README.md
Flask
my-app/
โโโ app/
โ โโโ __init__.py
โ โโโ config.py
โ โโโ api/
โ โ โโโ __init__.py
โ โ โโโ routes.py
โ โโโ models/
โโโ tests/
โ โโโ test_api.py
โโโ run.py
โโโ .env.example
โโโ .gitignore
โโโ Dockerfile
โโโ docker-compose.yml
โโโ requirements.txt
โโโ README.md
๐ฏ Quick Start After Generation
FastAPI
cd my-api
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txt
uvicorn app.main:app --reload
# Visit http://localhost:8000/docs for API documentation
Django
cd my-site
source venv/bin/activate
pip install -r requirements.txt
python manage.py migrate
python manage.py runserver
# Visit http://localhost:8000/admin
Flask
cd my-app
source venv/bin/activate
pip install -r requirements.txt
python run.py
# Visit http://localhost:5000
๐ณ Docker Support
All templates come with Docker support:
# Build and run with docker-compose
docker-compose up --build
# Or use Docker directly
docker build -t my-project .
docker run -p 8000:8000 my-project
โ Testing
All projects include pytest configuration:
# Install dev dependencies
pip install -r requirements-dev.txt
# Run tests
pytest
# Run with coverage
pytest --cov=app tests/
๐ง Customization
Adding Custom Templates
You can extend Projex by adding your own templates:
- Create a new template configuration in
config.py - Add template generation logic in
generator.py - Update the CLI to include your template
Modifying Existing Templates
Edit the template generation methods in generator.py:
_generate_fastapi()_generate_django()_generate_flask()
๐ Environment Variables
All generated projects use .env files for configuration. Copy .env.example to .env and update with your values:
cp .env.example .env
Common variables:
DATABASE_URL- Database connection stringSECRET_KEY- Application secret keyDEBUG- Debug mode (True/False)ENVIRONMENT- Environment name (development/production)
๐ค Contributing
Contributions are welcome! Here's how you can help:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Development Setup
# Clone the repository
git clone https://github.com/ChAbdulWahhab/projex.git
cd projex
# Create virtual environment
python -m venv venv
source venv/bin/activate
# Install in editable mode with dev dependencies
pip install -e .
pip install -r requirements-dev.txt
# Run tests
pytest
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ Acknowledgments
๐ฎ Contact
Ch Abdul Wahhab Project Link: https://github.com/ChAbdulWahhab/projex
๐บ๏ธ Roadmap
- Add React/Next.js frontend templates
- Add GraphQL templates
- Add microservices architecture templates
- Add CI/CD pipeline configurations
- Add Kubernetes deployment files
- Interactive template customization
- Plugin system for custom templates
- Project template marketplace
Made with โค๏ธ by developers, for developers
Project details
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 projex_cli-0.1.1.tar.gz.
File metadata
- Download URL: projex_cli-0.1.1.tar.gz
- Upload date:
- Size: 17.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
29044442724e92a7e6c825a125df688f2ad41b3cdac391ae6a6119a32f5c9aad
|
|
| MD5 |
3ed2d7167448102ade4a3c9e7c61d2be
|
|
| BLAKE2b-256 |
f9c22bf5dced31ad8c434e4e634841d1bde5e6218787832e33d1694b5a70eeed
|
File details
Details for the file projex_cli-0.1.1-py3-none-any.whl.
File metadata
- Download URL: projex_cli-0.1.1-py3-none-any.whl
- Upload date:
- Size: 16.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1f548638ec7d6f0711bff5bedbf2aa2dc7610b8dacc98cb5f5fe86061a33128e
|
|
| MD5 |
918dc52f5ae15903e16c3fd88927202d
|
|
| BLAKE2b-256 |
05ce1fca5bf272803a96e2833d60634a4486c0e6c340d65a6f80240e6914015e
|