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.0.tar.gz (17.8 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.0-py3-none-any.whl (16.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: projex_cli-0.1.0.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

Hashes for projex_cli-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2c6c42079e0f7e84eaf3094229544cddb3f5e48d4109f4494a47771d07f3fc2c
MD5 be266c52bde84e61e7ee8c81d67c666e
BLAKE2b-256 672cce6e035db527586294c0d9710df3af9baaa0ae4cfb6eb50e0bd3da40c184

See more details on using hashes here.

File details

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

File metadata

  • Download URL: projex_cli-0.1.0-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

Hashes for projex_cli-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 414caf053d998d0a10fdeb040527a801113663690ed60fc886dd7545148f0c0e
MD5 302f8b69a5343ea8a68f3f6423d4049f
BLAKE2b-256 a3908b33d25985dbeb81a5ffe669033d0e1e5ac22f84c6683ef7e255949ebccf

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