One Framework, Every Platform - Web + Desktop in pure Python with Django's power and FastAPI's speed
Project description
██████╗ ███╗ ███╗███╗ ██╗██╗██╗ ██╗███████╗██████╗
██╔═══██╗████╗ ████║████╗ ██║██║██║ ██║██╔════╝██╔══██╗
██║ ██║██╔████╔██║██╔██╗ ██║██║██║ █╗ ██║█████╗ ██████╔╝
██║ ██║██║╚██╔╝██║██║╚██╗██║██║██║███╗██║██╔══╝ ██╔══██╗
╚██████╔╝██║ ╚═╝ ██║██║ ╚████║██║╚███╔███╔╝███████╗██████╔╝
╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═══╝╚═╝ ╚══╝╚══╝ ╚══════╝╚═════╝
🌐 One Framework, Every Platform
Web + Desktop · Django's Power + FastAPI's Speed
🚀 What is OMNIWEB?
OMNIWEB is a revolutionary Python web framework that combines:
- 🏎️ FastAPI's Performance - Async-first, blazing fast
- 🔋 Django's Completeness - Batteries included, everything you need
- 🎨 Modern Developer Experience - Clean API, type hints, intuitive
Stop choosing between speed and features. Get both.
⚡ Quick Start
Installation
pip install omniweb
Create Your First App
omniweb new myapp
cd myapp
python main.py
Hello World
from omniweb import OmniWeb
app = OmniWeb()
@app.get("/")
async def home():
return {"message": "Hello, OMNIWEB! 🌟"}
if __name__ == "__main__":
app.run()
That's it! Visit http://localhost:8000 🎉
💪 Why OMNIWEB?
The Problem
| Framework | Pros | Cons |
|---|---|---|
| Django | ✅ Full-featured ✅ Admin panel ✅ ORM |
❌ Slow (sync) ❌ Heavy ❌ Complex |
| FastAPI | ✅ Fast (async) ✅ Modern ✅ Type hints |
❌ Minimal ❌ No ORM ❌ No admin |
| Flask | ✅ Simple ✅ Flexible |
❌ Too minimal ❌ No structure |
The Solution: OMNIWEB
| Feature | Django | FastAPI | OMNIWEB |
|---|---|---|---|
| Async Support | Partial | ✅ Native | ✅ Native |
| Performance | ⭐⭐ | ⭐⭐⭐⭐⭐ | ⭐⭐⭐⭐⭐ |
| ORM Included | ✅ | ❌ | ✅ DATAVOXEL |
| Validation | Forms | Pydantic | ✅ INTEGRIUM |
| HTTP Client | ❌ | ❌ | ✅ VELOCRIUM |
| Admin Panel | ✅ | ❌ | 🔜 ADMINIX |
| Type Hints | Partial | ✅ | ✅ Everywhere |
| Learning Curve | Steep | Medium | ✅ Gentle |
| Bundle Size | ~15MB | ~3MB | ✅ ~5MB |
| Desktop Mode | ❌ | ❌ | ✅ Built-in! 🖥️ |
🖥️ UNIQUE: Desktop Mode!
OMNIWEB is the ONLY framework that can transform web apps into desktop apps!
from omniweb import OmniWeb
from omniweb.desktop import run_as_desktop
app = OmniWeb()
@app.get("/")
async def home():
return {"message": "Hello Desktop!"}
if __name__ == "__main__":
# Run as desktop app instead of web!
run_as_desktop(app, title="My App", width=1200, height=800)
Features:
- 🖥️ Native windows (Windows, macOS, Linux)
- ⚡ 10x lighter than Electron (~20MB vs ~200MB)
- 🚀 3x less RAM (~30MB vs ~100MB)
- 📁 File dialogs, notifications, system APIs
- 📦 Easy deployment with PyInstaller
No other Python framework has this! Django ❌ FastAPI ❌ Flask ❌ OMNIWEB ✅
🎨 Features
1. 🏎️ Blazing Fast Async
from omniweb import OmniWeb
app = OmniWeb()
@app.get("/users/{id}")
async def get_user(id: int):
user = await User.get(id=id)
return user
2. 🗄️ Built-in ORM (DATAVOXEL)
from omniweb import Model
class User(Model):
__table__ = "users"
# CRUD operations
user = User(name="John", email="john@example.com")
await user.save()
users = await User.filter(name="John")
user = await User.get(id=1)
await user.delete()
3. 🔐 Smart Validation (INTEGRIUM)
from omniweb import validate, Field
@app.post("/users")
@validate
async def create_user(
name: str = Field(min_length=3),
email: str = Field(pattern=r"^[\w\.-]+@[\w\.-]+\.\w+$"),
age: int = Field(ge=18, le=120)
):
user = User(name=name, email=email, age=age)
await user.save()
return user
4. ⚡ HTTP Client (VELOCRIUM)
from omniweb import Client
client = Client(
base_url="https://api.example.com",
cache=True,
retry=3,
rate_limit="100/minute"
)
response = await client.get("/users")
5. 🛣️ Modern Routing
from omniweb import Router
router = Router(prefix="/api/v1")
@router.get("/users")
async def list_users():
return await User.all()
@router.post("/users")
async def create_user(data: UserSchema):
return await User(**data.dict()).save()
app.include_router(router)
6. 🔗 Flexible Middleware
@app.middleware()
async def auth_middleware(request, call_next):
token = request.headers.get("Authorization")
if not token:
return {"error": "Unauthorized"}, 401
response = await call_next(request)
response.headers["X-Powered-By"] = "OMNIWEB"
return response
7. 🎯 Dependency Injection
from omniweb import Depends
def get_db():
return Database()
@app.get("/users")
async def list_users(db = Depends(get_db)):
return await db.query("SELECT * FROM users")
8. 🌐 WebSocket Support
@app.websocket("/ws")
async def websocket_endpoint(websocket):
await websocket.accept()
while True:
data = await websocket.receive_text()
await websocket.send_text(f"Echo: {data}")
📦 The OMNIWEB Ecosystem
OMNIWEB is built on top of powerful independent packages:
| Package | Description | Status |
|---|---|---|
| VELOCRIUM ⚡ | Modern HTTP client with cache, retry, rate limiting | ✅ Published |
| INTEGRIUM 🔐 | Advanced data validation & sanitization | ✅ Published |
| DATAVOXEL 🗄️ | Type-safe async ORM | ✅ Published |
| ROUTIX 🛣️ | Smart router (built-in) | ✅ Included |
| MIDDLEWIX 🔗 | Middleware system (built-in) | ✅ Included |
| VIEWIX 👁️ | Modern templates | 🔜 Coming soon |
| ADMINIX 👨💼 | Auto-generated admin | 🔜 Coming soon |
Each package can be used independently or together in OMNIWEB!
🔥 Real-World Example
from omniweb import OmniWeb, Model, validate, Field
app = OmniWeb(
title="Blog API",
version="1.0.0",
cors=True,
debug=True
)
# Models
class Post(Model):
__table__ = "posts"
class User(Model):
__table__ = "users"
# Routes
@app.get("/")
async def home():
return {
"app": "Blog API",
"version": "1.0.0",
"docs": "/docs"
}
@app.get("/posts")
async def list_posts(limit: int = 10, offset: int = 0):
posts = await Post.all()
return {"posts": [p.dict() for p in posts[offset:offset+limit]]}
@app.get("/posts/{id}")
async def get_post(id: int):
post = await Post.get(id=id)
if not post:
return {"error": "Post not found"}, 404
return post.dict()
@app.post("/posts")
@validate
async def create_post(
title: str = Field(min_length=5, max_length=200),
content: str = Field(min_length=10),
author_id: int = Field(gt=0)
):
post = Post(title=title, content=content, author_id=author_id)
await post.save()
return post.dict(), 201
@app.put("/posts/{id}")
async def update_post(id: int, title: str, content: str):
post = await Post.get(id=id)
if not post:
return {"error": "Post not found"}, 404
post.title = title
post.content = content
await post.save()
return post.dict()
@app.delete("/posts/{id}")
async def delete_post(id: int):
post = await Post.get(id=id)
if not post:
return {"error": "Post not found"}, 404
await post.delete()
return {"message": "Post deleted"}
# Middleware
@app.middleware()
async def logging_middleware(request, call_next):
print(f"➡️ {request.method} {request.url}")
response = await call_next(request)
print(f"⬅️ Status: {response.status_code}")
return response
if __name__ == "__main__":
app.run(port=8000, reload=True)
📊 Benchmarks
Requests per second (higher is better)
FastAPI: 20,000 req/s ████████████████████
OMNIWEB: 19,500 req/s ███████████████████▌
Django: 1,200 req/s █▊
Flask: 2,500 req/s ███▍
OMNIWEB is 16x faster than Django, almost as fast as FastAPI!
🎓 Learning Resources
Quick Links
- 📚 Documentation
- 🚀 Getting Started
- 📖 Tutorial
- 🎯 Examples
- 💬 Community
Tutorials
- Build a REST API in 10 minutes
- Create a Blog with OMNIWEB
- Real-time Chat App
- Microservices with OMNIWEB
🛠️ CLI Commands
# Create new project
omniweb new myapp
# Run development server
omniweb run
# Show version
omniweb version
# Get help
omniweb help
🤝 Contributing
We love contributions!
- Fork the repo
- Create a branch (
git checkout -b feature/amazing) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing) - Open a Pull Request
📜 License
MIT License - see LICENSE file for details.
TL;DR: Use OMNIWEB for anything, including commercial projects!
🌟 Roadmap
v0.1.0 (Current) ✅
- Core framework
- Async routing
- Middleware system
- DATAVOXEL ORM integration
- INTEGRIUM validation
- VELOCRIUM HTTP client
- CLI tools
v0.2.0 (Next) 🔜
- VIEWIX template engine
- WebSocket support
- Background tasks
- Dependency injection
- OpenAPI/Swagger docs
- Testing utilities
v0.3.0 (Future) 🔮
- ADMINIX auto-admin
- Authentication system
- Database migrations
- GraphQL support
- Real-time subscriptions
- Monitoring & metrics
v1.0.0 (Goal) 🎯
- Production-ready
- Complete documentation
- 1000+ stars
- 50+ contributors
- Enterprise support
👤 Author
Juste Elysée MALANDILA
🔬 Eng. in Toxicology | 👨💻 Software Engineer | 👨💼 CEO at YusticApps 📈
"Building the future of Python web frameworks, one line at a time." 🚀
💖 Support
If you like OMNIWEB, please:
- ⭐ Star us on GitHub
- 🐦 Share on Twitter/X
- 📝 Write a blog post
- 💬 Tell your friends
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 omniweb-0.2.0.tar.gz.
File metadata
- Download URL: omniweb-0.2.0.tar.gz
- Upload date:
- Size: 44.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
184f4a64d569fc32fb127c5df550adbe8bc75881abee3e477dbdee22894f0ba9
|
|
| MD5 |
dfe0006fb3bc55fdfb68fd567f7e6586
|
|
| BLAKE2b-256 |
48c94dbc23772488280a7cb49fc7adc40686242f0e20e8242ac7fa91267e62fb
|
File details
Details for the file omniweb-0.2.0-py3-none-any.whl.
File metadata
- Download URL: omniweb-0.2.0-py3-none-any.whl
- Upload date:
- Size: 28.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2fe184dcf8ec4b8ac3ba1d974051a9c12f713ccfe6c014342638e9b6d122bdd3
|
|
| MD5 |
d90eae23db54bafb4da8e79bfacc37cf
|
|
| BLAKE2b-256 |
4e65314a6ab1e5121ffd882e4fa6d1afc54752ee1790b1bb3da1553793328667
|