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
  • Admin Panel with Basic Auth

Requirements

  • Python ≥ 3.10
  • No external dependencies

Installation

pip install easy-gateway
# or
uv add easy-gateway

Configuration (easy_conf.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"

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


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.13.tar.gz (12.4 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.13-py3-none-any.whl (13.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: easy_gateway-0.1.13.tar.gz
  • Upload date:
  • Size: 12.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for easy_gateway-0.1.13.tar.gz
Algorithm Hash digest
SHA256 89c2c6ee76d49ee85941f390884357c2b2cafd8905693174b158f7995e5d6c76
MD5 a5311deeaeb5266a2f7aaf4dd0e643f9
BLAKE2b-256 20e5fdd02280ae44636f2ccc4f9275d31ef0355d3e6b10ce5b7096999fe53b59

See more details on using hashes here.

File details

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

File metadata

  • Download URL: easy_gateway-0.1.13-py3-none-any.whl
  • Upload date:
  • Size: 13.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for easy_gateway-0.1.13-py3-none-any.whl
Algorithm Hash digest
SHA256 f49ee66505f0c61069a9cb7038b840e140ea20915c0ee6655e62cdcf6209ab45
MD5 722d1bf6dc73d29cd8bfe2ca5cea336a
BLAKE2b-256 c4f4fc8ec4f2a20c0d2d6d2c5bbd2a90e44f6f8d6d13259f889f50622b8350ea

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