Improve class object navigation and client lifetime docs#9
Merged
Conversation
terjekv
marked this pull request as ready for review
July 24, 2026 22:48
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
client.classes.by_id(id)with synchronous and asynchronous class operations plus nested.objectsaccessclient.classes.by_name(name).objectsfor name-addressed object workflowsclient.objects(id)andclient.objects_by_class_name(name)selectorsWhy
client.objects(42)obscures the resource hierarchy and makes the numeric argument's role less obvious. The nested selectors make class selection explicit and give ID-addressed navigation the same shape as the existing by-name interface:The package has not been released, so retaining compatibility aliases would unnecessarily establish two public ways to express the same operation.
The lifetime guidance also clarifies that a context-managed client remains persistent for its full block and that framework or worker applications can manage one client from startup through shutdown to reuse eligible TCP/TLS connections.
User impact
Object services are now accessed exclusively through an explicitly selected class. This is an intentional pre-release API cleanup; there is no released compatibility contract to preserve.
Validation
uv sync --extra devuv run ruff format --check .uv run ruff check .uv run mypyuv run bandit -q -r src scriptsuv run zizmor .uv run pytest --cov— 307 passed, 99.42% coverageuv run mkdocs build --strictuv build./scripts/run-e2e-tests.sh— 6 passed against the pinned Hubuum v0.0.3 image