Datasette plugin to write to database via verified webhooks
Project description
datasette-webhook-write
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
Built Distribution
Close
Hashes for datasette-webhook-write-0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 82a6f30a270de2e4d54eb91b45d9e74e6388bc9881a2f6f836ff0619069d703d |
|
MD5 | 1856711e202edac57b71f47e922c1b0c |
|
BLAKE2b-256 | c42038152017225b68cce1029315ee1f6800a97af1889d021515dbd37a42c494 |
Close
Hashes for datasette_webhook_write-0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 438281d6367fb88c5f61de6e8dca8ba583f16502f7b2fc4562b977432a5e98eb |
|
MD5 | 03fbaf522247ed55e3a86791a11be331 |
|
BLAKE2b-256 | 39c5e0765acd039650541c4094d6053e5a2c4e5e3438d8365815708eea1cb53f |