This is a python library to communicate with the Affectiva Emotion API service to process videos and images. For more information, visit Affectiva's Developer Portal.
- Python 2.7
- requests
pip install AffectivaEmotionAPI
Sign up for credentials
http://developer.affectiva.com/apioverview/
Upload an image or a video for processing
import affectiva.api
username = 'API_USER'
passwd = 'API_PASSWD'
api = affectiva.api.EmotionAPI(username,passwd)
# Upload a file for Processing
filename = 'test_file.mp4'
job_url = api.create_job(filename)['self']
Get face detection and emotion results
job_status = api.query_job(job_url)['status']
if status == 'done':
metrics_json = api.results(job_url)
Increment the version in setup.py
rm dist/*.tar.gz
python setup.py sdist
twine upload dist/*