github-events 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- github_events/__init__.py +42 -0
- github_events/_models.py +7033 -0
- github_events/_registry.py +485 -0
- github_events/dispatch.py +138 -0
- github_events/dispatch.pyi +878 -0
- github_events/fastapi.py +56 -0
- github_events/py.typed +0 -0
- github_events/validation.py +70 -0
- github_events-0.1.0.dist-info/METADATA +37 -0
- github_events-0.1.0.dist-info/RECORD +11 -0
- github_events-0.1.0.dist-info/WHEEL +4 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"""TypedDicts for every GitHub webhook event, plus dispatch.
|
|
2
|
+
|
|
3
|
+
Core (typing-extensions only): the payload TypedDicts (re-exported here), the event
|
|
4
|
+
registry, and WebhookDispatcher (signature verification + routing). Optional
|
|
5
|
+
extras: github-events[pydantic] adds payload validation (used automatically by
|
|
6
|
+
WebhookDispatcher when pydantic is installed); github-events[fastapi] adds a
|
|
7
|
+
mountable endpoint via WebhookDispatcher.as_fastapi_router().
|
|
8
|
+
|
|
9
|
+
Payload types are named `<Event>Event` / `<Event><Action>Event` — PushEvent,
|
|
10
|
+
IssuesOpenedEvent, PullRequestClosedEvent, ... — and each actioned event also
|
|
11
|
+
has a union alias (IssuesEvent = IssuesAssignedEvent | IssuesClosedEvent | ...).
|
|
12
|
+
WebhookEvent unions all of them.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
from github_events import _models
|
|
16
|
+
from github_events._models import * # noqa: F403 - generated re-export
|
|
17
|
+
from github_events._registry import (
|
|
18
|
+
ACTION_EVENTS,
|
|
19
|
+
ACTION_TYPES,
|
|
20
|
+
EVENT_NAMES,
|
|
21
|
+
EVENT_TYPES,
|
|
22
|
+
EventName,
|
|
23
|
+
WebhookEvent,
|
|
24
|
+
)
|
|
25
|
+
from github_events.dispatch import (
|
|
26
|
+
SignatureVerificationError,
|
|
27
|
+
WebhookDispatcher,
|
|
28
|
+
WebhookError,
|
|
29
|
+
)
|
|
30
|
+
|
|
31
|
+
__all__ = [
|
|
32
|
+
*_models.__all__,
|
|
33
|
+
"ACTION_EVENTS",
|
|
34
|
+
"ACTION_TYPES",
|
|
35
|
+
"EVENT_NAMES",
|
|
36
|
+
"EVENT_TYPES",
|
|
37
|
+
"EventName",
|
|
38
|
+
"SignatureVerificationError",
|
|
39
|
+
"WebhookDispatcher",
|
|
40
|
+
"WebhookError",
|
|
41
|
+
"WebhookEvent",
|
|
42
|
+
]
|