Skip to main content

eep-middleware-python

Python middleware for integrating EEP into FastAPI, Flask, or Django: framework-agnostic EEPServer, auth/DB/event-bus adapters, and router helpers.

Install

From the EEP monorepo:

cd EEP/packages/eep-middleware-python
pip install -e .

Or add as a path dependency in pyproject.toml:

[tool.uv.sources]
eep-middleware-python = { path = "../eep-middleware-python", editable = true }

[project.dependencies]
eep-middleware-python = "*"

Requires Python 3.10+ (see pyproject.toml).

Quickstart (FastAPI)

import os
from fastapi import FastAPI
from eep_middleware import EEPServer
from eep_middleware.fastapi import create_eep_router

app = FastAPI()

server = EEPServer(
    base_url=os.environ.get("EEP_BASE_URL", "https://api.example.com"),
    did=os.environ.get("EEP_DID", "did:web:example.com"),
)
router = create_eep_router(server)
app.include_router(router, prefix="")

Adjust base_url / did to match your deployment and eep-setup.json identity.

Quickstart (Flask)

import os
from flask import Flask
from eep_middleware import EEPServer
from eep_middleware.flask import create_eep_blueprint

app = Flask(__name__)
server = EEPServer(
    base_url=os.environ.get("EEP_BASE_URL", "https://api.example.com"),
    did=os.environ.get("EEP_DID", "did:web:example.com"),
)
app.register_blueprint(create_eep_blueprint(server))

Django

Use get_eep_urlpatterns(server) from eep_middleware.django and include them in your URLconf (see package source for signature).

Adapters

  • Auth: JWTAuthAdapter, APIKeyAuthAdapter
  • DB: InMemoryDBAdapter, PostgresDBAdapter
  • Event bus: InMemoryEventBusAdapter, RedisEventBusAdapter

After setup-cli

See integrate-eep-after-setup-cli.md for aligning generated eep-generated/ artifacts with runtime options.

Test

pytest

License: Apache-2.0.

Metadata

Release files for eep-middleware 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for eep-middleware 0.1.0
File Size Uploaded
eep_middleware-0.1.0.tar.gz 15.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for eep-middleware 0.1.0
File Interpreter ABI Platform
eep_middleware-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 32.1 kB

Release files / eep_middleware-0.1.0.tar.gz

Download URL eep_middleware-0.1.0.tar.gz
Size 15.9 kB
Tags Source
SHA-256 checksum
How to use checksums
6bcac1e3d6b36cc6dc11457f65c611056c492f1b627f8f574f080804c7dab444
BLAKE2b-256 checksum
How to use checksums
39038e892add51a7b9cb2def021a6830fae3db2bad4ef647606dd7949f4e7d9a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 20, 2026.

Transparency log

Release files / eep_middleware-0.1.0-py3-none-any.whl

Download URL eep_middleware-0.1.0-py3-none-any.whl
Size 16.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
93afce009479c915cbf86ba42850b43a748dd46ea885828f1c6bc9d54321030a
BLAKE2b-256 checksum
How to use checksums
354e3365a68a93129f1c0abe122ae4262cd1b7bf2ff684028cfad30b1d05c6c7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 20, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page