Skip to main content

Professional API project generator for Python - Flask, FastAPI, Django-Rest

Project description

๐Ÿš€ vyte - Rapid Development Tool

Vyte Logo

Professional API project generator for Python. Create production-ready REST APIs in seconds.

PyPI version Python Version License: MIT Code style: black Tests codecov Pre-commit Ruff
Documentation


โœจ Features

  • ๐ŸŽฏ Multiple Frameworks: Flask-Restx, FastAPI, Django-Rest
  • ๐Ÿ—„๏ธ Multiple ORMs: SQLAlchemy, TortoiseORM, Peewee, Django ORM
  • ๐Ÿ’พ Database Support: PostgreSQL, MySQL, SQLite
  • ๐Ÿ” JWT Authentication: Secure authentication out of the box
  • ๐Ÿณ Docker Ready: Complete Docker and docker-compose setup
  • ๐Ÿงช Testing Suite: Pytest with coverage reports
  • ๐Ÿ“š Auto Documentation: Swagger/OpenAPI automatic docs
  • โšก Modern Stack: Python 3.11+, Pydantic v2, async support
  • ๐ŸŽจ Beautiful CLI: Rich terminal UI with interactive setup

๐Ÿš€ Quick Start

Installation

# Using pip
pip install vyte

# Using pipx (recommended)
pipx install vyte

# From source
git clone https://github.com/PabloDomi/Vyte.git
cd vyte
pip install -e .

Create Your First Project

# Interactive mode (recommended)
vyte create

# Or specify options directly
vyte create \
  --name my-api \
  --framework FastAPI \
  --orm SQLAlchemy \
  --database PostgreSQL

What You Get

my-api/
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ __init__.py          # App factory
โ”‚   โ”œโ”€โ”€ main.py              # Entry point
โ”‚   โ”œโ”€โ”€ config/
โ”‚   โ”‚   โ””โ”€โ”€ config.py        # Pydantic settings
โ”‚   โ”œโ”€โ”€ models/
โ”‚   โ”‚   โ””โ”€โ”€ models.py        # Database models
โ”‚   โ”œโ”€โ”€ routes/
โ”‚   โ”‚   โ””โ”€โ”€ routes_example.py
โ”‚   โ”œโ”€โ”€ services/
โ”‚   โ””โ”€โ”€ security.py          # JWT & security
โ”œโ”€โ”€ tests/
โ”‚   โ”œโ”€โ”€ test_api.py
โ”‚   โ”œโ”€โ”€ test_models.py
โ”‚   โ””โ”€โ”€ conftest.py
โ”œโ”€โ”€ requirements.txt
โ”œโ”€โ”€ requirements-dev.txt
โ”œโ”€โ”€ Dockerfile
โ”œโ”€โ”€ docker-compose.yml
โ”œโ”€โ”€ .env.example
โ”œโ”€โ”€ .gitignore
โ”œโ”€โ”€ pytest.ini
โ””โ”€โ”€ README.md

๐Ÿ“– Usage

Interactive Mode

The easiest way to create a project:

vyte create

Follow the prompts to configure your project.

Command Line Options

vyte create \
  --name my-api \
  --framework FastAPI \
  --orm SQLAlchemy \
  --database PostgreSQL \
  --auth \
  --docker \
  --tests \
  --git

Available Commands

# Create new project
vyte create

# Show framework information
vyte info FastAPI

# List all frameworks and ORMs
vyte list

# Show dependencies for configuration
vyte deps FastAPI --orm SQLAlchemy

# Validate existing project
vyte validate ./my-api

# Open documentation
vyte docs

# Show version
vyte --version

๐ŸŽฏ Supported Combinations

Framework Compatible ORMs Async Support
Flask-Restx SQLAlchemy, Peewee โŒ Sync
FastAPI SQLAlchemy (async), TortoiseORM โœ… Async
Django-Rest Django ORM โŒ Sync

๐Ÿ”ง Configuration

Projects use Pydantic Settings for configuration:

# .env file
DATABASE_URL=postgresql://user:pass@localhost:5432/mydb
JWT_SECRET_KEY=your-secret-key-here
ENVIRONMENT=development
DEBUG=True

๐Ÿงช Testing

Generated projects include complete testing setup:

# Run tests
pytest

# With coverage
pytest --cov=src --cov-report=html

# Open coverage report
open htmlcov/index.html

๐Ÿณ Docker Support

Run your project with Docker:

# Build and run
docker-compose up -d

# View logs
docker-compose logs -f

# Stop
docker-compose down

๐Ÿ“š Documentation

๐Ÿค Contributing

Contributions are welcome! Please read our Contributing Guide.

# Clone repo
git clone https://github.com/PabloDomi/Vyte.git
cd vyte

# Setup development environment
pip install -e ".[dev]"
pip install pre-commit black ruff isort

# Install pre-commit hooks
pre-commit install

# Run tests
pytest

# Format code
make format

# Run linters
make lint

# Run full CI suite
make ci

๐Ÿ—บ๏ธ Roadmap

Check out our Roadmap to see what's planned for future releases!

Coming in v2.1.0:

  • vyte upgrade - Upgrade existing projects
  • vyte add-model - Add models to projects
  • Customizable templates
  • MongoDB support

๐Ÿ“ License

MIT License - see LICENSE file for details.

๐Ÿ™ Acknowledgments

๐Ÿ“Š Project Stats

  • Test Coverage: 73%
  • Code Quality: A+ (Ruff, Black)
  • Security: Scanned with Bandit
  • Python Versions: 3.11, 3.12, 3.13
  • Platforms: Linux, macOS, Windows

๐Ÿ“ง Contact


Made with โค๏ธ by Pablo Domรญnguez Blanco

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

vyte-2.0.5.tar.gz (98.3 kB view details)

Uploaded Source

Built Distribution

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

vyte-2.0.5-py3-none-any.whl (121.8 kB view details)

Uploaded Python 3

File details

Details for the file vyte-2.0.5.tar.gz.

File metadata

  • Download URL: vyte-2.0.5.tar.gz
  • Upload date:
  • Size: 98.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for vyte-2.0.5.tar.gz
Algorithm Hash digest
SHA256 39534342a62c8e8d1d1abe68b604a7f7caf3c23ae95c060d4b25f6bff727c3ac
MD5 af98be9010a74cbdbd0ce92d61da623b
BLAKE2b-256 0ceaf905ea49afdcb73e5ab74e990e9b0dd738149d3c2da14a5ad4f4dc73bf4a

See more details on using hashes here.

File details

Details for the file vyte-2.0.5-py3-none-any.whl.

File metadata

  • Download URL: vyte-2.0.5-py3-none-any.whl
  • Upload date:
  • Size: 121.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for vyte-2.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 0524211587269a60241f88ad357057af4942093740afbe195043f029c366e085
MD5 408beb6dd5f9bc1a5a893ca00f915ddf
BLAKE2b-256 9ac39ab2d56fe5b5fde78f96f52146465fa0414135ea3e2888324f232a7f21b2

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