YAML utilities for reuse along projects.
Project description
A lightweight YAML utility library with validation support using Cerberus, designed for simplicity and composability in structured Python projects.
Overview
darca-yaml provides utilities for:
📖 Loading and saving YAML files
✅ Validating YAML content with Cerberus
🔗 Integrated exception handling (darca-exception)
📄 File handling via darca-file-utils
🧪 100% test coverage with Pytest and CI integration
Installation
pip install darca-yaml
Usage
from darca_yaml.yaml_utils import YamlUtils
schema = {"name": {"type": "string"}, "enabled": {"type": "boolean"}}
data = YamlUtils.load_yaml_file("config.yaml")
YamlUtils.validate_yaml(data, schema)
YamlUtils.save_yaml_file("output.yaml", data, validate=True, schema=schema)
Development Setup
Clone the repo and install dependencies:
git clone https://github.com/roelkist/darca-yaml
cd darca-yaml
make install
Run checks before committing:
make check
Run individual targets (faster iteration):
make format
make test
make precommit
make docs
Contribution Guide
We welcome contributions via pull requests to main. Please see the CONTRIBUTING.rst file for detailed instructions.
License
MIT
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_yaml-0.2.0.tar.gz.
File metadata
- Download URL: darca_yaml-0.2.0.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
070a737c2d758bf4f9ca514144b2366d8318800c07f79785d47d0747f835e9d8
|
|
| MD5 |
63bc3f64d0447a399dc5f153329d78fb
|
|
| BLAKE2b-256 |
8ee4954dbb92fe41ca4c786f9df74ee80d124dd21caae74e1f4556a4d13b34d2
|
Provenance
The following attestation bundles were made for darca_yaml-0.2.0.tar.gz:
Publisher:
cd.yml on roelkist/darca-yaml
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
darca_yaml-0.2.0.tar.gz -
Subject digest:
070a737c2d758bf4f9ca514144b2366d8318800c07f79785d47d0747f835e9d8 - Sigstore transparency entry: 197617641
- Sigstore integration time:
-
Permalink:
roelkist/darca-yaml@85f62b3dbe5a584b0dc153b61080cdde4ebb20c9 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/roelkist
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cd.yml@85f62b3dbe5a584b0dc153b61080cdde4ebb20c9 -
Trigger Event:
release
-
Statement type:
File details
Details for the file darca_yaml-0.2.0-py3-none-any.whl.
File metadata
- Download URL: darca_yaml-0.2.0-py3-none-any.whl
- Upload date:
- Size: 5.0 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 |
b69b19b80377c19c6e118968d809a627afec55e50e3a619c3ef612eb1fba842c
|
|
| MD5 |
8ac7bf621cab344c691b8fb261e83dc0
|
|
| BLAKE2b-256 |
7f1770c1fa5bb3a063467dae4cbcaf15e6dfb0297d973e78d7c0f31caebc9626
|
Provenance
The following attestation bundles were made for darca_yaml-0.2.0-py3-none-any.whl:
Publisher:
cd.yml on roelkist/darca-yaml
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
darca_yaml-0.2.0-py3-none-any.whl -
Subject digest:
b69b19b80377c19c6e118968d809a627afec55e50e3a619c3ef612eb1fba842c - Sigstore transparency entry: 197617647
- Sigstore integration time:
-
Permalink:
roelkist/darca-yaml@85f62b3dbe5a584b0dc153b61080cdde4ebb20c9 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/roelkist
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cd.yml@85f62b3dbe5a584b0dc153b61080cdde4ebb20c9 -
Trigger Event:
release
-
Statement type: