Skip to content

Instantly share code, notes, and snippets.

@jrbail01
Last active March 11, 2019 03:51
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 jrbail01/2f9e6c8ac4ccca555b1a3b2aea4c089b to your computer and use it in GitHub Desktop.
Save jrbail01/2f9e6c8ac4ccca555b1a3b2aea4c089b to your computer and use it in GitHub Desktop.
import requests
import json
ACCESS_KEY = "PLACE YOUR INITIAL STATE ACCESS KEY HERE"
BUCKET_KEY = "reqtest1"
BUCKET_NAME = "Python Test"
def createBucket(bucketKey, bucketName):
url = 'https://groker.init.st/api/buckets'
headers = {
'Content-Type': 'application/json',
'X-IS-AccessKey': ACCESS_KEY,
'Accept-Version': '~0'
}
data = {
'bucketKey': bucketKey,
'bucketName': bucketName
}
r = requests.post(url=url, headers=headers, data=json.dumps(data))
return r
r = createBucket(BUCKET_KEY, BUCKET_NAME)
print r
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment