Home / Companies / Speakeasy / Blog / Post Details
Content Deep Dive

Python Generation with Async & Pydantic Support

Blog post from Speakeasy

Post Details
Company
Date Published
Author
Tristan Cartledge
Word Count
784
Language
English
Hacker News Points
-
Summary

The announcement details the release of a new Python Generator that enhances SDKs with full type safety, asynchronous support, and a streamlined developer experience. Utilizing Pydantic models, the generator ensures end-to-end type safety by validating both request and response data, crucial for maintaining data integrity in applications. It supports both asynchronous and synchronous method calls via HTTPX, allowing developers to use a single SDK instance for various operations. The inclusion of TypedDicts simplifies method input, while improvements in import patterns, dependency management through Poetry, and decoupling of class and package names aim to create a more stable, maintainable, and user-friendly codebase. The generator's release marks the beginning of continued enhancements based on community feedback, with plans to make it the default for new Python SDKs.