Skip to main content

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

Project description

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.

However, for convenience, all public asynchronous functions can also be executed in a synchronous way.

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())

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

armis_sdk-0.2.0.tar.gz (10.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

armis_sdk-0.2.0-py3-none-any.whl (15.6 kB view details)

Uploaded Python 3

File details

Details for the file armis_sdk-0.2.0.tar.gz.

File metadata

  • Download URL: armis_sdk-0.2.0.tar.gz
  • Upload date:
  • Size: 10.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for armis_sdk-0.2.0.tar.gz
Algorithm Hash digest
SHA256 c87178890182bbe0774fc280a143b71145b4f7f2529477774b1bc91af8dfc8af
MD5 b4aab2f8ca792e4f4c0bffb8c19eaf25
BLAKE2b-256 a981f0b6d3e755e871806734b16a6692ecf1c4f2eeadfaff48153ad4a293718f

See more details on using hashes here.

Provenance

The following attestation bundles were made for armis_sdk-0.2.0.tar.gz:

Publisher: publish.yml on ArmisSecurity/armis-sdk-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file armis_sdk-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: armis_sdk-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 15.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for armis_sdk-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 97380864ca4648ebc3622f1457ed632c949000a2ac4cde484b30bd2b33892bad
MD5 b3e7af3ed56f920612e95fde21c8677c
BLAKE2b-256 b72155d2da79a41d086e4c6300f2c7956a54fb50fcbfdf72fd7ebf5aa467648e

See more details on using hashes here.

Provenance

The following attestation bundles were made for armis_sdk-0.2.0-py3-none-any.whl:

Publisher: publish.yml on ArmisSecurity/armis-sdk-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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