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.10.tar.gz (2.7 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.10-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: elara_wrapper-0.0.10.tar.gz
  • Upload date:
  • Size: 2.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

Hashes for elara_wrapper-0.0.10.tar.gz
Algorithm Hash digest
SHA256 adabe0aadf855b45f6ae9bc72ec7e89427fe151e5518ab30b6bd249ad8256e9c
MD5 7ef9c57be96a3250245a7e1f3b99f4c1
BLAKE2b-256 d05ad5f11f9fe52dd906f117c2316b4672e4a82d1164d76357e5f06c47151cc8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: elara_wrapper-0.0.10-py3-none-any.whl
  • Upload date:
  • Size: 4.0 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.10-py3-none-any.whl
Algorithm Hash digest
SHA256 88ee4de1e6beff6b9304e0b7ba177e9c209bf6ea9b6dc9fd0146c3be2700e39f
MD5 2e02cc6d383214f9d30ae9d192ef0e83
BLAKE2b-256 5b7281e33ac16492917be7b1e008631c5e60b11ee5f74603600ba3fcf0951ec7

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