Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

github-webhook-types

TypedDict definitions and Pydantic models for GitHub webhook payloads.

The package generates its public payload types from Octokit's machine-readable webhook schema. The schema JSON is not vendored in this repository; generated metadata records the upstream package versions and SHA256 hashes used to create the committed Python modules.

Install

pip install github-webhook-types

Usage

from github_webhook_types import GitHubEventName, parse_delivery
from github_webhook_types.generated.models import IssuesOpenedPayload
from github_webhook_types.generated.typed_dicts import IssuesOpenedPayloadDict

event: GitHubEventName = "issues"
payload = parse_delivery(event, b'{"action": "opened", "repository": {}, "sender": {}, "issue": {}}')

typed_payload: IssuesOpenedPayloadDict = {
    "action": "opened",
    "repository": {},
    "sender": {},
    "issue": {},
}
model = IssuesOpenedPayload.model_validate(typed_payload)

parse_delivery() dispatches by X-GitHub-Event and, when present, the payload action. Unknown GitHub fields are accepted by the generated Pydantic models so new fields do not immediately break consumers.

Type Source

Generated payload types come from:

  • https://unpkg.com/@octokit/webhooks-schemas/schema.json
  • https://unpkg.com/@octokit/webhooks-examples/api.github.com/index.json

The current source metadata is exported from github_webhook_types.generated._schema_meta.

Development

pdm install
pdm run generate
pdm run quality
pdm run docs:build
pdm run docs:preview
pdm run docs:dev

Use pdm run generate:check to verify that the committed generated files still match the current Octokit schema metadata. Use pdm run docs:preview to serve the built site/ directory, and pdm run docs:dev for Zensical's live docs server.

License

ISC.

Metadata

Release files for github-webhook-types 0.0.1a3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for github-webhook-types 0.0.1a3
File Size Uploaded Provenance Actions
github_webhook_types-0.0.1a3.tar.gz 149.0 kB Without provenance Details for github_webhook_types-0.0.1a3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for github-webhook-types 0.0.1a3
File Interpreter ABI Platform Actions
github_webhook_types-0.0.1a3-py3-none-any.whl Python 3 none any Details for github_webhook_types-0.0.1a3-py3-none-any.whl

Total release size: 261.2 kB

Release files / github_webhook_types-0.0.1a3.tar.gz

Download URL github_webhook_types-0.0.1a3.tar.gz
Size 149.0 kB
Tags Source
SHA-256 checksum
How to use checksums
f60399a4e2f75cbabb2c48e6edf6c87c4b2cb8d34a3e2e7bf9a648612a897034
BLAKE2b-256 checksum
How to use checksums
7118c7dcbff6acf9378af5f99460161300029e20a5bb719ebd09a81c368edf86
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via pdm/2.26.9 CPython/3.14.5 Linux/6.17.0-1013-azure

Release files / github_webhook_types-0.0.1a3-py3-none-any.whl

Download URL github_webhook_types-0.0.1a3-py3-none-any.whl
Size 112.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
06b4721aba1ea57547629f22c01bc90dc9b3bddedf6a601201215477a37b821a
BLAKE2b-256 checksum
How to use checksums
884d1e0f12d998728b3e12aba80b7550a20b6f7483ea12877e8519f1b9336574
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via pdm/2.26.9 CPython/3.14.5 Linux/6.17.0-1013-azure

Security for github-webhook-types 0.0.1a3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page