All skills
microsoft avatar

/pydantic-models-py

@4a2873f
by microsoftmicrosoft/skills3.1k stars
351

Create Pydantic models following the multi-model pattern with Base, Create, Update, Response, and InDB variants. Use when defining API request/response schemas, database models, or data validation in Python applications using Pydantic v2.

Use this Skill: https://skilld.dev/gh/microsoft/skills/pydantic-models-py

This session only. Nothing lands on disk.

referencescapabilities.md

≈283 tokens on demand. Your agent reads this file only when SKILL.md points to it.

pydantic-models-py capability coverage

SDK/package: pydantic

This reference captures additional non-hero capabilities and API breadth so the main SKILL.md can stay focused on copy/paste hero flows.

Hero scenarios covered in SKILL.md

  • Quick Start
  • Multi-Model Pattern
  • camelCase Aliases
  • Optional Update Fields

Important non-hero scenarios to include when needed

  • Database Document
  • Integration Steps

API breadth checklist

  • Verify field validators (@field_validator) and model validators (@model_validator) cover all required constraints.
  • Confirm serialization behavior: use model_dump(mode="json") for JSON-safe output and model_dump(exclude_unset=True) for partial updates.
  • Include schema generation examples (model_json_schema()) when the model drives API contracts or documentation.
  • Use model_validate when validating an existing dict or object; direct BaseModel(...) construction also runs validators and coercion.
  • Ensure new code uses Pydantic v2 patterns (@field_validator, model_config) rather than deprecated v1 patterns (@validator, orm_mode).

Source: SKILL.md on GitHub

1 warning16d5 checks · Risk SAFE
  • Gen Agent Trust Hub16d

    This skill provides templates and guidelines for creating Pydantic models in Python. It follows standard development practices and does not exhibit any suspicious behavior or security vulnerabilities.

  • Socket16d

    No alerts

  • Snyk16d

    Risk: LOW · No issues

  • Runlayer7mo

    3/3 files flagged

  • ZeroLeaks5mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at 4a2873f. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated 2 months ago
metadata
{
  "author": "Microsoft",
  "version": "1.0.0"
}

README badge

README badge for microsoft/skills/pydantic-models-py