Skip to content

The Armis SDK is a package that encapsulates common use-cases for interacting with the Armis platform.

License

Notifications You must be signed in to change notification settings

ArmisSecurity/armis-sdk-python

Repository files navigation

Armis SDK for Python 3.9+

Run tests Run formatter Run linter

The Armis SDK is a package that encapsulates common use-cases for interacting with the Armis platform.

Installation

Use your favourite package manager to install the SDK, for example:

pip install armis_sdk

Documentation

For full documentation, please visit our dedicated site.

Usage

All interaction with the SDK happens through the ArmisSdk class. You'll need 3 things:

  1. Tenant name: The name of the tenant you want to interact with.
  2. Secret key: The secret key associated with the tenant, obtained from the tenant itself.
  3. Client id: A unique identifier for you application. Currently, this can be any string.

You can either provide these values using the environment variables ARMIS_TENANT, ARMIS_SECRET_KEY, and ARMIS_CLIENT_ID:

from armis_sdk import ArmisSdk

armis_sdk = ArmisSdk()

or by passing them explicitly:

from armis_sdk import ArmisSdk

armis_sdk = ArmisSdk(tenant="<tenant>", secret_key="<secret_key>", client_id="<client_id>")

Tip

If you're building an application that interacts with multiple tenants, you can populae only the ARMIS_CLIENT_ID environment variable and pass the tenant and secret_key explicitly:

from armis_sdk import ArmisSdk

armis_sdk = ArmisSdk(tenant="<tenant>", secret_key="<secret_key>")

Entity clients

Once you have an instance of ArmisSdk, you can start interacting with the various clients, each handles use-cases of a specific entity.

Note

Note that all functions in this SDK that eventually make HTTP requests are asynchronous.

For example, if you want to update a site's location:

import asyncio

from armis_sdk import ArmisSdk
from armis_sdk.entities.site import Site

armis_sdk = ArmisSdk()

async def main():
    site = Site(id="1", location="new location")
    await armis_sdk.sites.update(site)

asyncio.run(main())

About

The Armis SDK is a package that encapsulates common use-cases for interacting with the Armis platform.

Resources

License

Stars

Watchers

Forks

Languages