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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for contentful_webhook_receiver-0.8.2.tar.gz
Algorithm Hash digest
SHA256 e9275c45119b72acc2f8da9dd0964b8b5926c22c86262817e1405191978e5ea8
MD5 62af294598eeea79306658316cf42216
BLAKE2b-256 2ebe45923b52346d6300dac32c90d073258f6d4214d7fac68ef0edfc37c3f865

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for contentful_webhook_receiver-0.8.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8a75adc676495cf29bf6268084f88cb1834163647cc537a3641a46b32f1dac34
MD5 119ab98e02307fe61da98fee6faab247
BLAKE2b-256 b538a6dedbd2a96034f50dd762664b61c47a64f10ae8f3339b8207c3835e4b5b

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