This repository was archived by the owner on Aug 14, 2026. It is now read-only.
- Payload handlers are now stateless: the request model is built per-call instead of being stored on the handler, so shared/singleton handlers are safe under concurrent (including async) requests.
- Handler
req_model,resp_modelanddrycan now be declared as class attributes, in addition to__init__arguments (backward compatible). - Added sync/async type markers
_Sync,_Asyncand the_ModeTypeVar, enabling correctly-typed async clients through overloads. APIClientnow dispatches requests via__getattr__instead of__getattribute__(faster; only triggered on an attribute miss).- The
httpxclient is now created lazily and can be closed: addedclose()/aclose()and (async) context-manager support. Importing a client no longer opens connections. - Request
timeoutis now configurable (default: 10s). - Non-JSON or empty response bodies no longer raise
JSONDecodeError;APIResponsenow decodes defensively. PayloadBaseModel.from_argsnow raises on duplicate or excess positional arguments.
Full Changelog: v1.1.1...v1.2.0