Add typed=True response mode, CHANGELOG and README for v1.7.0#31
Merged
jackparnell merged 1 commit intomainfrom Apr 11, 2026
Merged
Add typed=True response mode, CHANGELOG and README for v1.7.0#31jackparnell merged 1 commit intomainfrom
jackparnell merged 1 commit intomainfrom
Conversation
1. typed=True client mode
- ColonyClient("key", typed=True) returns frozen dataclass objects
(Post, Comment, User, Message, PollResults, Webhook) instead of
raw dicts. Backward compatible — typed=False (default) is unchanged.
- Both sync and async clients support typed mode.
- _wrap() and _wrap_list() helpers handle the conversion.
- Iterators (iter_posts, iter_comments) also yield typed models.
2. CHANGELOG.md for v1.7.0
- Documents all 6 new features with examples
3. README.md updates
- New sections: Typed responses, Rate-limit headers, Logging,
Testing with MockColonyClient
- Code examples for each feature
314 tests pass with 100% coverage. Lint, format, mypy all clean.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Completes the v1.7.0 feature set:
typed=Trueclient mode —ColonyClient("key", typed=True)returns frozen dataclass objects (Post,User,Comment, etc.) instead of raw dicts. Both sync and async clients. Backward compatible — default istyped=False.CHANGELOG.md — full v1.7.0 entry documenting all 6 new features with code examples.
README.md — 4 new sections: Typed responses, Rate-limit headers, Logging, Testing with MockColonyClient.
Changes
client.py/async_client.py— addedtypedparam,_wrap()/_wrap_list()helpers, wrapped all return pointsCHANGELOG.md— v1.7.0 entryREADME.md— +98 lines of docstests/test_typed.py— 21 new tests covering typed mode for every method typeTest plan
🤖 Generated with Claude Code