refactor: Consolidate public interface for v3#794
Open
vdusek wants to merge 1 commit into
Open
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #794 +/- ##
==========================================
- Coverage 97.73% 95.94% -1.80%
==========================================
Files 48 48
Lines 4860 4859 -1
==========================================
- Hits 4750 4662 -88
- Misses 110 197 +87
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
|
I'm not sure if |
janbuchar
approved these changes
May 15, 2026
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.
Description
Consolidates the public interface for the v3 release:
apify_clientnamespace now only exposesApifyClient,ApifyClientAsync, and__version__. This is a go-to for everyone.http_clientssubmodule (HttpClient,HttpClientAsync,HttpResponse,ImpitHttpClient,ImpitHttpClientAsync). Only for people who want to replace the default HTTP client.types.pymodule withTimeout,WebhooksList, andJsonSerializabletype aliases (can be used, e.g., for a custom HTTP client).__all__toerrors.py.I would prefer to keep
_modelsand_typeddictsprivate. They should not be considered safe to import, since exposing them publicly would potentially restrict future API changes. For typed dicts, users do not need to import them to pass inputs to resource client methods. Resource clients, which are also private and users should be able to get to them only viaApifyClient(and its async version), may return Pydantic models, but those models should not be constructed directly in user code. There may be niche cases where users want to import models or typed dicts for explicit typing or casts, but I would rather keep those available only on the user's own responsibility - we cannot guarantee that the types will not change. This is also a status quo in the current v2.5.This is my stand, let me know yours @janbuchar.
Issue
Closes: #744