{"categories":[{"label":"Software Development","url":"https://skillfed.io/packages/category/software-development/17"}],"enrichment":{"capability":"Converts Pydantic models to TypeScript interfaces via a CLI tool, enabling shared type definitions between Python and JavaScript applications.","skillfed_tags":["type-generation","polyglot","api-contracts"],"use_cases":["Synchronize API request/response types between a Python backend and a TypeScript frontend without manual duplication.","Generate TypeScript types for a Python service's data models to ensure frontend code matches backend contracts.","Automate type definition generation in a monorepo where Python and JavaScript services share domain models.","Export Pydantic validation schemas as TypeScript interfaces for client-side type checking and IDE autocomplete.","Maintain a single source of truth for data structures across polyglot microservices."],"what_it_does":"pydantic-to-typescript2 is a command-line tool that reads Pydantic model definitions from Python modules and generates corresponding TypeScript interface definitions. It bridges the gap between Python and JavaScript/TypeScript codebases by allowing you to define your data schemas once in Pydantic and automatically export them as TypeScript types, eliminating the need to manually maintain duplicate type definitions across languages.\n\nThe tool scans Python modules for Pydantic models, converts them to JSON Schema, and then uses the json2ts utility to generate TypeScript interfaces. It can be invoked via CLI with module and output file paths, or programmatically. It supports excluding specific models and customizing the json2ts command invocation.","worth_installing":"Yes, if you maintain both Python and TypeScript codebases that share data models. The low install friction and permissive license make it practical for eliminating type definition drift. However, maintenance is dormant\u2014verify compatibility with your specific Pydantic and TypeScript versions before adopting, and plan for potential maintenance gaps if ecosystem changes occur."},"id":"pydantic-to-typescript2","links":{"html":"https://skillfed.io/packages/pydantic-to-typescript2","md":"https://skillfed.io/packages/pydantic-to-typescript2.md","pypi":"https://pypi.org/project/pydantic-to-typescript2/"},"maintenance":{"status":"dormant"},"meta":{"latest_release":"2024-09-12","license_spdx":null,"license_treatment":"permissive","name":"pydantic-to-typescript2","python_support":"unspecified","summary":"Convert pydantic v1 and pydantic v2 models to typescript interfaces"},"popularity":{"monthly_downloads":90689,"position":13567,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"1.0.6"}
