Rails-style Python MVC framework: Starlette + SQLAlchemy, generators, Redis cache, security, admin.
Project description
PythonMVC
Rails-style, batteries-included PythonMVC: Starlette + SQLAlchemy, generators, migrations, Redis cache, security middleware (HSTS/CSRF/ratelimit), and a minimal admin — with convention over configuration.
Status: v0.2.x (developer preview)
✨ Features
- Fast ASGI app (Starlette) + clean MVC conventions
- Generators:
pmvc new,pmvc generate model|controller|scaffold - ORM & Migrations: SQLAlchemy 2.x + Alembic
- Multi-DB (SQL): SQLite / PostgreSQL / MySQL
- Caching: Redis (async)
- Security: HSTS, X-Frame-Options, nosniff, CSRF token cookie, simple rate limit
- Admin (minimal):
/adminlists models (CRUD roadmap)
🚀 Quickstart
pip install -e .
# create a new app
pmvc new blog --database=sqlite
# or
pmvc new blog --database=postgresql
pmvc new blog --database=mysql
cd blog
# configure (examples)
export DATABASE_URL=sqlite:///db/app.db
# export DATABASE_URL=postgresql+psycopg://user:pass@localhost:5432/blog
# export DATABASE_URL=mysql+pymysql://user:pass@localhost:3306/blog
export CACHE_URL=redis://localhost:6379/0
# init schema (SQL backends)
pmvc db init
pmvc db migrate "init"
pmvc db upgrade
# run
pmvc server
# visit http://127.0.0.1:8000/posts and /admin
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pmvc-0.0.1.tar.gz.
File metadata
- Download URL: pmvc-0.0.1.tar.gz
- Upload date:
- Size: 40.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
48d67d33d544fb9162a0213c08bdfd61b03e97949aa9e2bff849c9b2afffb0fa
|
|
| MD5 |
5ec55398b545bc78026572bc388ea131
|
|
| BLAKE2b-256 |
13f90987a497111de43d02d53ffc11f7335e79f28f7161545b97f9c93d9e64c6
|
File details
Details for the file pmvc-0.0.1-py3-none-any.whl.
File metadata
- Download URL: pmvc-0.0.1-py3-none-any.whl
- Upload date:
- Size: 20.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5ba2555e2b56099821340aa84b6c363ea0bec55336fca618f7496bfe534584ed
|
|
| MD5 |
6d9571effe0d6b19253e53d9b51aa363
|
|
| BLAKE2b-256 |
32edd6fb7b7f76a63dc8e814ee53b7295903d4433654700be7a8c30b459920be
|