{"categories":[{"label":"Software Development","url":"https://skillfed.io/packages/category/software-development/4"}],"enrichment":{"capability":"Pydantic-YAML adds YAML serialization and deserialization to Pydantic models, letting you read and write validated data structures as YAML files or strings.","skillfed_tags":["yaml-serialization","pydantic-integration","config-management"],"use_cases":["Load configuration files in YAML format into typed Pydantic models with automatic validation and type coercion.","Export application state or settings as human-readable YAML while maintaining schema validation on round-trip.","Generate YAML documentation or examples from Pydantic models using comment generation from docstrings.","Migrate data between YAML and JSON formats while preserving type safety through a single Pydantic model definition.","Validate YAML input in CLI tools or configuration management systems using Pydantic's full validator ecosystem."],"what_it_does":"Pydantic-YAML bridges Pydantic's data validation framework with YAML serialization. It provides two main functions: to_yaml_str() converts a validated Pydantic model instance into YAML text, and parse_yaml_raw_as() parses YAML text back into a typed model with full validation. The package leverages Pydantic's existing JSON serialization machinery and wraps ruamel-yaml for YAML handling, so it inherits Pydantic's validator support, nested model composition, and type safety.\n\nTypical usage involves defining a Pydantic BaseModel, instantiating it with data, calling to_yaml_str() to export it as human-readable YAML, and later calling parse_yaml_raw_as() to load and re-validate YAML files. The package also supports optional comment generation from model docstrings and field descriptions, custom YAML writer configuration via ruamel.yaml instances, and works with both Pydantic v1 and v2 (including dataclass support in v2).","worth_installing":"Yes. The package is actively maintained, has no known vulnerabilities, low install friction, and fills a clear gap: it lets you use Pydantic's validation and typing with YAML files. If your project needs to read or write YAML with schema validation, this is the standard solution. The MIT license poses no restrictions."},"id":"pydantic-yaml","links":{"html":"https://skillfed.io/packages/pydantic-yaml","md":"https://skillfed.io/packages/pydantic-yaml.md","pypi":"https://pypi.org/project/pydantic-yaml/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2026-06-21","license_spdx":null,"license_treatment":"permissive","name":"pydantic_yaml","python_support":"supports_current","summary":"YAML reading/writing for Pydantic models"},"popularity":{"monthly_downloads":2493981,"position":3038,"tier":"top_5000"},"security":{"n_vulnerabilities":0},"version":"1.7.0"}
