Skip to main content

darca-repository

A session-aware, credential-capable repository abstraction for structured storage backends.

darca-repository enables secure, pluggable resolution of storage spaces into active clients. It builds on darca-storage and provides a registry-driven mechanism to manage logical repositories with rich metadata, credential handling, and async file operations.

Build Status Deploy Status Codecov Black code style License PyPi GitHub Pages

Features

  • ✅ Async-first storage repository resolution

  • 🔐 Credential injection via secrets or environment variables

  • 🔄 Session metadata propagation for observability

  • 🔌 Pluggable registry backends (YAML, SQL-ready)

  • 🔎 Clean interface for probing, connecting, and verifying access

Requirements

  • Python >= 3.9

  • darca-storage

  • pydantic

  • PyYAML (if using YAML-based registries)

📦 Installation

pip install darca-repository

Or using Poetry:

poetry add darca-repository

Quick Usage

from darca_repository.instance import RepositoryInstance
from darca_repository.registry.factory import get_repository_registry

registry = get_repository_registry()
profile = registry.get_profile("my-space")

repo = RepositoryInstance(profile)
client = await repo.connect()

await client.write("hello.txt", content="Hello, Darca!")

Repository Format (YAML)

Example YAML file (workspace-main.yaml):

name: workspace-main
storage_url: file:///var/data/workspace
scheme: file
credentials:
  token: ${DARCA_TOKEN}
parameters:
  cache: "false"
tags:
  env: production
enabled: true
priority: 10

📚 Documentation

Visit the full documentation:

👉 https://roelkist.github.io/darca-repository/

To build locally:

make docs

🧪 Testing

Run all tests using:

make test

Coverage and reports:

  • Generates coverage.svg badge

  • Stores HTML output in htmlcov/

  • Fully parallel test support with xdist

🤝 Contributing

We welcome all contributions!

  • Create a new branch from main

  • Use PRs to submit changes

  • You can also open feature requests or issues using our GitHub templates

See CONTRIBUTING.rst for detailed guidelines.

📄 License

This project is licensed under the MIT License. See LICENSE for details.

Release files for darca-repository 0.0.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 darca-repository 0.0.1
File Size Uploaded
darca_repository-0.0.1.tar.gz 6.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for darca-repository 0.0.1
File Interpreter ABI Platform
darca_repository-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 15.4 kB

Release files / darca_repository-0.0.1.tar.gz

Download URL darca_repository-0.0.1.tar.gz
Size 6.1 kB
Tags Source
SHA-256 checksum
How to use checksums
7d62ec38a9b41a821098f8dead8f09ad985b615f31f8fd78938655b1450c642a
BLAKE2b-256 checksum
How to use checksums
d5f03a02690a72eaf8303b333663ae3bc1819ea2b99cea72649c3e142178b902
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

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 31, 2025.

Transparency log

Release files / darca_repository-0.0.1-py3-none-any.whl

Download URL darca_repository-0.0.1-py3-none-any.whl
Size 9.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9ad7b3c8fae9218b25d0a26e926cd7bb63494c3469d61500afd9f286658b0c60
BLAKE2b-256 checksum
How to use checksums
54837acc0de3698c60101736f118cfd321fca694d93a29ffbd4a325606406b5e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

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 31, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

0.0.1 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