typewriter-python
Python Pydantic emitter for the typewriter SDK.
What It Generates
| Rust | Python |
|---|---|
struct |
Pydantic BaseModel class |
Simple enum |
class Role(str, Enum) |
Tagged enum |
Union[...] with Literal discriminators |
Option<T> |
Optional[T] = None |
Vec<T> |
list[T] |
HashMap<K,V> |
dict[K, V] |
Example Output
:
:
: = None
:
Usage
Used internally by typewriter-macros. Most users should depend on the main typewriter crate.
License
Apache-2.0 — Darshan Vichhi