$npx skillfedfor your agent

pydantic-to-typescript2

Convert pydantic v1 and pydantic v2 models to typescript interfaces

With conditionsPyPI Software DevelopmentReleased Sep 202490.7K downloads / moMITPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — pydantic_to_typescript2-1.0.6-py3-none-any.whl
v1.0.6 · released 2024-09-12 · 1 runtime deps: pydantic

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—verify compatibility with your specific Pydantic and TypeScript versions before adopting, and plan for potential maintenance gaps if ecosystem changes occur.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires the json2ts CLI utility (json-schema-to-typescript npm package) to be installed and accessible on the system PATH.
  • Low install friction with a single runtime dependency on pydantic.
  • Maintenance is dormant (701 days since last release), though the package is marked Production/Stable and supports Python 3.8 through 3.12.

License · maintenance · safety

MIT (permissive) — MIT license is permissive, allowing use in commercial and private projects with minimal restrictions.

last release 2024-09-12 (701 days)

0 known vulnerabilities (OSV.dev, 2026-08-14) · 90,689 downloads/mo, #13,567 on PyPI

Verify before relying

pip install pydantic-to-typescript2

# CLI usage:
pydantic2ts --module backend.api --output ./frontend/apiTypes.ts

# Or programmatic usage via the package's generate function
  • Whether dormant maintenance status affects compatibility with recent Pydantic releases or TypeScript ecosystem changes.
  • Actual test coverage and reliability for complex nested Pydantic models or advanced field configurations.
  • Performance characteristics when converting large codebases with many models.
Same gist for agents: .md · .json

What it is and 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.

The 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.

Use it for

  • 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.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

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—verify compatibility with your specific Pydantic and TypeScript versions before adopting, and plan for potential maintenance gaps if ecosystem changes occur.

Install

pydantic-to-typescript2 on PyPI

Before you install

Low install friction with a single runtime dependency on pydantic. Maintenance is dormant (701 days since last release), though the package is marked Production/Stable and supports Python 3.8 through 3.12.

Requires the json2ts CLI utility (json-schema-to-typescript npm package) to be installed and accessible on the system PATH.

License in practice

MIT license is permissive, allowing use in commercial and private projects with minimal restrictions.

Quickstart

pip install pydantic-to-typescript2

# CLI usage:
pydantic2ts --module backend.api --output ./frontend/apiTypes.ts

# Or programmatic usage via the package's generate function

Verify before relying

  • Whether dormant maintenance status affects compatibility with recent Pydantic releases or TypeScript ecosystem changes.
  • Actual test coverage and reliability for complex nested Pydantic models or advanced field configurations.
  • Performance characteristics when converting large codebases with many models.

Package facts

LicenseMIT permissive
Python supportNot specified
Install frictionLow. Pure-Python wheel
Runtime dependencies
1 package
pydantic
MaintenanceDormant 701 days since the last release
First released
Downloads90,689 / month, #13,567 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableLicense :: OSI Approved :: MIT LicenseProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Evidence: pydantic_to_typescript2-1.0.6-py3-none-any.whl

Tags

Capabilities
pydantic to typescript conversionpython typescript type generationpydantic models typescript interfacescross-language type definitionsapi schema typescript exportpydantic cli typescriptpython javascript type sync
Topics
type-generationpolyglotapi-contracts
PyPI keywords
pydanticpydantic2typescriptannotationsvalidationinterface

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “pydantic to typescript conversion”

  • pydantic-to-typescript2Converts Pydantic models to TypeScript interfaces via a CLI tool,…
  • pydantic-to-typescriptConverts pydantic model definitions into TypeScript interface…
  • jsiijsii is a Python runtime client that enables Python code to interact…

Give your agent the search over MCP, or paste the wish link into any chat.

More Software Development packages

typing-extensions Worth it
PyPI · Software Development · released Jul 2026

Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.

PSF-2.0pure Python · 3.9+
1.9Bdownloads / mo
numpy Worth it
PyPI · Software Development · released Aug 2026

NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.

BSD-3-Clause AND 0BSD AND MIT AND Zlib AND CC0-1.0compiled wheel · 3.12+
1.1Bdownloads / mo
fastapi Worth it
PyPI · Software Development · released Jul 2026

FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.

MITpure Python · 3.10+
568.6Mdownloads / mo
annotated-doc With conditions
PyPI · Software Development · released Jul 2026

Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.

MITpure Python · 3.9+
456.2Mdownloads / mo
typer Worth it
PyPI · Software Development · released Aug 2026

Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.

Install it if you are building CLIs in Python.

MITpure Python · 3.10+
369.3Mdownloads / mo
distlib With conditions
PyPI · Software Development · released Jun 2026

Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.

permissive licensepure Python
323.3Mdownloads / mo

See also pydantic-to-typescript · sparkdantic · fastui · pydantic-compat · pydantic-numpy · pydantic-factories · pydantic-to-pyarrow · pydantic_yaml · flask-pydantic-spec · jsii