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 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.8.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.8.0-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: contentful_webhook_receiver-0.8.0.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.12.10 Linux/6.11.0-1013-azure

File hashes

Hashes for contentful_webhook_receiver-0.8.0.tar.gz
Algorithm Hash digest
SHA256 149e796aa44af6d433894d6942a1a42eb6af3a566ec4c6fea192ab19b63a1c31
MD5 20c652656686903ea24a1bc1e027b41a
BLAKE2b-256 cc27b8c77950d631dcf690f56fee5ee002c1dc2442f3ddb32bf04d1f8ecbbeca

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for contentful_webhook_receiver-0.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9c4cb4f84d2b3edf40e5602ffca76411cc69a77c178259be67a26b5aa7384583
MD5 394eaa801827b1ce3b151a76a470f67c
BLAKE2b-256 d24bab51e5bfa37ca606a63d368de6142f943c4655957336573115de38cd736f

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