Skip to main content

ediarum.sdk

Version: 0.3.1

© 2026 by Berlin-Brandenburg Academy of Sciences and Humanities

Part of ediarum (https://www.ediarum.org, ediarum@bbaw.de)

Developed by TELOTA (https://www.bbaw.de/telota, telota@bbaw.de), a DH working group of the Berlin-Brandenburg Academy of Sciences and Humanities.

Developer of ediarum.sdk:

  • Malte Vogl

Shared Python package for ediarum backend services (ediarum.index, 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 (xml/app: where ediarum.index takes the project's registers from). ProjectInfo maps name to label; 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

A release is a tag vX.Y.Z that matches version in pyproject.toml; CI publishes it to PyPI.

  1. On main, with a green pipeline: uv version --bump patch (or minor, major); set the same version in the Version: line above and in CITATION.cff (with date-released). Commit these four files.

  2. git tag -a v$(uv version --short) -m v$(uv version --short) && git push --follow-tags (--follow-tags pushes annotated tags only).

    scripts/release.sh patch|minor|major does steps 1 and 2: it refuses unless on main with a clean tree, level with origin/main and the tag free, and asks before committing and pushing. It also does step 5.

  3. The tag pipeline runs the tests, then publish: it refuses a tag that differs from the version, builds the package and uploads it with uv publish (the masked, protected CI/CD variable UV_PUBLISH_TOKEN).

  4. In the apps: uv lock --upgrade-package ediarum-sdk (widen the version range in pyproject.toml for a new minor version).

  5. Publish to GitHub (github.com/ediarum/ediarum.sdk): scripts/publish.sh X.Y.Z puts the release there as one snapshot commit "Release X.Y.Z" by TELOTA, tagged vX.Y.Z, without the internal history and without .gitlab-ci.yml. It refuses a snapshot with internal hosts or token-like strings (FORBIDDEN in the script). scripts/release.sh checks this before it changes anything and publishes right after the GitLab push; if only the GitHub push fails, rerun scripts/publish.sh X.Y.Z. NO_GITHUB=1 releases on GitLab only. PyPI stays with the GitLab tag pipeline. Once per clone: git remote add github git@github.com:ediarum/ediarum.sdk.git.

Tags v* are protected (Settings → Repository → Protected tags): only maintainers create releases, and protected variables such as UV_PUBLISH_TOKEN are only available to protected refs.

License

MIT, see the file LICENSE.

Cite this software

If you use this software, please cite it using the metadata in the file CITATION.cff (for more information about CFF see https://citation-file-format.github.io/).

Metadata

Release files for ediarum-sdk 0.3.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.3.1
File Size Uploaded Provenance Actions
ediarum_sdk-0.3.1.tar.gz 10.7 kB Without provenance Details for ediarum_sdk-0.3.1.tar.gz

Built distribution (wheel)

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

Total release size: 23.8 kB

Release files / ediarum_sdk-0.3.1.tar.gz

Download URL ediarum_sdk-0.3.1.tar.gz
Size 10.7 kB
Tags Source
SHA-256 checksum
How to use checksums
f6771e965251ee7005782e518b0d827d281ff78009993493c573e7825e67af6d
BLAKE2b-256 checksum
How to use checksums
409c0149ee2a002cc0749edb8a742ab0ac5d5153d317566d11c16aa93a260637
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.3.1-py3-none-any.whl

Download URL ediarum_sdk-0.3.1-py3-none-any.whl
Size 13.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e44953e620cab2879b218f8b5eee880e67baffecca8cc1bf77a2ef4df8976d94
BLAKE2b-256 checksum
How to use checksums
e3d258729628dd3c68b4c355c69af742130a1dc8a15591957ce4a86cb52eb8db
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.3.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