Skip to content

Instantly share code, notes, and snippets.

@ReedJessen
Created March 28, 2016 19:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ReedJessen/0a6ba6b8bccb96da45cc to your computer and use it in GitHub Desktop.
Save ReedJessen/0a6ba6b8bccb96da45cc to your computer and use it in GitHub Desktop.
HelloIPStreet-Python
import requests
import json
def hello_world():
""" Hello World! example Concept Search API call
Prints a standard response json object when called """
endpoint = 'https://api.ipstreet.com/v1/sandbox/claim_only'
headers = {'Authorization': '5AsaMTe6HUypUlAqv3Rw3E6Pvjo4dYL64Rr2z2va'}
payload = json.dumps({'raw_text': 'The quick brown fox jumps over the lazy dog'})
r = requests.post(endpoint, headers=headers, data=payload)
print(json.dumps(r.json(), sort_keys=True, indent=4, separators=(',', ': ')))
return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment