Skip to main content

ediarum.sdk

Shared Python package for ediarum backend services (ediarum.register, ediarum.id, ediarum.fileservice). It provides platform authentication, a debounced file watcher and a client for the platform's project registry.

Requires Python 3.13 or later.

Modules

Module Contents
ediarum_sdk.auth Caller identification for FastAPI apps: platform auth-verify client (platform_user, PlatformCallerDep, ProjectCallerDep, PlatformAdminDep) and hashed API keys (ApiKey, make_api_key_dependency). Both produce a Caller.
ediarum_sdk.watch Watcher: debounced, per-project filesystem watcher that calls on_due(project, paths) once a project has been quiet for quiet_seconds.
ediarum_sdk.projects ProjectsClient: thread-safe, caching client for the platform's project list (ProjectInfo). Serves the last cached list if the platform is unreachable.

Configuration

Variable Used by Purpose
AUTH_VERIFY_URL auth.AuthConfig.from_env() Platform auth-verify endpoint
AUTH_DEV_USER auth.AuthConfig.from_env() Treat every request as this admin user. Development only; mutually exclusive with AUTH_VERIFY_URL
PLATFORM_PROJECTS_URL projects.ProjectsClient Platform project registry, …/api/auth/service/projects (can also be passed as url=)
PLATFORM_SERVICE_TOKEN projects.ProjectsClient Service token for the registry, sent as Authorization: Bearer (can also be passed as token=)

Usage

from pathlib import Path
from ediarum_sdk.watch import Watcher

def handle_changes(project: str, paths: set[str]) -> None:
    ...

Watcher({"demo": Path("/data/xml/demo")}, on_due=handle_changes).run_forever()
import httpx2 as httpx
from ediarum_sdk.projects import ProjectsClient

projects = ProjectsClient(httpx.Client())
info = projects.get("demo")

Notes

  • The watcher is a supplementary trigger. File-change events can be lost; services should also run a periodic content-hash scan.
  • The registry answers with slug, name, repo_url, branch and index_source_of_truth. ProjectInfo maps them to label and source_of_truth; sparse_path is "" (whole repository) unless a row sets it.

Installation

uv add ediarum-sdk

For development against unreleased changes, use a path dependency in [tool.uv.sources].

Development

uv sync
uv run pytest

Release

Set version in pyproject.toml, commit, then tag and push:

git tag v0.2.0
git push --tags

GitLab CI runs the tests and publishes the tagged version to PyPI.

License

MIT, see LICENSE.

Metadata

Release files for ediarum-sdk 0.2.1

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

Source distribution (sdist)

Source distribution for ediarum-sdk 0.2.1
File Size Uploaded Provenance Actions
ediarum_sdk-0.2.1.tar.gz 9.6 kB Without provenance Details for ediarum_sdk-0.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ediarum-sdk 0.2.1
File Interpreter ABI Platform Actions
ediarum_sdk-0.2.1-py3-none-any.whl Python 3 none any Details for ediarum_sdk-0.2.1-py3-none-any.whl

Total release size: 21.5 kB

Release files / ediarum_sdk-0.2.1.tar.gz

Download URL ediarum_sdk-0.2.1.tar.gz
Size 9.6 kB
Tags Source
SHA-256 checksum
How to use checksums
92caf217537af4d1db356e9b8e2b42f00188f7ec1b0f2abc519bdefae066c38b
BLAKE2b-256 checksum
How to use checksums
e4a18f4b4817ec603cb96f06a85db16cb6bf34227f763275f732f599122d1af4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.30 {"installer":{"name":"uv","version":"0.9.30","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / ediarum_sdk-0.2.1-py3-none-any.whl

Download URL ediarum_sdk-0.2.1-py3-none-any.whl
Size 11.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d802ef9eb63d294bbc6f801c76a57259c013854e5f48eb385e301f92d766796c
BLAKE2b-256 checksum
How to use checksums
cdfd7db76fd32f8477f575dc2e3bef48ab533008c8204f5f243a483497d3f7d0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.30 {"installer":{"name":"uv","version":"0.9.30","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for ediarum-sdk 0.2.1

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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