schema-enforcer

Generate Pydantic models from Parquet and YAML schemas and validate Polars DataFrames.

Updated Mar 4, 2026
One-click install
npx skills add https://github.com/djpTester44/iocane --skill schema-enforcer
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: schema-enforcer
Source: https://github.com/djpTester44/iocane/tree/main/%7B%7Bcookiecutter.framework_folder%7D%7D/skills/schema-enforcer
Command: npx skills add https://github.com/djpTester44/iocane --skill schema-enforcer

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill addresses the challenge of maintaining data integrity and consistency in data-intensive pipelines by providing tools to automatically generate and validate data schemas.

Core Features & Use Cases

  • Pydantic Model Generation: Automatically create Pydantic models from Parquet or YAML files, ensuring type safety and structure.
  • DataFrame Validation: At runtime, validate Polars DataFrames against defined Pydantic models to catch schema violations early.
  • Use Case: Ensure that data ingested into a data warehouse conforms to a predefined structure, preventing downstream errors and data quality issues.

Quick Start

Generate a Pydantic model named 'CustomerSchema' from the Parquet file located at '/data/customer.parquet' with nullable fields.

Frequently Asked Questions about schema-enforcer

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I validate a Polars DataFrame against a predefined schema?

You validate a Polars DataFrame by generating a Pydantic model from your schema and running a Python validator to check schema adherence. This enforces data contracts at runtime to catch violations early in data pipelines.

Can I automatically generate Pydantic models from Parquet files?

Yes, you can automatically generate Pydantic models from Parquet files. This process extracts the data structure to ensure type safety and allows you to configure options like nullable fields during model creation.

How do I enforce data contracts in a data ingestion pipeline?

You enforce data contracts in a pipeline by automatically generating Pydantic models from YAML or Parquet schemas, then validating ingested Polars DataFrames against these models to prevent downstream errors and maintain data integrity.

Does this validation approach work with YAML schema definitions?

Yes, the schema validation approach works with YAML schema definitions. It generates Pydantic models from YAML files to provide type safety and structure for your data pipelines alongside Parquet file support.

What is the best way to prevent data quality issues when loading data into a warehouse?

The best way to prevent data quality issues during warehouse loading is to define Pydantic models from your schemas and validate Polars DataFrames against them, ensuring all ingested data conforms to the expected structure.