No project description provided
Project description
Elara Wrapper
A FastAPI middleware package to validate requests to Elara agents based on the permissions set in their ENS name.
Installation
pip install elara-wrapper
Usage
Basic Usage
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:
poetry install
poetry run python example_usage.py
License
MIT License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
elara_wrapper-0.0.1.tar.gz
(1.7 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file elara_wrapper-0.0.1.tar.gz.
File metadata
- Download URL: elara_wrapper-0.0.1.tar.gz
- Upload date:
- Size: 1.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.0.1 CPython/3.13.1 Darwin/24.5.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9895f98fe28543a83391c8ce524b2567ba4b4303e135fb31d56bd25b0e35a098
|
|
| MD5 |
d5ead4c11c9a21bc1bf08d4fa7ab43be
|
|
| BLAKE2b-256 |
3d5ac8509d1a677af146e9533938d8c4986030f44214eaec095c6bc14444688e
|
File details
Details for the file elara_wrapper-0.0.1-py3-none-any.whl.
File metadata
- Download URL: elara_wrapper-0.0.1-py3-none-any.whl
- Upload date:
- Size: 2.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.0.1 CPython/3.13.1 Darwin/24.5.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6da4762722a4d94912f27d3b9fa991c1e122874919edf50738b405ed9c49a8b4
|
|
| MD5 |
35c9b0fb0c9c9b6f5cd99b4142b8da6b
|
|
| BLAKE2b-256 |
e4048eb84242a4c2aa8cc69d50d365c47b8dff9d1b660653d5937172b356d5cb
|