Skip to content

Commit

Permalink
feat: Better package structure
Browse files Browse the repository at this point in the history
Make the client class usable as impact_stack.rest.Client. Use __all__ to
take more control over the externally visible symbols.
  • Loading branch information
torotil committed Oct 9, 2023
1 parent 058fa25 commit b76d7c1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions impact_stack/rest/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,7 @@ def get_client(self, app_slug, api_version=None, needs_auth=True):
auth=self.auth_middleware if needs_auth else None,
request_timeout=config["timeout"],
)


Client = rest.Client
__all__ = ["AuthMiddleware", "ClientFactory", "Client"]
2 changes: 1 addition & 1 deletion tests/rest_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import requests
import requests.exceptions

from impact_stack.rest import rest
from impact_stack import rest


class ClientTest:
Expand Down

0 comments on commit b76d7c1

Please sign in to comment.