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 v4.

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 first, needing create Uiza connection using app_id and authorization:

import uiza

uiza.authorization = "your-authorization"
uiza.app_id = "your-app-id"

After connection created, this is example search Entity:

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

uiza.authorization = "your-authorization"
uiza.app_id = "your-app-id"

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.2.0.tar.gz (17.6 kB view hashes)

Uploaded source

Built Distribution

uiza-1.2.0-py3-none-any.whl (32.4 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page