One Framework, Every Platform - Web + Desktop in pure Python with Django's power and FastAPI's speed
Project description
███╗ ██╗███████╗██╗ ██╗██╗██╗ ██╗███╗ ███╗
████╗ ██║██╔════╝╚██╗██╔╝██║██║ ██║████╗ ████║
██╔██╗ ██║█████╗ ╚███╔╝ ██║██║ ██║██╔████╔██║
██║╚██╗██║██╔══╝ ██╔██╗ ██║██║ ██║██║╚██╔╝██║
██║ ╚████║███████╗██╔╝ ██╗██║╚██████╔╝██║ ╚═╝ ██║
╚═╝ ╚═══╝╚══════╝╚═╝ ╚═╝╚═╝ ╚═════╝ ╚═╝ ╚═╝
🌟 The Next-Gen Python Web Framework
Combining Django's Batteries with FastAPI's Speed
🚀 What is NEXIUM?
NEXIUM 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 nexium
Create Your First App
nexium new myapp
cd myapp
python main.py
Hello World
from nexium import Nexium
app = Nexium()
@app.get("/")
async def home():
return {"message": "Hello, NEXIUM! 🌟"}
if __name__ == "__main__":
app.run()
That's it! Visit http://localhost:8000 🎉
💪 Why NEXIUM?
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: NEXIUM
| Feature | Django | FastAPI | NEXIUM |
|---|---|---|---|
| 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!
NEXIUM is the ONLY framework that can transform web apps into desktop apps!
from nexium import Nexium
from nexium.desktop import run_as_desktop
app = Nexium()
@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 ❌ NEXIUM ✅
🎨 Features
1. 🏎️ Blazing Fast Async
from nexium import Nexium
app = Nexium()
@app.get("/users/{id}")
async def get_user(id: int):
user = await User.get(id=id)
return user
2. 🗄️ Built-in ORM (DATAVOXEL)
from nexium 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 nexium 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 nexium 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 nexium 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"] = "NEXIUM"
return response
7. 🎯 Dependency Injection
from nexium 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 NEXIUM Ecosystem
NEXIUM 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 NEXIUM!
🔥 Real-World Example
from nexium import Nexium, Model, validate, Field
app = Nexium(
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 ████████████████████
NEXIUM: 19,500 req/s ███████████████████▌
Django: 1,200 req/s █▊
Flask: 2,500 req/s ███▍
NEXIUM 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 NEXIUM
- Real-time Chat App
- Microservices with NEXIUM
🛠️ CLI Commands
# Create new project
nexium new myapp
# Run development server
nexium run
# Show version
nexium version
# Get help
nexium 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 NEXIUM 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 NEXIUM, 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.1.0.tar.gz.
File metadata
- Download URL: omniweb-0.1.0.tar.gz
- Upload date:
- Size: 27.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c06081ca30de2a57909063e5f32f810dc4a347ff125cc8a2b28d17f5a85a26ab
|
|
| MD5 |
8e108a4ab18fa39dfabe99b5d21d8c09
|
|
| BLAKE2b-256 |
23e5d1b910692b65dbd96d0bddfd6b43b30c92fefb676c1caf6ca6ab2dcee280
|
File details
Details for the file omniweb-0.1.0-py3-none-any.whl.
File metadata
- Download URL: omniweb-0.1.0-py3-none-any.whl
- Upload date:
- Size: 19.6 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 |
dfbacb7f4a7397be27a13b6b8a2d7c8f9de1144a2a35173a379fb8c4a3eb4885
|
|
| MD5 |
9f0fce8f13574b66f59872b961fd2821
|
|
| BLAKE2b-256 |
6dec97091fb79a7e1571eaf586d3bb0f0f46d259013ee95af7892a24255be664
|