Skip to main content

A SDK package for utilizing the BoonLogic nano API

Project description

Python SDK Documentation

This python package allows ease of access to calls to the BoonLogic Nano API.


Installation

The BoonNano SDK is a Python3 project and can be installed via pip.

pip install boonnano

License setup

Note: A license must be obtained from Boon Logic to use the BoonNano Python SDK

The license should be placed in a file named ~/.BoonLogic.license

{
  "default": {
    "api-key": "API-KEY",
    "server": "WEB ADDRESS",
    "api-tenant": "API-TENANT"
  }
}

The API-KEY, WEB ADDRESS, and API-TENANT will be unique to your obtained license.

The .BoonLogic.license file will be consulted by the BoonNano Python SDK to successfully find and authenticate with your designated server.

Connectivity Test

The following Python script provides a basic proof-of-connectivity:

connect-example.py

import boonnano as bn
import json
import sys

# create new nano handle
try:
    nano = bn.NanoHandle('default')
except bn.BoonException as be:
    print(be)
    sys.exit(1)

# open/attach to nano
success, response = nano.open_nano('my-instance')
if not success:
    print("open_nano failed: {}".format(response))
    sys.exit(1)

# fetch the version information for this nano instance
success, response = nano.get_version()
if not success:
    print("get_version failed: {}".format(response))
    sys.exit(1)
print(json.dumps(response, indent=4))

# close/detach the nano instance
success, response = nano.close_nano()
if not success:
    print("close_nano failed: {}".format(response))
    sys.exit(1)

Running the connect-test.py script should yield something like:

% python connect-example.py
{
    "release": "dev",
    "api-version": "/expert/v3",
    "nano-secure": "3c40f1d6",
    "builder": "f5db0682",
    "expert-api": "f6643822",
    "expert-common": "c0575a50",
    "swagger-ui": "914af396"
}

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

boonnano-3.1.6.tar.gz (11.8 kB view details)

Uploaded Source

File details

Details for the file boonnano-3.1.6.tar.gz.

File metadata

  • Download URL: boonnano-3.1.6.tar.gz
  • Upload date:
  • Size: 11.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.7.0 requests/2.25.1 setuptools/57.0.0 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.6

File hashes

Hashes for boonnano-3.1.6.tar.gz
Algorithm Hash digest
SHA256 463d3b2cacbfea76b1717a93a8adb16573a5fff830e18739e32f84e9ed50c805
MD5 4be26705943aac981b1a86db9f5b05b0
BLAKE2b-256 0a8cd9355e440f03132b76a8dc3feace713f02727974ef5f5d9e92b405ccd3d6

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