Storage abstraction layer for managing logical spaces.
Project description
A lightweight, fully-tested Python library to manage logical file-based spaces. Ideal for sandboxing, test environments, or dynamic storage orchestration.
🚀 Overview
darca-space-manager provides a simple abstraction over local file storage by organizing content in logical “spaces”. Each space has its own metadata and supports file-level operations such as reading, writing, deleting, and listing — including support for structured content like YAML and JSON.
✨ Features
Space creation, deletion, existence checks, and metadata tracking
File read/write/delete operations within a given space
Automatic handling of .yaml, .yml, and .json for dictionaries
Strict ASCII validation when reading text
Custom exceptions for robust error tracing (SpaceFileManagerException, SpaceManagerException)
Parallel-safe test fixtures (100% test coverage)
CI/CD pipelines, auto-doc generation, and live documentation via GitHub Pages
📦 Installation
pip install darca-space-manager
Or using Poetry:
poetry add darca-space-manager
🔧 Usage
from darca_space_manager import SpaceManager, SpaceFileManager
sm = SpaceManager()
sfm = SpaceFileManager()
sm.create_space("demo")
sfm.set_file("demo", "example.yaml", {"foo": "bar"})
print(sfm.get_file("demo", "example.yaml")) # raw text
sm.delete_space("demo")
📚 Documentation
Visit the full documentation:
👉 https://roelkist.github.io/darca-space-manager/
To build locally:
make docs
📂 Project Layout
darca_space_manager/
├── config.py
├── space_executor.py
├── space_file_manager.py
├── space_manager.py
└── __version__.py
🧪 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
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_space_manager-0.6.1.tar.gz.
File metadata
- Download URL: darca_space_manager-0.6.1.tar.gz
- Upload date:
- Size: 11.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
072cc9ded65ce1f7f6fcaf733ba8e4c188e488e9d75eb8a8d0516f14dce3591a
|
|
| MD5 |
5b15d4fa50dba949e9c61e1b27e14960
|
|
| BLAKE2b-256 |
d536574caeff04f0ca3a7333278cc498eea29a7f2ffa9600c1ea5bed1523fc0e
|
Provenance
The following attestation bundles were made for darca_space_manager-0.6.1.tar.gz:
Publisher:
cd.yml on roelkist/darca-space-manager
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
darca_space_manager-0.6.1.tar.gz -
Subject digest:
072cc9ded65ce1f7f6fcaf733ba8e4c188e488e9d75eb8a8d0516f14dce3591a - Sigstore transparency entry: 197627997
- Sigstore integration time:
-
Permalink:
roelkist/darca-space-manager@44a50eaa185494a2b5204893082f7911e3ffcb00 -
Branch / Tag:
refs/tags/v0.6.1 - Owner: https://github.com/roelkist
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cd.yml@44a50eaa185494a2b5204893082f7911e3ffcb00 -
Trigger Event:
release
-
Statement type:
File details
Details for the file darca_space_manager-0.6.1-py3-none-any.whl.
File metadata
- Download URL: darca_space_manager-0.6.1-py3-none-any.whl
- Upload date:
- Size: 13.2 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 |
ca6d707059820b678807a66890fceef5142c579a554df0dc12c7e86c092cc890
|
|
| MD5 |
c245f845fc51d9ecf1980e168ff12cc1
|
|
| BLAKE2b-256 |
ed9f3ef7f40fb78217eb6bc167e3f4e8ba8d1926c31f352bdfe69c8153329a6d
|
Provenance
The following attestation bundles were made for darca_space_manager-0.6.1-py3-none-any.whl:
Publisher:
cd.yml on roelkist/darca-space-manager
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
darca_space_manager-0.6.1-py3-none-any.whl -
Subject digest:
ca6d707059820b678807a66890fceef5142c579a554df0dc12c7e86c092cc890 - Sigstore transparency entry: 197628001
- Sigstore integration time:
-
Permalink:
roelkist/darca-space-manager@44a50eaa185494a2b5204893082f7911e3ffcb00 -
Branch / Tag:
refs/tags/v0.6.1 - Owner: https://github.com/roelkist
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cd.yml@44a50eaa185494a2b5204893082f7911e3ffcb00 -
Trigger Event:
release
-
Statement type: