Easy-Gateway — lightweight API Gateway for microservices architecture.
- Simple YAML configuration
- CLI interface
- Middleware system
- Prefix-based routing
- Rate limiting
- Logging
- Caching
- Admin Panel with Basic Auth
- Python ≥ 3.10
- No external dependencies
pip install easy-gateway
# or
uv add easy-gatewayserver:
host: "0.0.0.0"
port: 8000redis:
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 redisroutes:
- path: "/bin/*"
target: "https://httpbin.org/"
description: "Echo Server"Important:
path: "/user/*"— for URLs with any prefix after userpath: "/user/"— for exact URL match
Available middleware:
LoggingMiddleware— request loggingRateLimitMiddleware— request rate limiting
middlewares:
- name: "LoggingMiddleware"
enabled: true
- name: "RateLimitMiddleware"
enabled: true
requests_per_minute: 5cors:
allow_origins:
- "myfront.com"
- "testreact.space"admin:
username: "jack" # by default: admin
password: "2026" # by default: admineasy-gateway -c PATH-TO-YOUR-CONFIG
# or simply
easy-gateway (if config is in root directory)