dataclass-generator

Community

Auto-generate type-safe Python models from SQL.

AuthorWkayaobama
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Manually creating and maintaining Python dataclasses that accurately reflect complex SQL query results, especially with JOINs and evolving schemas, is time-consuming and prone to errors. This Skill automates that process, ensuring type safety and consistency, so you can focus on logic, not boilerplate.

Core Features & Use Cases

  • Dynamic Dataclass Generation: Create Python dataclasses directly from SQL queries or discovered database schemas, including denormalized fields from JOINs.
  • SQL to Python Type Mapping: Automatically convert SQL data types to their appropriate Python equivalents, handling nullability and adding necessary imports.
  • Use Case: After defining a complex SQL query that joins multiple tables for a new data entity, use this skill to instantly generate the corresponding Python dataclass, ready for use in your data pipeline.

Quick Start

Generate a Python dataclass named 'CustomerOrder' from the SQL query "SELECT c.CustomerID, c.Name, o.OrderID, o.Amount FROM Customers c JOIN Orders o ON c.CustomerID = o.CustomerID".

Dependency Matrix

Required Modules

pyodbcpandas

Components

scriptsreferences

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: dataclass-generator
Download link: https://github.com/Wkayaobama/icalps_pipeline/archive/main.zip#dataclass-generator

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.