Skip to main content

Datasette plugin to write to database via verified webhooks

Project description

datasette-webhook-write

PyPI Changelog Tests License

Datasette plugin to write to databae via verified webhooks

Installation

Install this plugin in the same environment as Datasette.

$ datasette install datasette-webhook-write

Usage

This plugin allows writing to a datasette database via hmac-signed http POST calls.

Example for metadata.yml (for usage to receive texts from https://nlg.ax/):

plugins:
  datasette-webhook-write:
    webhook_secret:
      "$env": "WEBHOOK_SECRET"
    http_header_name: "x-myax-signature"
    database_name: "example"
    table_name: "generated_texts"
    use_pk:
      - "uid"
      - "collection_id"

WEBHOOK_SECRET is set as environment variable.

Development

To set up this plugin locally, first checkout the code. Then create a new virtual environment:

cd datasette-webhook-write
python3 -mvenv venv
source venv/bin/activate

Now install the dependencies and test dependencies:

pip install -e '.[test]'

To run the tests:

pytest

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

datasette-webhook-write-0.1.tar.gz (3.3 kB view hashes)

Uploaded Source

Built Distribution

datasette_webhook_write-0.1-py3-none-any.whl (3.5 kB view hashes)

Uploaded Python 3

Supported by

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