-
Notifications
You must be signed in to change notification settings - Fork 34
Add __all__ exports and improve backoff retry configuration #1993
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: v2/main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,3 +3,59 @@ | |
| This package provides models, enums and a client to communicate with the | ||
| Overkiz cloud and local gateway APIs. | ||
| """ | ||
|
|
||
| from pyoverkiz.auth import ( | ||
| Credentials, | ||
| LocalTokenCredentials, | ||
| RexelOAuthCodeCredentials, | ||
| TokenCredentials, | ||
| UsernamePasswordCredentials, | ||
| ) | ||
| from pyoverkiz.client import OverkizClient | ||
| from pyoverkiz.exceptions import ( | ||
|
Comment on lines
+14
to
+15
|
||
| BadCredentialsException, | ||
| BaseOverkizException, | ||
| MaintenanceException, | ||
| NotAuthenticatedException, | ||
| OverkizException, | ||
| TooManyRequestsException, | ||
| ) | ||
| from pyoverkiz.models import ( | ||
| Action, | ||
| ActionGroup, | ||
| Command, | ||
| Device, | ||
| Event, | ||
| Execution, | ||
| Gateway, | ||
| Place, | ||
| ServerConfig, | ||
| Setup, | ||
| State, | ||
| ) | ||
|
|
||
| __all__ = [ | ||
| "Action", | ||
| "ActionGroup", | ||
| "BadCredentialsException", | ||
| "BaseOverkizException", | ||
| "Command", | ||
| "Credentials", | ||
| "Device", | ||
| "Event", | ||
| "Execution", | ||
| "Gateway", | ||
| "LocalTokenCredentials", | ||
| "MaintenanceException", | ||
| "NotAuthenticatedException", | ||
| "OverkizClient", | ||
| "OverkizException", | ||
| "Place", | ||
| "RexelOAuthCodeCredentials", | ||
| "ServerConfig", | ||
| "Setup", | ||
| "State", | ||
| "TokenCredentials", | ||
| "TooManyRequestsException", | ||
| "UsernamePasswordCredentials", | ||
| ] | ||
|
Comment on lines
+37
to
+61
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Importing credential classes from
pyoverkiz.authpulls inpyoverkiz.auth.factoryandpyoverkiz.auth.strategies(viapyoverkiz/auth/__init__.py), which imports heavy optional runtime deps likeboto3at module import time. That makes a plainimport pyoverkizsignificantly heavier than necessary for users who only need models/exceptions. Prefer importing these symbols directly frompyoverkiz.auth.credentials(or use a lazy re-export via__getattr__) to keep top-level imports lightweight.