Skip to content

Instantly share code, notes, and snippets.

@Popcore
Popcore / python run pipes
Last active February 16, 2018 17:16
Run a Thingful pipe programmatically with python
import requests
import os
// use the internal URL as requests strips authorization headers on redirects
url = "https://thingful-pipes.herokuapp.com/api/run/4e9ce2e7-50b9-4fdb-a491-ff4d6da72700"
// ensure token is set in the environment
token = os.getenv("PIPES_TOKEN")
if token is None:
raise TypeError("PIPES_TOKEN must be set in the environment")