laceworksdk

Community-developed Python SDK for interacting with Lacework APIs.

Subpackages

Submodules

Package Contents

Classes

LaceworkClient

Lacework API wrapper for Python.

class laceworksdk.LaceworkClient(account=None, subaccount=None, api_key=None, api_secret=None, instance=None, base_domain=None, profile=None)[source]

Lacework API wrapper for Python.

property subaccount

Returns the value of the session’s subaccount.

set_org_level_access(org_level_access)[source]

A method to set whether the client should use organization-level API calls.

set_subaccount(subaccount)[source]

A method to update the subaccount the client should use for API calls.

exception laceworksdk.ApiError(response)[source]

Bases: LaceworkSDKException

Errors returned in response to requests sent to the Lacework APIs.

Several data attributes are available for inspection.

response

The requests.Response object returned from the API call.

request

The requests.PreparedRequest of the API call.

status_code

The HTTP status code from the API response.

status

The HTTP status from the API response.

details

The parsed JSON details from the API response.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception laceworksdk.LaceworkSDKException[source]

Bases: Exception

Base class for all lacework package exceptions.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.