Created
July 31, 2018 07:33
-
-
Save quxiao/eaf3aed1e0c97b4cf36091c02eaddd2f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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