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.
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7d62ec38a9b41a821098f8dead8f09ad985b615f31f8fd78938655b1450c642a
|
|
| MD5 |
6345a45396cc6746930d7652cdb67b3a
|
|
| BLAKE2b-256 |
d5f03a02690a72eaf8303b333663ae3bc1819ea2b99cea72649c3e142178b902
|
Provenance
The following attestation bundles were made for darca_repository-0.0.1.tar.gz:
Publisher:
cd.yml on roelkist/darca-repository
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
darca_repository-0.0.1.tar.gz -
Subject digest:
7d62ec38a9b41a821098f8dead8f09ad985b615f31f8fd78938655b1450c642a - Sigstore transparency entry: 226715558
- Sigstore integration time:
-
Permalink:
roelkist/darca-repository@dd3facc0b5b3f5ca8037972a63d7e7a24430ef56 -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/roelkist
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cd.yml@dd3facc0b5b3f5ca8037972a63d7e7a24430ef56 -
Trigger Event:
release
-
Statement type:
File details
Details for the file darca_repository-0.0.1-py3-none-any.whl.
File metadata
- Download URL: darca_repository-0.0.1-py3-none-any.whl
- Upload date:
- Size: 9.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9ad7b3c8fae9218b25d0a26e926cd7bb63494c3469d61500afd9f286658b0c60
|
|
| MD5 |
350462365cdbfeb15d093a889aa90846
|
|
| BLAKE2b-256 |
54837acc0de3698c60101736f118cfd321fca694d93a29ffbd4a325606406b5e
|
Provenance
The following attestation bundles were made for darca_repository-0.0.1-py3-none-any.whl:
Publisher:
cd.yml on roelkist/darca-repository
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
darca_repository-0.0.1-py3-none-any.whl -
Subject digest:
9ad7b3c8fae9218b25d0a26e926cd7bb63494c3469d61500afd9f286658b0c60 - Sigstore transparency entry: 226715559
- Sigstore integration time:
-
Permalink:
roelkist/darca-repository@dd3facc0b5b3f5ca8037972a63d7e7a24430ef56 -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/roelkist
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cd.yml@dd3facc0b5b3f5ca8037972a63d7e7a24430ef56 -
Trigger Event:
release
-
Statement type: