Skip to main content

Uiza SDK tool

Project description

Python Client for Uiza platform

Introduction

The Uiza API is organized around RESTful standard. Our API has predictable, resource-oriented URLs, and uses HTTP response codes to indicate API errors. JSON is returned by all API responses, including errors, although our API libraries convert responses to appropriate language-specific objects.

Documentation

See the .Uiza API docs.

Installation

Supported Python Versions

  • Python 2.7.x. Python 2.7 support will be removed on January 1, 2020.
  • Python 3.x
  • Tested with Python 2.7.11, 3.4, 3.6.8

Install uiza package via pip

Suggestion install this library using pip with virtualenv. Because with virtualenv, it is possible to install this library without:

  • Needing system install permission.
  • Clashing with the installed system dependencies.

On Mac/Linux

pip install virtualenv
virtualenv <your-env>
source <your-env>/bin/activate
<your-env>/bin/pip install uiza

On Windows

pip install virtualenv
virtualenv <your-env>
<your-env>\Scripts\activate
<your-env>\Scripts\pip.exe install uiza

Usage

The library needs to be configured with your account's workspace_api_domain and authorization (API key). See details here.

The first, needing create Uiza connection using workspace_api_domain and authorization:

import uiza

uiza.workspace_api_domain = 'your-workspace-api-domain.uiza.co'
uiza.authorization = 'your-api-key'

After connection created, this is example search Entity:

import uiza
from uiza.api_resources.entity import Entity
from uiza.exceptions import ServerException

uiza.workspace_api_domain = "your-workspace-api-domain.uiza.co"
uiza.authorization = "your-authorization"

try:
    entity_data, _ = Entity().search(keyword='Sample')
except ServerException as e:
    raise e
except Exception as e:
    raise e

...

Next steps, reading the Client Library Documentation to see other available methods on the client.

Unittest

The first, you need install dependencies:

pip install -r requirements.txt

Run unittest:

python -m unittest discover tests

Coverage code:

coverage run -m unittest discover tests
coverage report

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/uizaio/api-wrapper-python.

License

The package is available as open source under the terms of the MIT License.

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

uiza-1.1.2.tar.gz (17.8 kB view hashes)

Uploaded Source

Built Distribution

uiza-1.1.2-py2-none-any.whl (31.6 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