Skip to main content

Omni API Client

Project description

Omni API

Simple REST API wrapper for the Omni infra-structure.

Configuration

Name Type Description
OMNI_BASE_URL str The base URL that is going to be used for API connections (defaults to http://localhost:8080/mvc/).
OMNI_OPEN_URL str The open URL for the Omni connection (defaults to OMNI_BASE_URL).
OMNI_PREFIX str The default prefix to be used for API requests (defaults to adm/).
OMNI_ID str The client id to be used for API connections (defaults to None).
OMNI_SECRET str The secret key to be used for API connections (defaults to None).
OMNI_REDIRECT_URL str The URL to be used for redirection OAuth based workflow (defaults to base,base.user,base.admin,foundation.store.list).
OMNI_USERNAME str The username to be used on direct workflow (defaults to None).
OMNI_PASSWORD str The password to be used on direct workflow (defaults to None).

Usage

Typical usage of the Omni client implies the providing of the username and the password inside the target omni instance (Direct Mode).

api = omni.Api(
    base_url = "http://frontdoorhq.com",
    username = "YOUR_USERNAME",
    password = "YOUR_PASSWORD"
)

Alternatively it's possible to use the api throught an OAuth base approach using the provided client id and secret values.

api = omni.Api(
    base_url = "http://frontdoorhq.com",
    client_id = "YOUR_OAUTH_ID",
    client_secret = "YOUR_OAUTH_SECRET"
)

For these type of handling the OAuthAccessError exception must be handled and then the user must be redirect to the url provided by api.oauth_autorize method call.

Running then the api.oauth_access call with the returned code from the server side that should be used to redeem the access_token required for session authentication.

Examples

Examples are located here.

License

Omni API is currently licensed under the Apache License, Version 2.0.

Build Automation

Build Status Build Status GitHub Coverage Status PyPi Status 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

omni-api-0.5.5.tar.gz (16.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

omni_api-0.5.5-py2.py3-none-any.whl (55.5 kB view details)

Uploaded Python 2Python 3

File details

Details for the file omni-api-0.5.5.tar.gz.

File metadata

  • Download URL: omni-api-0.5.5.tar.gz
  • Upload date:
  • Size: 16.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.8.3 requests/2.27.1 setuptools/44.1.0 requests-toolbelt/1.0.0 tqdm/4.64.1 CPython/2.7.18

File hashes

Hashes for omni-api-0.5.5.tar.gz
Algorithm Hash digest
SHA256 10bcd232f76b30c981fd3ae7432dfaa679f363bd02779db8406505b30e61d313
MD5 d5f553812512fd946aa161c34bd6e605
BLAKE2b-256 b52c44d8469f694991c5b0a78ad7db6f5ba4f57f18e48480ecf1674285fc3c67

See more details on using hashes here.

File details

Details for the file omni_api-0.5.5-py2.py3-none-any.whl.

File metadata

  • Download URL: omni_api-0.5.5-py2.py3-none-any.whl
  • Upload date:
  • Size: 55.5 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.8.3 requests/2.27.1 setuptools/44.1.0 requests-toolbelt/1.0.0 tqdm/4.64.1 CPython/2.7.18

File hashes

Hashes for omni_api-0.5.5-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 08d9e86fc0c6f7ce7d229d596a541fe5ff298b4cb3a6d04d7a9f5ed74dde8878
MD5 1690000743880f6499830a7a7362f20c
BLAKE2b-256 a1219dd7247d14c4961b477338b28c7cf0d85156bbab910950e418ff861f5757

See more details on using hashes here.

Supported by

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