Skip to main content

Quicktype Ts

Generate typescript types from pydantic models (or JSON schemas) using Quicktype

Usage

Make sure you have quicktype installed:

npm -g i quicktype
from pydantic import BaseModel, ConfigDict
from quicktype_ts import pydantic2typescript

class User(BaseModel):
  model_config = ConfigDict(extra='forbid')
  name: str
  age: int
  friends: list['User']

print(pydantic2typescript(User))
# export type User = {
#     age:     number;
#     friends: User[];
#     name:    string;
# }

Metadata

Release files for quicktype-ts 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for quicktype-ts 0.1.1
File Size Uploaded
quicktype-ts-0.1.1.tar.gz 1.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for quicktype-ts 0.1.1
File Interpreter ABI Platform
quicktype_ts-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 4.4 kB

Release files / quicktype-ts-0.1.1.tar.gz

Download URL quicktype-ts-0.1.1.tar.gz
Size 1.9 kB
Tags Source
SHA-256 checksum
How to use checksums
3e8737d9642d5609181969865e391db32e2e9e8f370dd746666e01046ab00249
BLAKE2b-256 checksum
How to use checksums
c1186b88b55d456c0e910900eabb6bcd841aa668fc63a661d70ddb94847657f5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.11.6

Release files / quicktype_ts-0.1.1-py3-none-any.whl

Download URL quicktype_ts-0.1.1-py3-none-any.whl
Size 2.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ae32a790d9820bcf0b342ede6759eb223e0052dfc8bed600c2ab1b905af6cdff
BLAKE2b-256 checksum
How to use checksums
223093be06e6b274f4986a87894d7f21942b533588b2ec25376324b2eb18f925
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.11.6

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page