Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rush_api-2.0.0.tar.gz (21.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rush_api-2.0.0-py3-none-any.whl (23.4 kB view details)

Uploaded Python 3

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

Hashes for rush_api-2.0.0.tar.gz
Algorithm Hash digest
SHA256 f2deb20b80929667f508a1b34169429086eeca94d2d764ea774421a9f3f19906
MD5 2ef088ca0b5323921ba81237e935f0d1
BLAKE2b-256 912fba57a19a7b203f579f4b35ed3e5897c58b8242f109ae46b91cd40b7dd9d6

See more details on using hashes here.

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

Hashes for rush_api-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0fabeb06273c18d3d69de84a8d0f9a8b139caafc0b4249001f1141c8b6202bd4
MD5 cfcb4a8e7daca2b0c38ff907a1f37faf
BLAKE2b-256 bbcf169edd465547d61ad5f4649853ba3f284cf9dcd5ac6664d21bf64c1428f3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page