Socket
Book a DemoInstallSign in
Socket

pmvc

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

pmvc

Rails-style Python MVC framework: Starlette + SQLAlchemy, generators, Redis cache, security, admin.

pipPyPI
Version
0.0.1
Maintainers
1

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): /admin lists 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

Keywords

alembic

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