Skip to content

Instantly share code, notes, and snippets.

@quxiao
Created July 31, 2018 07:33
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 quxiao/eaf3aed1e0c97b4cf36091c02eaddd2f to your computer and use it in GitHub Desktop.
Save quxiao/eaf3aed1e0c97b4cf36091c02eaddd2f to your computer and use it in GitHub Desktop.
#!/bin/python
import qiniu
import requests
AK='xxx'
SK='xxx'
API_HOST = 'argus.atlab.ai'
def create_face_group(group_name):
url = 'http://%s/v1/face/group/%s/new' % (API_HOST, group_name)
auth = qiniu.auth.QiniuMacAuth(AK, SK)
resp = requests.post(url, json={}, auth=qiniu.auth.QiniuMacRequestsAuth(auth))
print resp.headers
if resp.status_code != 200 :
print("resp.status should be 200,but got %s", resp.status_code)
raise Exception("response status error")
print resp.text
if __name__ == '__main__':
group_name = 'face_group_1'
create_face_group(group_name)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment