Skip to main content

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 user
  • path: "/user/" — for exact URL match

4. Middleware

Available middleware:

  • LoggingMiddleware — request logging
  • RateLimitMiddleware — 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


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.7.tar.gz (9.9 kB view details)

Uploaded Source

Built Distribution

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

easy_gateway-0.1.7-py3-none-any.whl (10.7 kB view details)

Uploaded Python 3

File details

Details for the file easy_gateway-0.1.7.tar.gz.

File metadata

  • Download URL: easy_gateway-0.1.7.tar.gz
  • Upload date:
  • Size: 9.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for easy_gateway-0.1.7.tar.gz
Algorithm Hash digest
SHA256 2f680fb57331ca72775f3e9395f87a5b71b35e7ea73dd6a6200b2bd611395dcf
MD5 7d7367df47533883976605305ef71a8d
BLAKE2b-256 549c25ddc45f77c08c89bc13793f434ea95f85d69793347b41e9f12f56adc662

See more details on using hashes here.

File details

Details for the file easy_gateway-0.1.7-py3-none-any.whl.

File metadata

  • Download URL: easy_gateway-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 10.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for easy_gateway-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 8a79881c1941267e33f54941fc3e14b921c49cf02288c200b3a65decdb987565
MD5 b1076edccf42e17c92db748adcd34b6f
BLAKE2b-256 967aaaf6b1abe78b54cff9b50ab0c51fc765cf966c25e40b60f2f9f6b5ec4970

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