polyfactory

Official

Generate valid mock test data for Litestar models in seconds.

Authorlitestar-org
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill eliminates the tedious, error-prone work of manually writing test fixtures for Litestar application models, ensuring generated mock data always passes validation constraints without custom per-test setup.

Core Features & Use Cases

  • Multi-backend mock data generation: Auto-generates validation-passing instances for Pydantic, msgspec, dataclass, attrs, TypedDict, and SQLAlchemy models used in Litestar projects, respecting all model constraints and validators.
  • Native pytest integration: Registers factories as pytest fixtures with a single decorator, removing boilerplate fixture code and making factories available across test files.
  • Litestar-specific workflow guidance: Includes pre-built patterns for handler payload testing, ORM model fixture creation, SAQ task payload generation, and Channels event system tests tailored to the Litestar ecosystem.
  • Use Case: When testing a Litestar order creation endpoint that accepts a msgspec DTO, use this Skill to auto-generate valid request payloads and wire nested customer model data automatically instead of hand-coding test values.

Quick Start

Use the polyfactory skill to generate a valid mock msgspec DTO payload for your Litestar order creation endpoint test.

Dependency Matrix

Required Modules

None required

Components

references

💻 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: polyfactory
Download link: https://github.com/litestar-org/litestar-skills/archive/main.zip#polyfactory

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 537,000+ vetted skills library on demand.