# 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
```bash
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
Raw data
{
"_id": null,
"home_page": null,
"name": "pmvc",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": "alembic, cli, mvc, python, redis, scaffold, sqlalchemy, starlette, web-framework",
"author": null,
"author_email": "Muhammad Waleed Khalid <muhammadwaleedkhalid1999@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/13/f9/0987a497111de43d02d53ffc11f7335e79f28f7161545b97f9c93d9e64c6/pmvc-0.0.1.tar.gz",
"platform": null,
"description": "# PythonMVC\n\nRails-style, batteries-included **PythonMVC**: Starlette + SQLAlchemy, generators, migrations, Redis cache, security middleware (HSTS/CSRF/ratelimit), and a minimal admin \u2014 with **convention over configuration**.\n\n> Status: v0.2.x (developer preview)\n\n## \u2728 Features\n- **Fast ASGI** app (Starlette) + **clean MVC** conventions\n- **Generators**: `pmvc new`, `pmvc generate model|controller|scaffold`\n- **ORM & Migrations**: SQLAlchemy 2.x + Alembic\n- **Multi-DB (SQL)**: SQLite / PostgreSQL / MySQL\n- **Caching**: Redis (async)\n- **Security**: HSTS, X-Frame-Options, nosniff, CSRF token cookie, simple rate limit\n- **Admin (minimal)**: `/admin` lists models (CRUD roadmap)\n\n## \ud83d\ude80 Quickstart\n```bash\npip install -e .\n\n# create a new app\npmvc new blog --database=sqlite\n# or\npmvc new blog --database=postgresql\npmvc new blog --database=mysql\n\ncd blog\n\n# configure (examples)\nexport DATABASE_URL=sqlite:///db/app.db\n# export DATABASE_URL=postgresql+psycopg://user:pass@localhost:5432/blog\n# export DATABASE_URL=mysql+pymysql://user:pass@localhost:3306/blog\nexport CACHE_URL=redis://localhost:6379/0\n\n# init schema (SQL backends)\npmvc db init\npmvc db migrate \"init\"\npmvc db upgrade\n\n# run\npmvc server\n# visit http://127.0.0.1:8000/posts and /admin\n",
"bugtrack_url": null,
"license": "Apache-2.0",
"summary": "Rails-style Python MVC framework: Starlette + SQLAlchemy, generators, Redis cache, security, admin.",
"version": "0.0.1",
"project_urls": {
"Homepage": "https://github.com/PythonMVC/pythonmvc",
"Issues": "https://github.com/PythonMVC/pythonmvc/issues"
},
"split_keywords": [
"alembic",
" cli",
" mvc",
" python",
" redis",
" scaffold",
" sqlalchemy",
" starlette",
" web-framework"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "32edd6fb7b7f76a63dc8e814ee53b7295903d4433654700be7a8c30b459920be",
"md5": "6d9571effe0d6b19253e53d9b51aa363",
"sha256": "5ba2555e2b56099821340aa84b6c363ea0bec55336fca618f7496bfe534584ed"
},
"downloads": -1,
"filename": "pmvc-0.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "6d9571effe0d6b19253e53d9b51aa363",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 19987,
"upload_time": "2025-10-27T14:26:44",
"upload_time_iso_8601": "2025-10-27T14:26:44.387614Z",
"url": "https://files.pythonhosted.org/packages/32/ed/d6fb7b7f76a63dc8e814ee53b7295903d4433654700be7a8c30b459920be/pmvc-0.0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "13f90987a497111de43d02d53ffc11f7335e79f28f7161545b97f9c93d9e64c6",
"md5": "5ec55398b545bc78026572bc388ea131",
"sha256": "48d67d33d544fb9162a0213c08bdfd61b03e97949aa9e2bff849c9b2afffb0fa"
},
"downloads": -1,
"filename": "pmvc-0.0.1.tar.gz",
"has_sig": false,
"md5_digest": "5ec55398b545bc78026572bc388ea131",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 40642,
"upload_time": "2025-10-27T14:27:46",
"upload_time_iso_8601": "2025-10-27T14:27:46.097540Z",
"url": "https://files.pythonhosted.org/packages/13/f9/0987a497111de43d02d53ffc11f7335e79f28f7161545b97f9c93d9e64c6/pmvc-0.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-10-27 14:27:46",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "PythonMVC",
"github_project": "pythonmvc",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "pmvc"
}