Skip to main content

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

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


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.15.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

elara_wrapper-0.0.15-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file elara_wrapper-0.0.15.tar.gz.

File metadata

  • Download URL: elara_wrapper-0.0.15.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.1 CPython/3.13.1 Darwin/24.5.0

File hashes

Hashes for elara_wrapper-0.0.15.tar.gz
Algorithm Hash digest
SHA256 dd4299e4db0695ba35c02c4711f5809e53b54df7b806aac6c9f65515a2c11404
MD5 c04c425f3446a0a228ad6a2c627b6ffa
BLAKE2b-256 bed3ac303e24d0fa226c05fb172480f17a37c31fb91748fa1b6345d8061d1639

See more details on using hashes here.

File details

Details for the file elara_wrapper-0.0.15-py3-none-any.whl.

File metadata

  • Download URL: elara_wrapper-0.0.15-py3-none-any.whl
  • Upload date:
  • Size: 4.4 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

Hashes for elara_wrapper-0.0.15-py3-none-any.whl
Algorithm Hash digest
SHA256 dfc99ad919f6e611018c87fcd155fa46c3411f57c5acd02063fce0ab467f52c5
MD5 e9be6d61a9d1ab46ab94ab990adf23d2
BLAKE2b-256 ab6cd6b0d329944a49a85b4352021bcaf1b0782890895b0e48bc8a9810eaae0f

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