Metadata-Version: 2.1
Name: easy-gateway
Version: 0.1.12
Summary: Simple to use and fast Gateway for python developers
Author-email: Mark <levmarkpost@gmail.com>
License: MIT
Project-URL: Homepage, https://github.com/MarkLevkovich/easy_gateway
Keywords: api,gateway,fastapi,proxy,microservices
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: annotated-doc==0.0.4
Requires-Dist: annotated-types==0.7.0
Requires-Dist: anyio==4.12.0
Requires-Dist: art==6.5
Requires-Dist: asttokens==3.0.1
Requires-Dist: build>=1.4.2
Requires-Dist: certifi==2025.11.12
Requires-Dist: click==8.3.1
Requires-Dist: colorama==0.4.6
Requires-Dist: executing==2.2.1
Requires-Dist: fastapi==0.127.0
Requires-Dist: fastapi-cache2==0.2.2
Requires-Dist: h11==0.16.0
Requires-Dist: httpcore==1.0.9
Requires-Dist: httptools==0.7.1
Requires-Dist: httpx==0.28.1
Requires-Dist: icecream==2.1.8
Requires-Dist: idna==3.11
Requires-Dist: loguru==0.7.3
Requires-Dist: markdown-it-py==4.0.0
Requires-Dist: mdurl==0.1.2
Requires-Dist: pendulum==3.1.0
Requires-Dist: pydantic==2.12.5
Requires-Dist: pydantic_core==2.41.5
Requires-Dist: Pygments==2.19.2
Requires-Dist: python-dateutil==2.9.0.post0
Requires-Dist: python-dotenv==1.2.1
Requires-Dist: PyYAML==6.0.3
Requires-Dist: redis==7.1.0
Requires-Dist: rich==14.2.0
Requires-Dist: ruff>=0.15.9
Requires-Dist: six==1.17.0
Requires-Dist: starlette==0.50.0
Requires-Dist: twine>=6.2.0
Requires-Dist: typing-inspection==0.4.2
Requires-Dist: typing_extensions==4.15.0
Requires-Dist: tzdata==2025.3
Requires-Dist: uvicorn[standard]==0.40.0
Requires-Dist: uvloop==0.22.1
Requires-Dist: watchfiles==1.1.1
Requires-Dist: websockets==15.0.1
Provides-Extra: test
Requires-Dist: pytest; extra == "test"
Requires-Dist: pytest-asyncio; extra == "test"
Requires-Dist: pytest-cov; extra == "test"
Requires-Dist: httpx; extra == "test"

# 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

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

---

## Configuration (easy_conf.yaml)

### 1. Server Settings

```yaml
server:
    host: "0.0.0.0"
    port: 8000
```

### 2. Cache Settings

```yaml
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:
```bash
docker run -d --name my-redis -p 6379:6379 redis
```

### 3. Routes

```yaml
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

```yaml
middlewares:
  - name: "LoggingMiddleware"
    enabled: true

  - name: "RateLimitMiddleware"
    enabled: true
    requests_per_minute: 5
```

### 5. CORS

```yaml
cors:
  allow_origins:
    - "myfront.com"
    - "testreact.space"
```

### 6. ADMIN
```yaml
admin:
  username: "jack" # by default: admin
  password: "2026" # by default: admin
```

---

## Running

```bash
easy-gateway -c PATH-TO-YOUR-CONFIG
# or simply
easy-gateway  (if config is in root directory)
```
---
