Skip to main content

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!

Python 3.8+ License: MIT

โœจ 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:

  1. Create a new template configuration in config.py
  2. Add template generation logic in generator.py
  3. 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 string
  • SECRET_KEY - Application secret key
  • DEBUG - Debug mode (True/False)
  • ENVIRONMENT - Environment name (development/production)

๐Ÿค Contributing

Contributions are welcome! Here's how you can help:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. 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

  • Built with Click for CLI
  • Rich for beautiful terminal output
  • Jinja2 for templating

๐Ÿ“ฎ 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

projex_cli-4.0.0.tar.gz (65.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

projex_cli-4.0.0-py3-none-any.whl (70.8 kB view details)

Uploaded Python 3

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

Hashes for projex_cli-4.0.0.tar.gz
Algorithm Hash digest
SHA256 bae36b6d3601a44b95e621350f89602ce8b16fdba77bcc317da39cef2016e8af
MD5 5fb80d933c2fe80c68b2eb80015ea717
BLAKE2b-256 9d1d2b4817c8286e6908c7cbbc79d795f9888f5aaf460f81e6e1051d0e338801

See more details on using hashes here.

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

Hashes for projex_cli-4.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6651e2fb135f14c874866fef0469b4658448b42a27acb06d7d423e17829d4d25
MD5 d3cde66c8465bae036f7576fe4687b2e
BLAKE2b-256 7bf605fb0edd68110c03bcf7098b27f825e26b2f520fe40a1d0e576f096a3ac2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page