Simple to use and fast Gateway for python developers
Project description
Easy-Gateway Documentation
Overview
Easy-Gateway — lightweight API Gateway for microservices architecture.
Features
- Simple YAML configuration
- CLI interface
- Middleware system
- Prefix-based routing
- Rate limiting
- Logging
- Caching
- Admin Panel with Basic Auth
Requirements
- Python ≥ 3.10
- No external dependencies
Installation
pip install easy-gateway
# or
uv add easy-gateway
Configuration (config.yaml)
1. Server Settings
server:
host: "0.0.0.0"
port: 8000
2. Cache Settings
redis:
enabled: true # or false for InMemory Cache
url: "redis://localhost:6379"
expire_time: 500 # cache TTL in seconds (default 180)
To run Redis, you can use Docker:
docker run -d --name my-redis -p 6379:6379 redis
3. Routes
routes:
- path: "/bin/*"
target: "https://httpbin.org/"
description: "Echo Server"
Important:
path: "/user/*"— for URLs with any prefix after userpath: "/user/"— for exact URL match
4. Middleware
Available middleware:
LoggingMiddleware— request loggingRateLimitMiddleware— request rate limiting
middlewares:
- name: "LoggingMiddleware"
enabled: true
- name: "RateLimitMiddleware"
enabled: true
requests_per_minute: 5
5. CORS
cors:
allow_origins:
- "myfront.com"
- "testreact.space"
6. ADMIN
admin:
username: "jack" # by default: admin
password: "2026" # by default: admin
Running
easy-gateway -c PATH-TO-YOUR-CONFIG
# or simply
easy-gateway (if config is in root directory)
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
easy_gateway-0.1.11.tar.gz
(12.0 kB
view details)
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 easy_gateway-0.1.11.tar.gz.
File metadata
- Download URL: easy_gateway-0.1.11.tar.gz
- Upload date:
- Size: 12.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ea60f7dbb5a0ba9cd0ff7a01a17c0ba6a8fb5ce7ecd92d8f474fbe63d2ec16b8
|
|
| MD5 |
63cabdb2815ed5ca8cc6db034e3ef7dd
|
|
| BLAKE2b-256 |
a6533c7eb2357cfc0d2c2c0d7a8efb20265b9eb7ee9af44a9f3016a886a06282
|
File details
Details for the file easy_gateway-0.1.11-py3-none-any.whl.
File metadata
- Download URL: easy_gateway-0.1.11-py3-none-any.whl
- Upload date:
- Size: 13.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
90287677a6b94d1064a2116dae200e7e9e0c00ac948a4c56cba0905ae6f79658
|
|
| MD5 |
18e7d188e6645365d17f01d19192f308
|
|
| BLAKE2b-256 |
ce4c22a6a8f0a0d87b2c550e975633791dfe3c824e4a9403cb72897ad31c93b5
|