PyRails
Convention over configuration web framework for FastAPI. Rails-inspired CLI and structure for Python's async ecosystem.
Installation
# From GitHub
pip install git+https://github.com/yourusername/pyrails.git
# From source
git clone https://github.com/yourusername/pyrails.git
cd pyrails
pip install .
See INSTALL.md for more options.
Quick Start
pyrails new blog
cd blog
pyrails generate model Post title:str body:text
pyrails db:migrate
pyrails server
Visit http://localhost:8000/docs
Commands
pyrails new APP # Create app
pyrails g model NAME ... # Generate model + migration
pyrails g controller NAME # Generate controller
pyrails db:migrate # Run migrations
pyrails server # Start dev server
pyrails console # Interactive REPL
See QUICKSTART.md for full command reference.
Features
- Rails-style CLI with colon notation (
db:migrate) - Interactive app creation with templates
- Auto-generating migrations with models
- Async-first (FastAPI + SQLAlchemy 2.0)
- Convention over configuration
- Multiple templates (blog, chat, SaaS, API)
Templates
- empty - Bare structure
- blog - User + Article
- chat - OpenAI with vanilla JS
- saas - Multi-tenant + Stripe
- api - API-only
Field Types
str, text, int, float, bool, datetime, date, json, references
Example:
pyrails g model Post title:str author:references published:bool
Documentation
- INSTALL.md - Installation guide
- QUICKSTART.md - Quick reference
- CONTRIBUTING.md - Development setup
- CLAUDE.md - Architecture details
- PUBLISHING.md - PyPI publication
Development
git clone https://github.com/yourusername/pyrails.git
cd pyrails
make install # Install with dev dependencies
make test # Run tests
make lint # Lint code
make demo # Create demo app
Testing
# Run test suite
pytest
# Test installation
./test_install.sh
# Test pip install
./test_pip_install.sh
Contributing
See CONTRIBUTING.md
License
MIT
Metadata
Release files for pyrails-mvc 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pyrails_mvc-0.1.0.tar.gz | 45.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pyrails_mvc-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 92.9 kB
Release files / pyrails_mvc-0.1.0.tar.gz
| Download URL | pyrails_mvc-0.1.0.tar.gz |
|---|---|
| Size | 45.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a4e92d23c403fd065e990ae1a286d2f12509962302d2cc33d0038d415abeb6b2
|
|
BLAKE2b-256 checksum How to use checksums |
d6e330b5b01278905d2bf511193c6ee6be911ce11e7a1d71e32d5f2700eab105
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.11
|
Release files / pyrails_mvc-0.1.0-py3-none-any.whl
| Download URL | pyrails_mvc-0.1.0-py3-none-any.whl |
|---|---|
| Size | 47.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2ef5744b4cdee22906ad47e864a5006e600aa844156891e90efa97265b84785a
|
|
BLAKE2b-256 checksum How to use checksums |
0d126df08bdbeca12f41019b5a8269efaecdd778806ebb64c3608b0f8c832d07
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.11
|