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
Requirements
- Python ≥ 3.7
- No external dependencies
Version
v0.1.7
Installation
pip install 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"
Running
easy-gateway -c PATH-TO-YOUR-CONFIG
# or
easy-gateway --config
# or simply
easy-gateway (if config is in root directory)
Project Structure
easy-gateway-docs/
├── index.html # HTML documentation page
├── script.js # JavaScript for navigation and code copying
├── styles.css # Styles (dark theme)
└── README.md # This file
Links
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.9.tar.gz
(11.3 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.9.tar.gz.
File metadata
- Download URL: easy_gateway-0.1.9.tar.gz
- Upload date:
- Size: 11.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bc6d19dfee66f09dfabf6ccf8e7dba386b99a277c0222b8a689d0a324eae8493
|
|
| MD5 |
26603351f3d8e6f1eeadb86774360134
|
|
| BLAKE2b-256 |
7d7fb6eddda7b902f475476a304aa42e4ca569414e8a308a3ddaac9108500b75
|
File details
Details for the file easy_gateway-0.1.9-py3-none-any.whl.
File metadata
- Download URL: easy_gateway-0.1.9-py3-none-any.whl
- Upload date:
- Size: 12.6 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 |
8243ce3a9db67f5e8127d6d87801151e2ebf887f160162be558186770cc85fce
|
|
| MD5 |
ca81f2cf5bc0b61a0bdb46a0ad48694a
|
|
| BLAKE2b-256 |
7f34be0e8ec8e8f04088080b3b17c08b91c6c9c74b123d2e89c7dad216e3b08c
|