A lightweight, single-tenant web framework extracted from Frappe
Project description
Monoframe
The Frappe Framework, Distilled.
Monoframe is a lightweight, single-tenant web framework for Python. It takes the powerful metadata-driven engine of Frappe and strips away the multi-tenancy, the "Bench" tool, and the complex deployment architecture.
It is Frappe for developers who want to build one solid application, not manage a hosting platform.
Why Monoframe?
The original Frappe Framework is an engineering marvel, but it was built to run an ERP ecosystem (ERPNext) with hundreds of sites on a single server. This architectural decision brings massive complexity:
- Bloat: A standard install can weigh over 1.8GB.
- Complexity: Requires a custom CLI tool (
bench) just to manage processes. - Obscurity: Database connections rely on HTTP host headers and folder lookups.
Monoframe changes the philosophy:
- No Bench: We use standard Python tooling (
pip,venv,pyproject.toml). - Single Tenant: One application = One Database. Configuration happens in
.env, not in acommon_site_config.jsonburied three folders deep. - Lightweight: We stripped the "platform" code to focus on the "application" code.
Comparison
| Feature | Original Frappe | Monoframe |
|---|---|---|
| Architecture | Multi-Tenant (Sites) | Monolithic (Single App) |
| Process Manager | bench (Custom) |
Standard Python / ASGI |
| Config | JSON files in /sites |
.env file |
| Dependency Mgmt | apps.txt + bench get-app |
requirements.txt / poetry |
| Footprint | Heavy (~1.8GB) | Light (Goal: <200MB) |
| DX | "The Frappe Way" | Standard Python Way |
Quick Start
(Note: Monoframe is currently in active development. These commands are the target DX.)
1. Installation
Monoframe is a standard Python package. You don't need to install a system-wide CLI tool first.
pip install monoframe
2. Create a Project
Generate a clean, flat project structure. No apps folder, no sites folder.
monoframe new my_cool_app
cd my_cool_app
3. Run Development Server
Connects to the DB specified in your .env and starts the server.
monoframe start
# Server running at http://localhost:8000
📂 Project Structure
Monoframe simplifies the directory hierarchy significantly.
Before (Frappe Bench):
frappe-bench/
├── apps/
│ ├── frappe/
│ └── my_app/
├── sites/
│ ├── assets/
│ ├── site1.local/
│ └── common_site_config.json
└── config/
After (Monoframe):
my_cool_app/
├── .env # Database credentials
├── main.py # Entry point
├── pyproject.toml # Dependencies
└── src/
└── doctypes/ # Your data models
└── api/ # Your API endpoints
🛠 Roadmap
- Phase 1: Extraction. Successfully run the Frappe ORM and Desk without
bench. - Phase 2: Cleanup. Remove multi-tenancy code (
frappe.init(site=...)) and site-based routing. - Phase 3: Typing. Add Type Hints to core functions for better VS Code autocompletion.
- Phase 4: Diet. Remove heavy dependencies (PDF generation, Pandas) and make them optional extras.
❤️ Credits
Monoframe is a hard fork of Frappe. We owe everything to the genius of the Frappe team. We aren't trying to replace them; we are offering an alternative path for specific use cases.
License
MIT
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 monoframe-0.0.1.tar.gz.
File metadata
- Download URL: monoframe-0.0.1.tar.gz
- Upload date:
- Size: 10.4 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.22
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9fa444757e71efd5bdadc1304a13ad1b8aa786b132e67f832c34517aef5a4cc7
|
|
| MD5 |
d7e3655a62a30ef28cee48517ea7aaed
|
|
| BLAKE2b-256 |
731837b60fc280a6608f7d703f43ef8117adb2ef3444c93100edc2dd3a97a065
|
File details
Details for the file monoframe-0.0.1-py3-none-any.whl.
File metadata
- Download URL: monoframe-0.0.1-py3-none-any.whl
- Upload date:
- Size: 10.8 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.22
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
192e1430290ba868e515186a1e21bbdc7190a66fffbfaf35d5296bfca83a70ca
|
|
| MD5 |
424195a203e73ba28e89d603c5f95b42
|
|
| BLAKE2b-256 |
5236ad32ee4cac3124252c1ecb8350c1762dc4fcbfc7c194ceac3e4bdca9ce5c
|