Skip to main content

Angus python SDK

Project description

Angus Python SDK's documentation
================================

Angus Python SDK is a python client library for `Angus.ai <http://www.angus.ai>`_ perception web services.
Please look at Angus.ai full API `here <http://angus-doc.readthedocs.io/en/latest/services/index.html>`_.


Installation
-----------

**Automatic installation**::

pip install angus-sdk-python

Angus SDK is listed in `PyPI <http://pypi.python.org/pypi/angus-sdk-python>`_ and
can be installed with ``pip`` or ``easy_install``. Note that the
source distribution includes demo applications that are not present
when Angus SDK is installed in this way, so you may wish to download a
copy of the source tarball as well.

**Manual installation**: Download `here <https://github.com/angus-ai/angus-sdk-python/releases/download/0.0.9/angus-sdk-python-0.0.9.tar.gz>`_

.. parsed-literal::

tar xvfz angus-sdk-python-0.0.9.tar.gz
cd angus-sdk-python-0.0.9
python setup.py build
sudo python setup.py install

The Angus SDK source code is `hosted on GitHub <https://github.com/angus-ai/angus-sdk-python>`_.

angus-sdk-python ships with a simple command tool 'angusme' that makes it easy to configure your environment.

You can explore all options by typing:

.. parsed-literal::
$ angusme --help


Configuration
-------------

In order to authenticate your request to Angus.ai servers, you must register `here <http://www.angus.ai/request-credentials/>`_, and use the provided credentials as shown below.
It is free and takes 1 minute.

In a terminal, type:

.. parsed-literal::

$ angusme
Please copy/paste your client_id: ********-****-****-****-************
Please copy/paste your access_token: ********-****-****-****-************

Note that on ``Windows`` system, the previous command might not work.
In that case use this command instead (replace by your Python installation path):

.. parsed-literal::

$ python C:\\full\\path\\to\\Python<version>\\Scripts\\angusme


Hello, world
------------

Here is a simple "Hello, world" example for Angus SDK (replace macgyver.jpg by your own image with a face to detect)::

import angus

conn = angus.connect()
service = conn.services.get_service('face_detection', version=1)
job = service.process({'image': open('./macgyver.jpg')})
print job.result['faces']


Hello, world (asynchronous)
---------------------------

Here is the same simple example but with a non-blocking call to 'process'. The provided callback is called whenever the request terminates::

import angus

def f(job):
print job.result['faces']

conn = angus.connect()
service = conn.services.get_service('face_detection', version=1)
job = service.process({'image': open('./macgyver.jpg')}, callback=f)
### do stuff here while waiting for the server response.


Go further
----------

- The complete API documentation is available `here <http://angus-doc.readthedocs.io/en/latest/services/index.html>`_.
- See "Discussion and support" bellow.


Discussion and support
----------------------

You can contact Angus.ai team at `contact@angus.ai <mailto:contact@angus.ai>`_, and report bugs on the `GitHub issue tracker <https://github.com/angus-ai/angus-sdk-python/issues>`_.

This web site and all documentation is licensed under `Creative
Commons 3.0 <http://creativecommons.org/licenses/by/3.0/>`_.

Angus Python SDK is an Angus.ai open source technology. It is available under the `Apache License, Version 2.0. <https://www.apache.org/licenses/LICENSE-2.0.html>`_. Please read LICENSE and NOTICE files for more information.

Copyright 2015-2016, Angus.ai

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

angus-sdk-python-0.0.10.tar.gz (14.3 kB view hashes)

Uploaded Source

Built Distribution

angus_sdk_python-0.0.10-py2-none-any.whl (17.3 kB view hashes)

Uploaded Python 2

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page