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
- ๐ฏ 8 Framework Templates - FastAPI, Django, Flask, Bottle, Pyramid, Tornado, Sanic, CherryPy
- ๐ฆ Batteries Included - Pre-configured with best practices
- ๐ณ Docker Ready - Includes Dockerfile and docker-compose
- โ Testing Setup - pytest configuration out of the box
- ๐ง Smart Scaffolding - Add models, endpoints, services, middleware with one command
- ๐ Authentication Options - JWT, OAuth2, API Key, Basic Auth
- ๐๏ธ Multiple Databases - PostgreSQL, MySQL, MongoDB, SQLite, Redis
- ๐จ Beautiful CLI - Rich terminal output with progress indicators
- ๐ CI/CD Ready - Generate GitHub Actions, GitLab CI, CircleCI configs
- ๐ Documentation - MkDocs and Sphinx setup
- ๐งช Enhanced Testing - Advanced pytest configs, fixtures, factories
- ๐ Project Validation - Validate project structure and dependencies
- ๐ Dependency Management - Check outdated packages, security audits
- ๐ Environment Management - Multiple environment configurations
- ๐ Makefile Generator - Common development tasks
๐ Available Templates
FastAPI
Modern, fast API framework with automatic documentation
Django
Batteries-included web framework for perfectionists
Flask
Lightweight and flexible web framework
Bottle
Micro web framework - simple and fast
Pyramid
Flexible, scalable web framework
Tornado
Async web framework and networking library
Sanic
Fast async framework built on uvloop
CherryPy
Minimalist Python web framework
All templates include:
- โ Docker support
- โ Database integration
- โ Testing setup (pytest)
- โ Environment configuration
- โ CORS support
- โ Best practices structure
๐ 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 TEMPLATE Framework template (fastapi, django, flask, etc.)
-p, --path PATH Directory path (default: current)
-a, --author TEXT Author name
-d, --description TEXT Project description
--db DATABASE Database type (postgresql, mysql, mongodb, sqlite, redis)
--style STYLE Template style (minimal, standard, full)
--auth AUTH Authentication (jwt, oauth2, apikey, basic)
--license LICENSE License type (mit, apache, gpl, bsd, unlicense)
--gitignore TEMPLATES Gitignore templates (python,venv,pycharm, etc.)
--no-git Skip git initialization
--no-venv Skip virtual environment creation
List Available Templates
projex list
๐ ๏ธ Advanced Commands
Smart Scaffolding
Add components to your project:
# Add a model
projex add model User --fields name:str,email:str,age:int
# Add CRUD endpoints
projex add endpoint users --crud
# Add a service
projex add service email --async
# Add middleware
projex add middleware cors
CI/CD Pipeline Generation
# GitHub Actions
projex add cicd --provider github
# GitLab CI
projex add cicd --provider gitlab
# CircleCI
projex add cicd --provider circle
Environment Management
# Add environment files
projex env add development
projex env add staging
projex env add production
# List environment files
projex env list
# Show environment variables
projex env show .env.development
Dependency Management
# Check outdated packages
projex deps check
# Update packages
projex deps update
# Security audit
projex deps audit
Documentation Setup
# MkDocs (default)
projex add docs --tool mkdocs
# Sphinx
projex add docs --tool sphinx
Testing Enhancements
# Enhanced test configuration
projex add test-config --enhanced
Additional Tools
# Generate Makefile
projex add makefile
# Add quality tools (black, isort, flake8, mypy)
projex add quality-tools
# Validate project
projex validate
# Show project info
projex info
๐ 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
๐ฏ Use Cases
Microservices Architecture
projex create user-service --template fastapi
projex create order-service --template fastapi
projex create payment-service --template fastapi
Full-Stack Application
# Backend API
projex create backend --template fastapi --db postgresql --auth jwt
# Admin Dashboard
projex create admin --template django
Production-Ready API
projex create my-api --template fastapi \
--db postgresql \
--auth jwt \
--style full \
--license mit
cd my-api
projex add cicd --provider github
projex add docs --tool mkdocs
projex add quality-tools
projex env add production
๐บ๏ธ Roadmap
- Multiple framework templates (8 frameworks)
- Database selection (5 databases)
- Authentication options
- CI/CD pipeline generation
- Environment management
- Dependency management
- Documentation setup
- Smart scaffolding system
- Project validation
- Add React/Next.js frontend templates
- Add GraphQL templates
- Add Kubernetes deployment files
- Interactive template customization
- Plugin system for custom templates
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-4.0.0.tar.gz.
File metadata
- Download URL: projex_cli-4.0.0.tar.gz
- Upload date:
- Size: 65.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bae36b6d3601a44b95e621350f89602ce8b16fdba77bcc317da39cef2016e8af
|
|
| MD5 |
5fb80d933c2fe80c68b2eb80015ea717
|
|
| BLAKE2b-256 |
9d1d2b4817c8286e6908c7cbbc79d795f9888f5aaf460f81e6e1051d0e338801
|
File details
Details for the file projex_cli-4.0.0-py3-none-any.whl.
File metadata
- Download URL: projex_cli-4.0.0-py3-none-any.whl
- Upload date:
- Size: 70.8 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 |
6651e2fb135f14c874866fef0469b4658448b42a27acb06d7d423e17829d4d25
|
|
| MD5 |
d3cde66c8465bae036f7576fe4687b2e
|
|
| BLAKE2b-256 |
7bf605fb0edd68110c03bcf7098b27f825e26b2f520fe40a1d0e576f096a3ac2
|