Skip to main content

Darca repository management library

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

darca_repository-0.0.1.tar.gz (6.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

darca_repository-0.0.1-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

Details for the file darca_repository-0.0.1.tar.gz.

File metadata

  • Download URL: darca_repository-0.0.1.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for darca_repository-0.0.1.tar.gz
Algorithm Hash digest
SHA256 7d62ec38a9b41a821098f8dead8f09ad985b615f31f8fd78938655b1450c642a
MD5 6345a45396cc6746930d7652cdb67b3a
BLAKE2b-256 d5f03a02690a72eaf8303b333663ae3bc1819ea2b99cea72649c3e142178b902

See more details on using hashes here.

Provenance

The following attestation bundles were made for darca_repository-0.0.1.tar.gz:

Publisher: cd.yml on roelkist/darca-repository

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file darca_repository-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for darca_repository-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9ad7b3c8fae9218b25d0a26e926cd7bb63494c3469d61500afd9f286658b0c60
MD5 350462365cdbfeb15d093a889aa90846
BLAKE2b-256 54837acc0de3698c60101736f118cfd321fca694d93a29ffbd4a325606406b5e

See more details on using hashes here.

Provenance

The following attestation bundles were made for darca_repository-0.0.1-py3-none-any.whl:

Publisher: cd.yml on roelkist/darca-repository

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page