Zero-Dependency AI-Native Protocol Framework. Replaces requests, FastAPI, and BeautifulSoup.
Project description
RUSH ๐
The Zero-Dependency, AI-Native Protocol Framework for Python
RUSH is a complete HTTP framework that replaces requests, FastAPI, and BeautifulSoup with zero external dependencies. It is designed for the future of the web: Autonomous AI Agents.
๐ Features
| Feature | Description |
|---|---|
| Zero Dependencies | Works with pure Python. No pip install required. |
| Full HTTP Control | GET, POST, PUT, DELETE, PATCH with custom headers. |
| Stealth Mode | Anti-blocking: User-Agent rotation, Jitter, Auto-429 handling. |
| Enterprise Ready | Middleware, Scheduler, Strict Mode for production. |
| Agent Protocol | Semantic messaging (Intent, Context) for AI-to-AI communication. |
| Discovery Mesh | Agents find each other automatically via UDP Beacons. |
| Cryptographic Trust | HMAC-SHA256 signed messages for identity verification. |
โก Quick Start
1. Basic HTTP Client (Replace requests)
from rush import Rush
app = Rush()
# Simple GET
data = app.get("https://jsonplaceholder.typicode.com/todos/1")
print(data)
# POST with JSON
resp = app.post("https://api.example.com/data", json={"key": "value"})
print(resp.json())
2. Stealth Mode (Anti-Blocking)
from rush import Rush
# Enable Stealth: Auto User-Agent rotation, Jitter, 429 handling
app = Rush(stealth=True)
data = app.get("https://protected-api.com/data")
3. HTTP Server (Replace FastAPI)
from rush import Rush
app = Rush()
@app.route("/api/hello")
def hello():
return {"message": "Hello from RUSH!"}
app.start(port=8000)
4. Enterprise Features
from rush import Rush
app = Rush(strict_mode=True)
# Middleware (Logging, Auth)
def log_request(request):
print(f"[LOG] {request.method} {request.path}")
app.add_middleware(log_request)
# Scheduled Tasks (Background Jobs)
def backup():
print("Running backup...")
app.schedule(backup, interval_seconds=3600)
app.start(port=8000)
5. AI Agent Mode (The Future)
from rush import Rush
# Enable Agent Mode for AI-to-AI communication
agent = Rush(agent_mode=True)
@agent.route("/api/status")
def status():
return {"agent_id": agent.agent_id, "status": "online"}
agent.start(port=9000, background=True)
# Agents discover each other automatically via UDP Beacons
# Then they communicate using signed semantic messages
๐ Project Structure
project_rush/
โโโ rush.py # Main SDK Entry Point
โโโ core/
โ โโโ rush_http.py # Raw HTTP Client (Zero-Dep)
โ โโโ rush_client.py # High-Level Client (Caching, Retry, Stealth)
โ โโโ rush_server.py # Custom HTTP Server (Thread Pool, DDoS Protection)
โ โโโ rush_router.py # Routing & Middleware
โ โโโ rush_parser.py # HTML Parser (BeautifulSoup replacement)
โ โโโ rush_protocol.py # Semantic Message Format (Intent, Context)
โ โโโ rush_discovery.py# Agent Discovery (UDP Beacon)
โ โโโ rush_trust.py # Cryptographic Signatures (HMAC-SHA256)
โโโ examples/
โ โโโ magic_demo.py # Quick Demo
โ โโโ full_control_demo.py # All HTTP Methods
โ โโโ stealth_demo.py # Anti-Blocking Demo
โ โโโ enterprise_demo.py # Middleware & Scheduler
โ โโโ ai_mesh_demo.py # Agent-to-Agent Communication
โโโ static/ # Static Files for Server
โโโ tests/ # Unit Tests
โโโ README.md # This File
โโโ USAGE.md # Detailed Usage Guide
โโโ requirements.txt # Empty (Zero Dependencies!)
โโโ setup.py # For pip install
โโโ Dockerfile # For Docker Deployment
๐ก๏ธ Security Features
- Header Injection Prevention: All header values are sanitized.
- Anti-Slowloris: Connection timeout (5s) prevents slow attacks.
- Thread Pool: Limits concurrent connections to prevent DoS.
- Request Size Limit: 10MB max to prevent memory exhaustion.
- HMAC Signatures: Agent messages are cryptographically signed.
๐ Comparison
| Feature | REST (requests + FastAPI) | RUSH |
|---|---|---|
| Dependencies | 50+ packages | 0 |
| Stealth/Anti-Block | โ | โ |
| Background Scheduler | External (Celery) | โ Built-in |
| Middleware | Complex ASGI | โ Simple |
| AI Agent Protocol | โ | โ |
| Discovery Mesh | โ | โ |
๐ Deployment
Docker
docker build -t rush-app .
docker run -p 8000:8000 rush-app
Local
python rush.py
# Or run any example:
python examples/magic_demo.py
๐ค Author
Rushabh Mavani
๐ง rushabhmavani01@gmail.com
๐ License
MIT License - Use it, modify it, build the future with it.
Built for the Age of AI Agents. ๐ค
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 rush_api-2.0.0.tar.gz.
File metadata
- Download URL: rush_api-2.0.0.tar.gz
- Upload date:
- Size: 21.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f2deb20b80929667f508a1b34169429086eeca94d2d764ea774421a9f3f19906
|
|
| MD5 |
2ef088ca0b5323921ba81237e935f0d1
|
|
| BLAKE2b-256 |
912fba57a19a7b203f579f4b35ed3e5897c58b8242f109ae46b91cd40b7dd9d6
|
File details
Details for the file rush_api-2.0.0-py3-none-any.whl.
File metadata
- Download URL: rush_api-2.0.0-py3-none-any.whl
- Upload date:
- Size: 23.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0fabeb06273c18d3d69de84a8d0f9a8b139caafc0b4249001f1141c8b6202bd4
|
|
| MD5 |
cfcb4a8e7daca2b0c38ff907a1f37faf
|
|
| BLAKE2b-256 |
bbcf169edd465547d61ad5f4649853ba3f284cf9dcd5ac6664d21bf64c1428f3
|