Skip to main content

Automox Console SDK for Python

Project description

Automox logo

Automox SDK for Python

Continuous Integration Release

The Automox SDK for Python includes an out-of-the-box Python library used to interact with the Automox Console API in order to:

  • Perform automated tasks
  • Retrieve Automox data
  • Perform management and administration functions
  • All other Automox Console API functionality!

This SDK automatically generated and maintained with the use of Swagger Codegen. By providing a supported mechanism with usage examples, we hope that customers can quickly get comfortable with the Automox API without the need to generate or build the library themselves.

Requirements

The SDK has been tested and supported for the following versions of Python:

  • Python 3 versions 3.9 and later

While the library will work with Python 2.7, we discourage and do not support Python 2 use as it has since been sunset and python.org recommends upgrading to Python 3.

Installation & Usage

pip install

The Automox SDK for Python is most easily installed with a single pip command to pull the latest package version from the Python package Index (PyPi). The published versions of the project are maintained at the PyPi Project page. Getting started is generally a simple as running the following command on a system with Python 3.9+ installed:

pip install automox-console-sdk

Github Release install

With each new release of the SDK, a published tag and Github Release will be created. To install the latest version of SDK from Github:

  1. Download the latest wheel from the project's Github Releases
  2. Install the wheel locally: pip install automox_console_sdk-0.1.1-py3-none-any.whl
  3. Import the package:
import automox_console_sdk 

Getting Started

Please follow the installation procedure and then move on to the following sections.

The Basics

Prior to using the SDK, it is necessary to generate an Automox API Key used for authorizing requests to the Automox API. Steps for creating an API key for you user account can be found here.

Once an API key has been created, it can then be used with the example scripts provided with the SDK. By importing the package and creating an Automox ApiClient, you will then be ready to leverage SDK functionality:

import automox_console_sdk as automox
import os

config = automox.Configuration()

client = automox.ApiClient(configuration=config)
client.default_headers['Authorization'] = f"Bearer {os.getenv('AUTOMOX_API_KEY')}"

The example above imports the package, creates a base configuration, and initializes the ApiClient with the Authorization header set with your API key. All examples avoid hard-coding API Keys in the script by leveraging the AUTOMOX_API_KEY environment variable. When running scripts, remember to set or pass your API key as an environment variable to avoid authorization exceptions:

AUTOMOX_API_KEY=<API KEY GOES HERE> python example.py

Once defining the base client with authorization, the script can be updated to include a specific API implementation. In the example below we will be using the DevicesApi to list devices:

devices_api = DevicesApi(client)

for d in devices_api.get_devices(limit=500, page=0):
    print(f"Device ID: {d.id}, Hostname: {d.name}, Server Group ID: {d.server_group_id}, IP Addresses: {d.ip_addrs}")

A fully-implemented script example of listing devices is provided along with a growing number of other examples of using the Automox SDK for Python. Feel free to contribute any scripts you have found helpful with the Community!

Example Scripts

To get started without writing a single line of Python, Example Scripts have been included with the SDK. These scripts show off simple functionality such as:

  • Listing Devices
  • Updating a Device
  • Creating a Device Group

They should be used as reference as you are building your own scripts and utilities with the Automox SDK.

Use Cases Examples

Use Case Examples have been provided to show off end to end utility of leveraging the Automox SDK within varying environments. These use cases can be used as-is or modified to meet your environment needs.

Limitations

All functionality provided by the Automox Console SDK for Python is based on the Autmox Console API specification that is publicly published. If there is functionality that is incomplete or does not yet exist, please reached out to your Customer Success Manager or contact support along with the details of what you would like to see in future releases of the SDK.

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

automox-console-sdk-0.3.0.tar.gz (118.9 kB view details)

Uploaded Source

Built Distribution

automox_console_sdk-0.3.0-py3-none-any.whl (303.3 kB view details)

Uploaded Python 3

File details

Details for the file automox-console-sdk-0.3.0.tar.gz.

File metadata

  • Download URL: automox-console-sdk-0.3.0.tar.gz
  • Upload date:
  • Size: 118.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.8

File hashes

Hashes for automox-console-sdk-0.3.0.tar.gz
Algorithm Hash digest
SHA256 6fb946cdb71fd2c745f8faa62568d7d5e248742a491891eb7992820b44a13e1a
MD5 526c4f2540ccaf8fc1d5011f3ab0bf85
BLAKE2b-256 8aaa1889cfeab5485e936f377b12aaf8e37193098e03cd3cc1d3bcdb38fc0a48

See more details on using hashes here.

File details

Details for the file automox_console_sdk-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: automox_console_sdk-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 303.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.8

File hashes

Hashes for automox_console_sdk-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 777fa9f780abd0009c2f703bb6dd87c48c2c5b403991cefc2d1a9d696b97522b
MD5 9bbafeab808d5baf5f1b11edd0c10e22
BLAKE2b-256 bd33c64a2aa3162fdef46c3932e94c38f6ff39c18d2db48c706cd1fe9b0f9232

See more details on using hashes here.

Supported by

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