Metadata-Version: 2.3
Name: elara-wrapper
Version: 0.0.7
Summary: A FastAPI middleware package to validate requests to Elara agents based on the permissions set in their ENS name.
Requires-Python: >=3.11,<4.0
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Dist: fastapi[standard] (>=0.115.14,<0.116.0)
Requires-Dist: libertai-agents (>=0.1.6,<0.2.0)
Requires-Dist: pydantic (>=2.11.7,<3.0.0)
Requires-Dist: web3 (>=7.12.0,<8.0.0)
Description-Content-Type: text/markdown

# Elara Wrapper

A FastAPI middleware package to validate requests to Elara agents based on the permissions set in their ENS name.

## Installation

```bash
pip install elara-wrapper
```

## Usage

### Basic Usage

```python
import os
from fastapi import FastAPI
from elara_wrapper import add_elara_middleware

app = FastAPI()

# Add the Elara middleware with the agent name automatically injected in Oasis ROFL
middleware = add_elara_middleware(app, os.getenv("ELARA_AGENT_ENS_NAME"))


@app.get("/")
async def root():
    return {"message": "Hello World"}
```

## Development

This package uses Poetry for dependency management:

```bash
poetry install
poetry run python example_usage.py
```

## License

MIT License
