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 five things:

  1. Audience: The url of the tenant you want to interact with, including trailing slash (e.g. https://acme.armis.com/).
  2. Client ID: The email address of the user account within the tenant that was used to generate the Client Secret.
  3. Client Secret: The confidential credential generated by your customer within Armis, paired with the Client ID.
  4. Vendor ID: An identifier unique to your developer account or integration, obtained when you register on our developer portal.
  5. Scopes: The specific permissions required by your access token to interact with the desired API endpoints.

You can either provide these values using the environment variables ARMIS_AUDIENCE, ARMIS_CLIENT_ID, ARMIS_CLIENT_SECRET, ARMIS_VENDOR_ID, and ARMIS_CLIENT_ID:

from armis_sdk import ArmisSdk

armis_sdk = ArmisSdk()

or by passing them explicitly:

from armis_sdk import ArmisSdk
from armis_sdk import ClientCredentials

credentials = ClientCredentials(
    audience="<audience>",
    client_id="<client_id>",
    client_secret="<client_secret>",
    vendor_id="<vendor_id>",
    scopes=["scope1", "scope2"],
)
armis_sdk = ArmisSdk(credentials=credentials)

[!TIP] If you're building an application that interacts with multiple tenants, you can populate only the ARMIS_VENDOR_ID and ARMIS_SCOPES environment variable and pass the audience, client_id and client_secret explicitly:

from armis_sdk import ArmisSdk
from armis_sdk import ClientCredentials

credentials = ClientCredentials(
    audience="<audience>",
    client_id="<client_id>",
    client_secret="<client_secret>",
)
armis_sdk = ArmisSdk(credentials=credentials)

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-1.1.3.tar.gz (20.5 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-1.1.3-py3-none-any.whl (33.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for armis_sdk-1.1.3.tar.gz
Algorithm Hash digest
SHA256 6b4edb02bdecab551f9a4c3e0400da09e753bb23bf26e157096276c4c740efb7
MD5 c9250a9f0709f0fcf00f93c7d48cb3ff
BLAKE2b-256 8f0f008421d303347441dd05b6f47f744fe46b57e580512cabe01dcb5535d9a7

See more details on using hashes here.

Provenance

The following attestation bundles were made for armis_sdk-1.1.3.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-1.1.3-py3-none-any.whl.

File metadata

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

File hashes

Hashes for armis_sdk-1.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 e887686585822b8cc28a197b88797cde18cb5d8d8cd6db924d2ade69485aa932
MD5 059b0a5a872e3ee9db7e61e89589ed1c
BLAKE2b-256 68c5450d981558fb57399d3a91af77b5e87051ad519a796033090d90b54dabf2

See more details on using hashes here.

Provenance

The following attestation bundles were made for armis_sdk-1.1.3-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