Metadata-Version: 2.1
Name: easy-gateway
Version: 0.2.0
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.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Python: >=3.12
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: fastapi==0.127.0
Requires-Dist: httpx==0.28.1
Requires-Dist: loguru==0.7.3
Requires-Dist: PyYAML==6.0.3
Requires-Dist: redis==7.1.0
Requires-Dist: uvicorn[standard]==0.40.0
Requires-Dist: uvloop==0.22.1
Provides-Extra: test
Requires-Dist: pytest; extra == "test"
Requires-Dist: pytest-asyncio; extra == "test"
Requires-Dist: httpx; extra == "test"

# Easy-Gateway

[![Python](https://img.shields.io/badge/python-3.12%2B-blue)](https://www.python.org)
[![Tests](https://img.shields.io/github/actions/workflow/status/MarkLevkovich/easy_gateway/test.yml?branch=main&label=tests)](https://github.com/MarkLevkovich/easy_gateway/actions)
[![License](https://img.shields.io/badge/license-MIT-green)](./LICENSE)

Lightweight API Gateway for microservices architectures.

> **Current status:** Early MVP – functional, but expect rough edges.

### Features (MVP)

- YAML-based configuration, zero code changes for routing
- Prefix & exact path routing
- Redis-backed per-route caching with automatic invalidation on mutations
- Built-in middleware: rate limiting, request logging
- CORS support
- Simple admin panel with Basic Auth
- CLI tool: `easy-gateway`

### Quick Start

```bash
pip install easy-gateway
```

Create a minimal `gateway.yaml`:

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

routes:
  - path: "/api/*"
    target: "https://httpbin.org"

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

Start the gateway:

```bash
easy-gateway -c gateway.yaml
```

Requests to `http://localhost:8000/api/anything` are now proxied to `https://httpbin.org/anything`.

### Run with Docker

Build the image and run the gateway:

```bash
docker build -t easy-gateway .
docker run -p 8000:8000 \
  -e CONFIG_PATH=example_config.yaml \
  easy-gateway
```

The config path is controlled by the `CONFIG_PATH` env var (defaults to `/easy-gateway/easy_conf.yaml`). If the file is missing, the gateway reports it on startup.

### Documentation

Full configuration reference, caching details, admin panel usage, and production examples are in the **[Wiki](https://github.com/MarkLevkovich/easy_gateway/wiki)**.

### Requirements

- Python 3.12+
- Redis (optional, only required for caching)

### Contributing

This project is in early development. Issues, suggestions, and pull requests are welcome.

### License

MIT
