Skip to main content

A Django package to receive Webhooks from Contentful as signals

Project description

Contentful Webhook Receiver

image

image

image

A Django package to receive Webhooks from Contentful as signals

Documentation

The full documentation is at https://contentful-webhook-receiver.readthedocs.io.

Quickstart

Install Contentful Webhook Receiver:

pip install contentful-webhook-receiver

Add it to your `INSTALLED_APPS`:

INSTALLED_APPS = (
    ...
    'contentful_webhook_receiver.apps.ContentfulWebhookReceiverConfig',
    ...
)

Add Contentful Webhook Receiver's URL patterns:

from contentful_webhook_receiver import urls as contentful_webhook_receiver_urls


urlpatterns = [
    ...
    path(r'^', include(contentful_webhook_receiver_urls)),
    ...
]

Listen for the Contentful Webhook Receiver signal:

@receiver(contentful_publish_entry)
def entry_published(sender, instance: WebhookInvocation, **kwargs):
    print(instance.data['sys']['content_type']['id'])

Register a Webhook on Contentful:

The path added to the urlpatterns is [contentful-webhook/]{.title-ref}. If you're adding it to the root url configuration the path will be [https://example.com/contentful-webook/]{.title-ref}

Features

  • TODO

Running Tests

Does the code actually work?

poetry run tox

Development commands

poetry install --with=dev

Cutting new release

poetry version <patch|minor|major>
# Update changelog
git add CHANGELOG.md pyproject.toml contentful_webhook_receiver/__init__.py
NEW_RELEASE=$(poetry version --short)
git commit -m "Release $NEW_RELEASE"
git push
git tag $NEW_RELEASE
git push --tags

Credits

Tools used in rendering this package:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

contentful_webhook_receiver-0.9.0.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

contentful_webhook_receiver-0.9.0-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file contentful_webhook_receiver-0.9.0.tar.gz.

File metadata

  • Download URL: contentful_webhook_receiver-0.9.0.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.14.2 Linux/6.11.0-1018-azure

File hashes

Hashes for contentful_webhook_receiver-0.9.0.tar.gz
Algorithm Hash digest
SHA256 e84d99a7dbe1f8aba81d6d8607a066173dad9107b9aea6c1dad192359b9c291a
MD5 2362e7fc8d7d6822c915d136f8a49d36
BLAKE2b-256 ec3807d362f230505e6ce123092c3149bcf1771f9df709ff71abda8ae3c7c40f

See more details on using hashes here.

File details

Details for the file contentful_webhook_receiver-0.9.0-py3-none-any.whl.

File metadata

File hashes

Hashes for contentful_webhook_receiver-0.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 358938e2f1eef19100daf383c38917c8dd76ffd74c5a31600ad78c284e858d89
MD5 00db8609e5e4b50cd8826c3fedefdb86
BLAKE2b-256 4d661ed8c0e736382735f751ad72fe42aa1a366431bd0fcf60123a919fb34fdc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page