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
  • ๐ŸŽฏ 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:

  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

๐Ÿ—บ๏ธ 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

projex_cli-0.1.3.tar.gz (17.9 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-0.1.3-py3-none-any.whl (17.1 kB view details)

Uploaded Python 3

File details

Details for the file projex_cli-0.1.3.tar.gz.

File metadata

  • Download URL: projex_cli-0.1.3.tar.gz
  • Upload date:
  • Size: 17.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for projex_cli-0.1.3.tar.gz
Algorithm Hash digest
SHA256 4976b34377ffb4b5a12a28bf65341ecf53fbe332dfcee6a3ab07b6322a149e95
MD5 93845c2a113fe1c51128b0a47458c59d
BLAKE2b-256 63d9aa00610cd0ce8799e709a5b197b56e998b3cf940053e2171bcfaef7f79d8

See more details on using hashes here.

File details

Details for the file projex_cli-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: projex_cli-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 17.1 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-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 837aa55a2828528d813718c0e2b295b47e82d1e7ee1a7e38131d6eac2ad01ce1
MD5 92162e0af3f87e66995defe01d97b06f
BLAKE2b-256 9eaf72c8b378174f0d9b4edee7934431607348a8c24890862562051de01eb8e6

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