Skip to content

ArmisClient

armis_sdk.core.armis_client.ArmisClient

A class that provides easy access to the Armis API, taking care of:

  1. Authenticating requests.
  2. Retrying of failed requests (when applicable).
  3. Pagination of requests (when applicable).
  4. Proxy configuration via HTTPS_PROXY and HTTP_PROXY environment variables.

Methods:

Name Description
list

List all items from a paginated endpoint.

list(url, body=None, pagination_location=None) async

List all items from a paginated endpoint.

Parameters:

Name Type Description Default
url str

The relative endpoint URL.

required
body dict

Payload to send as POST request.

None
pagination_location str

The nested object location to use for pagination.

None

Returns:

Type Description
AsyncIterator[dict]

An (async) iterator of dicts.

Example

import asyncio

from armis_sdk.core.armis_client import ArmisClient


async def main():
    armis_client = ArmisClient()
    async for item in armis_client.list("/v3/settings/sites"):
        print(item)


asyncio.run(main())
Will output:
{...}
{...}