Skip to main content

Use Oceanx for logistics.

Project description

Getting Started with OceanX Bridge Platform APIs

Introduction

OceanX Bridge Platform APIs

Install the Package

The package is compatible with Python versions 3 >=3.7, <= 3.11. Install the package from PyPi using the following pip command:

pip install ocean-x-package-sdk==1.3.0

You can also view the package at: https://pypi.python.org/pypi/ocean-x-package-sdk/1.3.0

Initialize the API Client

Note: Documentation for the client can be found here.

The following parameters are configurable for the API Client:

Parameter Type Description
brand_id string This key is the brand's abbreviation. (example - "TS")
Default: 'TS'
environment Environment The API environment.
Default: Environment.STAGING
http_client_instance HttpClient The Http Client passed from the sdk user for making requests
override_http_client_configuration bool The value which determines to override properties of the passed Http Client from the sdk user
http_call_back HttpCallBack The callback value that is invoked before and after an HTTP call is made to an endpoint
timeout float The value to use for connection timeout.
Default: 60
max_retries int The number of times to retry an endpoint call if it fails.
Default: 0
backoff_factor float A backoff factor to apply between attempts after the second try.
Default: 2
retry_statuses Array of int The http statuses on which retry is to be done.
Default: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524]
retry_methods Array of string The http methods on which retry is to be done.
Default: ['GET', 'PUT']
access_token string The OAuth 2.0 Access Token to use for API requests.

The API client can be initialized as follows:

from oceanxbridgeplatformapis.oceanxbridgeplatformapis_client import OceanxbridgeplatformapisClient
from oceanxbridgeplatformapis.configuration import Environment

client = OceanxbridgeplatformapisClient(
    brand_id='TS',
    access_token='AccessToken'
)

Environments

The SDK can be configured to use a different environment for making API calls. Available environments are:

Fields

Name Description
Testing Testing environment used for internal testing.
Staging Default Staging environment used for internal and external testing.
Production Production environment used for customer transactions only.

Authorization

This API uses OAuth 2 Bearer token.

List of APIs

Classes Documentation

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

ocean-x-package-sdk-1.3.0.tar.gz (47.7 kB view details)

Uploaded Source

Built Distribution

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

ocean_x_package_sdk-1.3.0-py3-none-any.whl (120.1 kB view details)

Uploaded Python 3

File details

Details for the file ocean-x-package-sdk-1.3.0.tar.gz.

File metadata

  • Download URL: ocean-x-package-sdk-1.3.0.tar.gz
  • Upload date:
  • Size: 47.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.13

File hashes

Hashes for ocean-x-package-sdk-1.3.0.tar.gz
Algorithm Hash digest
SHA256 27a00072b19bc8ae43ecf9401d6efe97c220103a312c46e8c14bb45b95da16e7
MD5 68c1b1dc37430f9ae19780c673a4980e
BLAKE2b-256 17bdecc02f293b24c210626c17024e73c74f11dcb268d726cc358fb05045d76c

See more details on using hashes here.

File details

Details for the file ocean_x_package_sdk-1.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for ocean_x_package_sdk-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 142514683d58bb81f43e01a7244f75b6dcb88cdd41d02f4c58b1295af0ff7993
MD5 afcce6d11cfa5b9e1dbdca2773202e66
BLAKE2b-256 4eae13f633868d9e808a9adb97b983155c7e52664313db0f577370b26d3ac5cd

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