Skip to main content

Python sdk for Neokami API

Project description

Neokami Python SDK v0.1

This SDK allows you to connect your Python web-applications to the Neokami SDK.

In order to use the SDK, you need to obtain a free API Key from www.neokami.com.

Installation

  • via pip:

    pip install neokami-sdk

    Inside your python project

    import neokami-sdk

Usage

Here is a simple usage example for gender & age detection for images:

import os

req = ImageAnalyser()
directory = os.path.dirname(os.path.abspath(__file__))
req.setFile(directory + '/data/team1.jpg')
req.setApiKey('your api key here')
req.setWait(0)
analysis = req.analyse()

Chained function calls are also supported for syntax brevity:

import os

directory = os.path.dirname(os.path.abspath(__file__))
analysis = ImageAnalyser().setApiKey(NeokamiTestCredentials.api_key).setFile(directory +'/data/team1.jpg').analyse()

For a full documentation, check out the wiki:

Neokami Wiki

Tests

  • To run the tests, the pytest package is required:

    Install pytest

    pip install -U pytest # or
    easy_install -U pytest
  • Create a NeokamiTestCredentials.php inside the tests/ folder based on the template in NeokamiTestCredentials.python.replace and enter your API Key.

    Repository contributors can apply for api keys to be used inside unit tests at team@neokami.com.

  • The tests can be executed by running:

    py.test

Contributing

Coming soon.

Project details


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