Quick Python Script for processing Overland web hooks #167
gloriouslyawkwardlife
started this conversation in
Show and tell
Replies: 1 comment
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Up until now I've just had an Apache CouchDB server set up and exposed to the internet to receive the webhook packets from Overland and then would use Python to pull the data and push it into a table in MariaDB, but last night I decided to cut out the middleman altogether and build a
cgi-bin
application in Python to receive the hook and push it directly into the database. I wanted to build this as a Wolfram API using Wolfram Language like I've done most everything else, but Wolfram APIs only accept web form (application/x-www-form-urlencoded
) and not JSON payloads.The script drops "-1" values and replaces them with an SQL
NULL
, and then I made a handler for the 'motion' field, which comes across as a JSON array (a.k.a.List
in Python and Wolfram).Beta Was this translation helpful? Give feedback.
All reactions