bitbucket-webhooks
Python library that makes bitbucket webhook API event payloads available via decorators with payload serialized into python objects.
Installation
$ pip install bitbucket-webhooks
Quickstart
from flask import Flask
from flask import request
from bitbucket_webhooks import event_schemas
from bitbucket_webhooks import hooks
from bitbucket_webhooks import router
app = Flask(__name__)
@app.route("/hooks", methods=["POST"])
def bb_webhooks_handler():
router.route(request.headers["X-Event-Key"], request.json)
return ("", 204)
@hooks.repo_push
def _handle_repo_push(event: event_schemas.RepoPush):
print(f"One or more commits pushed to: {event.repository.name}"
Here is the full example.
Webhook events supported
- repo:push
- pullrequest:created
- pullrequest:updated
- pullrequest:approved
- pullrequest:unapproved
- pullrequest:fulfilled
- pullrequest:rejected
- pullrequest:comment_created
- pullrequest:comment_updated
- pullrequest:comment_deleted
Metadata
Release files for bitbucket-webhooks 0.0.11
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| bitbucket-webhooks-0.0.11.tar.gz | 3.9 kB | Without provenance | Details for bitbucket-webhooks-0.0.11.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| bitbucket_webhooks-0.0.11-py3-none-any.whl | Python 3 | none | any | Details for bitbucket_webhooks-0.0.11-py3-none-any.whl |
Total release size: 9.7 kB
Release files / bitbucket-webhooks-0.0.11.tar.gz
| Download URL | bitbucket-webhooks-0.0.11.tar.gz |
|---|---|
| Size | 3.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a18180c2aecb78f318b17d069b72614b2902ec45943de81bbda0da0a427c3aa3
|
|
BLAKE2b-256 checksum How to use checksums |
e18e56cc7ce8f48a74882ffad323a0df21e4d7e3e38a170d0c3ca182cc85f888
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.3
|
Release files / bitbucket_webhooks-0.0.11-py3-none-any.whl
| Download URL | bitbucket_webhooks-0.0.11-py3-none-any.whl |
|---|---|
| Size | 5.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
374bad09181ff1f1e11b91442f698be5164ada00b50d19a6f479ded067f3e23f
|
|
BLAKE2b-256 checksum How to use checksums |
61e6da9b32f1f8fa3870342e9e78a595fabce7f5bb94cd1ca773a8d74abf257a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.3
|
Security for bitbucket-webhooks 0.0.11
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.