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.5.tar.gz (2.6 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.5-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: elara_wrapper-0.0.5.tar.gz
  • Upload date:
  • Size: 2.6 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.5.tar.gz
Algorithm Hash digest
SHA256 72d6d1d70472fbedcd775a51898f00a7ef6e000a84222134b7657c953082d654
MD5 c18f7a63da841bebde653ea15b768372
BLAKE2b-256 2a073907c572b0bf48d86027c54e5234960fa247bd6ce9be8f426ca140f3e44e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: elara_wrapper-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 3.9 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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 a3a59b62c0bfc78001260bdee60998de9a64f0a92ffa25452699b256d27d0967
MD5 b7af87e5f1534275313a7c2ae7ac6a3d
BLAKE2b-256 a730e5b2de77af4aed998fd65126504f27842beb2744c148838ed8e11461aa2d

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