Socket
Book a DemoInstallSign in
Socket

pyrails-mvc

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pyrails-mvc

Rails-inspired web framework for FastAPI

pipPyPI
Version
0.1.0
Maintainers
1

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

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

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts