Skip to main content

A lightweight YAML utility library with validation support using Cerberus, designed for simplicity and composability in structured Python projects.

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

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

Release files for darca-yaml 0.2.0

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-yaml 0.2.0
File Size Uploaded
darca_yaml-0.2.0.tar.gz 4.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for darca-yaml 0.2.0
File Interpreter ABI Platform
darca_yaml-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 9.2 kB

Release files / darca_yaml-0.2.0.tar.gz

Download URL darca_yaml-0.2.0.tar.gz
Size 4.2 kB
Tags Source
SHA-256 checksum
How to use checksums
070a737c2d758bf4f9ca514144b2366d8318800c07f79785d47d0747f835e9d8
BLAKE2b-256 checksum
How to use checksums
8ee4954dbb92fe41ca4c786f9df74ee80d124dd21caae74e1f4556a4d13b34d2
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 Apr 15, 2025.

Transparency log

Release files / darca_yaml-0.2.0-py3-none-any.whl

Download URL darca_yaml-0.2.0-py3-none-any.whl
Size 5.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b69b19b80377c19c6e118968d809a627afec55e50e3a619c3ef612eb1fba842c
BLAKE2b-256 checksum
How to use checksums
7f1770c1fa5bb3a063467dae4cbcaf15e6dfb0297d973e78d7c0f31caebc9626
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 Apr 15, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.0

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