Skip to content

Commit

Permalink
Python: Cleanup exports, export exceptions as svix.exceptions and w…
Browse files Browse the repository at this point in the history
…ebhooks as `svix.webhooks` (#82)
  • Loading branch information
svix-frank authored Jun 29, 2021
1 parent 30adc84 commit 1917365
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 3 deletions.
19 changes: 17 additions & 2 deletions python/svix/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from .api import ( # noqa
from .api import (
ApplicationIn,
ApplicationOut,
DashboardAccessOut,
Expand All @@ -10,4 +10,19 @@
Svix,
SvixOptions,
)
from .receiver import Webhook, WebhookVerificationError # noqa
from .webhooks import Webhook, WebhookVerificationError

__all__ = [
"ApplicationIn",
"ApplicationOut",
"DashboardAccessOut",
"FetchOptions",
"ListResponseApplicationOut",
"ListResponseMessageOut",
"MessageIn",
"MessageOut",
"Svix",
"SvixOptions",
"Webhook",
"WebhookVerificationError",
]
25 changes: 25 additions & 0 deletions python/svix/exceptions.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
from .openapi_client.exceptions import (
ApiAttributeError,
ApiException,
ApiKeyError,
ApiTypeError,
ApiValueError,
ForbiddenException,
NotFoundException,
ServiceException,
UnauthorizedException,
)
from .webhooks import WebhookVerificationError

__all__ = [
"ApiAttributeError",
"ApiException",
"ApiKeyError",
"ApiTypeError",
"ApiValueError",
"ForbiddenException",
"NotFoundException",
"ServiceException",
"UnauthorizedException",
"WebhookVerificationError",
]
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from math import floor
from datetime import datetime, timedelta, timezone

from svix.receiver import hmac_data, Webhook, WebhookVerificationError
from svix.webhooks import hmac_data, Webhook, WebhookVerificationError

defaultMsgID = 'msg_p5jXN8AQM9LWM0D4loKWxJek'
defaultPayload = '{"test": 2432232314}'
Expand Down

0 comments on commit 1917365

Please sign in to comment.