Integrations

edri.integrations.* is the home for first-party, opt-in integrations with third-party libraries (an ORM, an LLM framework, …). Bundling those libraries into core EDRI would force the dependency on every user, so they live here under a shared contract.

The contract

  • Each integration's dependency is a setuptools extra, not a core requirement — install it explicitly, e.g. pip install edri[sqlalchemy].

  • import edri never imports anything from edri.integrations, so the optional dependency stays optional. You import the specific module yourself.

  • If the extra is missing, importing the module raises a clear ImportError naming the extra to install — not a bare ModuleNotFoundError.

This mirrors how EDRI already treats the ASGI servers (uvicorn, hypercorn, daphne): each is an extra, detected and imported only when actually used.

edri/integrations is excluded from mypy (like switch and headerkit): these modules bridge to optional, type-check-time-absent libraries and use deliberately dynamic patterns.

Available integrations

Building your own? See Writing your own integration.