Skip to main content

composer-inspired Python web framework scaffolding tool

Project description

๐Ÿš€ AMEN CLI icon

PyPI Version License Python Versions GitHub Stars GitHub Issues GitHub Forks GitHub Last Commit GitHub Contributors GitHub Code Size GitHub Repo Size

A laravel installer inspired Python Web Application Scaffolding Tool that helps you create web applications with ease!

โœจ Features

  • ๐ŸŽฏ Interactive project setup wizard
  • ๐Ÿ”ง Multiple framework support:
    • Flask - Lightweight WSGI framework
    • FastAPI - Modern, fast API framework
    • Bottle - Simple micro web framework ๐Ÿšง
    • Pyramid - Flexible web framework ๐Ÿšง
  • ๐ŸŽจ Project templates for both web apps and APIs
  • ๐Ÿ—๏ธ Modular project structure (see below)
  • ๐Ÿ”„ Automatic virtual environment setup
  • ๐Ÿ“ฆ Dependency management
  • ๐Ÿ—๏ธ Structured project scaffolding
  • ๐Ÿงช Test scaffolding with pytest
  • ๐Ÿ”„ Update checker for the CLI
  • ๐Ÿš€ Command to run your application

๐Ÿ› ๏ธ Installation

pip install amen-cli

๐Ÿ“– Usage

# Create a new project
amen create

# You can also use flags to specify the framework, type, and name:
amen create -f flask -t webapp -n myapp

# Available options:
# -f, --framework   Framework to use (flask, fastapi, bottle, pyramid)
# -t, --type        Type of application (webapp, api)
# -n, --name        Name of the application

# If flags are not provided, the interactive prompts will be used.

# Follow the interactive prompts to:
# 1. Select a framework
# 2. Choose application type (webapp/api)
# 3. Name your project

Additional Commands

# Run your application
amen run <app_name>

# Example:
amen run myapp

# Run tests for your application
amen test <app_name>

# Example:
amen test myapp

# Check for updates to the CLI
amen check-update

# Manage project configuration
amen config <app_name>

# Example:
amen config myapp

๐ŸŒŸ Project Structure

When you create a project, AMEN now generates a modular structure:

your-app/
โ”œโ”€โ”€ venv/                   # Virtual environment
โ”œโ”€โ”€ your-app/               # Main application package
โ”‚   โ”œโ”€โ”€ api/                # API endpoints (endpoints.py)
โ”‚   โ”œโ”€โ”€ auth/               # Authentication (token.py, etc.)
โ”‚   โ”œโ”€โ”€ models/             # Models module
โ”‚   โ”œโ”€โ”€ static/             # Static files (CSS, JS, images)
โ”‚   โ”‚   โ”œโ”€โ”€ uploads/
โ”‚   โ”‚   โ”œโ”€โ”€ css/
โ”‚   โ”‚   โ””โ”€โ”€ js/
โ”‚   โ”œโ”€โ”€ templates/          # HTML templates (if webapp)
โ”‚   โ””โ”€โ”€ app.py / main.py    # Main application file (Flask: app.py, FastAPI: main.py)
โ”œโ”€โ”€ tests/                  # Test files
โ”œโ”€โ”€ docs/                   # Documentation
โ”œโ”€โ”€ requirements.txt        # Python dependencies
โ”œโ”€โ”€ .env                    # Environment variables (local)
โ”œโ”€โ”€ .env.example            # Environment variables template
โ”œโ”€โ”€ .gitignore              # Git ignore rules
โ”œโ”€โ”€ run.py                  # Application runner
โ””โ”€โ”€ README.md               # This file
  • Flask: Uses app.py and registers a blueprint from api/endpoints.py. Token authentication is in auth/token.py.
  • FastAPI: Uses main.py and includes a router from api/endpoints.py. Token authentication is in auth/token.py.
  • Webapp: Includes HTML templates and static files. FastAPI mounts static and template directories.
  • API: Generates only API endpoints and disables template/static mounting.

๐ŸŽฏ Supported Frameworks

Framework Description Default Port Status
Flask Lightweight WSGI web framework 5000 โœ…
FastAPI Modern, fast web framework 8000 โœ…
Django High-level Python web framework 8000 โŒ
Bottle Fast, simple micro framework 8080 ๐Ÿšง
Pyramid Flexible web framework 6543 ๐Ÿšง

Work in Progress

Currently implementing support for additional web frameworks:

  • Bottle: Integration in development
  • Pyramid: Initial implementation phase

These frameworks will enable:

  • Route mapping and handling
  • Request/response processing
  • Middleware integration
  • Template rendering support

Check back for updates or follow the project's issues for implementation progress. Contributions are welcome!

Note: For now, please use our stable implementations for Flask or FastAPI.

๐Ÿš— Quick Start

# Install AMEN CLI
pip install amen-cli

# Create a new project
amen create

# Follow the interactive prompts

# Navigate to your project
cd your-project-name

# Activate virtual environment
source venv/bin/activate  # Linux/Mac
venv\Scripts\activate     # Windows

# Run your application
python run.py
Or
#Before you cd into your project you can run the following 
amen run <appname>

๐Ÿ”ง Development

# Clone the repository
git clone https://github.com/taqsblaze/amen-cli.git

# Install for development and testing
pip install -e .
pip install pytest pytest-cov

# Run tests
pytest

# Run tests with coverage
pytest --cov

๐Ÿค Contributing

Contributions are welcome! Here's how:

  1. Fork the repository
  2. Create your feature branch: git checkout -b feature/amazing-feature
  3. Make your changes
  4. Push to the branch: git push origin feature/amazing-feature
  5. Open a Pull Request

๐Ÿ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ‘ฅ Contact & Support

โญ Credits

Created by Tanaka Chinengundu
Inspired by Laravel's elegant development experience


Made with โค๏ธ by Tanaka Chinengundu

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

amen_cli-0.4.2.tar.gz (22.5 kB view details)

Uploaded Source

Built Distribution

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

amen_cli-0.4.2-py3-none-any.whl (21.7 kB view details)

Uploaded Python 3

File details

Details for the file amen_cli-0.4.2.tar.gz.

File metadata

  • Download URL: amen_cli-0.4.2.tar.gz
  • Upload date:
  • Size: 22.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for amen_cli-0.4.2.tar.gz
Algorithm Hash digest
SHA256 b8fceef8e05eea4c767b6a5da250cd64523d8a59c215aab3b509a150a1e20a2c
MD5 1c1b39d34424ce818bb2d147f4a21f5f
BLAKE2b-256 31587b5adcab39fbda0a98c92decb5301548144658e0c7be6ef0f87c0e48e5f1

See more details on using hashes here.

File details

Details for the file amen_cli-0.4.2-py3-none-any.whl.

File metadata

  • Download URL: amen_cli-0.4.2-py3-none-any.whl
  • Upload date:
  • Size: 21.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for amen_cli-0.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a7ea346832097261441416a59e3d778738b9304d5fc0993d7723e8f48c970189
MD5 b554b37f7285b10e65334793542e33a4
BLAKE2b-256 1dcb4bf603bc80bf4d618e2f6ec4acfb417b5addde15163e5367ee642d005c39

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