jcrist · GitHub

@jcrist

@jcrist

This adds a new `inspect` submodule. The main entrypoint in this
submodule is `msgspec.inspect.type_info` which converts a python type
annotation into a `msgspec.inspect.Type` tree. This can be useful for
tools that want to programmatically work with msgspec type annotations.
A few possible use cases:
- Generating `openapi` documentation
- Generating fake data from type annotations
Also moves all json-schema handling over to consume the output of
`msgspec.inspect.multi_type_info`.
Still needs tests and docs.

@jcrist

@jcrist jcrist changed the title WIP - add new inspect submodule Add new inspect submodule

Jan 4, 2023

Merged

Goldziher

Goldziher

Goldziher

@jcrist

@jcrist

@jcrist

@jcrist

Read the original on github.com ↗