The Armis SDK is a package that encapsulates common use-cases for interacting with the Armis platform.
Use your favourite package manager to install the SDK, for example:
pip install armis_sdk
For full documentation, please visit our dedicated site.
All interaction with the SDK happens through the ArmisSdk
class. You'll need 3 things:
- Tenant name: The name of the tenant you want to interact with.
- Secret key: The secret key associated with the tenant, obtained from the tenant itself.
- 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>")
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())