Package: automox-console-sdk
Automox SDK for PythonThe Automox SDK for Python includes an out-of-the-box Python library used to interact with theAutomox Console APIin order to:Perform automated tasksRetrieve Automox dataPerform management and administration functionsAll other Automox Console API functionality!This SDK automatically generated and maintained with the use ofSwagger 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.RequirementsThe SDK has been tested and supported for the following versions of Python:Python 3 versions 3.9 and laterWhile 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.orgrecommends upgrading to Python 3.Installation & Usagepip installThe Automox SDK for Python is most easily installed with a singlepipcommand to pull the latest package version from
thePython package Index (PyPi). The published versions of the project are maintained at thePyPi Project page. Getting started is generally a simple as running
the following command on a system with Python 3.9+ installed:pipinstallautomox-console-sdkGithub Release installWith each new release of the SDK, a published tag and Github Release will be created. To install the latest version of
SDK from Github:Download the latest wheel from the project'sGithub ReleasesInstall the wheel locally:pip install automox_console_sdk-0.1.1-py3-none-any.whlImport the package:importautomox_console_sdkGetting StartedPlease follow theinstallation procedureand then move on to the following sections.The BasicsPrior to using the SDK, it is necessary to generate anAutomox API Keyused for authorizing requests to the Automox API. Steps for creating an API key for you user account can be foundhere.Once an API key has been created, it can then be used with theexample scriptsprovided with the
SDK. By importing the package and creating an Automox ApiClient, you will then be ready to leverage SDK functionality:importautomox_console_sdkasautomoximportosconfig=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 theApiClientwith the
Authorization header set with your API key. All examples avoid hard-coding API Keys in the script by leveraging theAUTOMOX_API_KEYenvironment variable. When running scripts, remember to set or pass your API key as an environment
variable to avoid authorization exceptions:AUTOMOX_API_KEY=<APIKEYGOESHERE>pythonexample.pyOnce 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)fordindevices_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-implementedscript exampleof 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 ScriptsTo get started without writing a single line of Python,Example Scriptshave been included with the
SDK. These scripts show off simple functionality such as:Listing DevicesUpdating a DeviceCreating a Device GroupThey should be used as reference as you are building your own scripts and utilities with the Automox SDK.Use Cases ExamplesUse Case Exampleshave
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.LimitationsAll 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 orcontact supportalong with
the details of what you would like to see in future releases of the SDK.