Alert Logic Software Development Kit for Python allows developers to integrate with Alert Logic MDR Services.
-
Install the library:
pip install alertlogic-sdk-python
-
Set up configuration file (in e.g.
~/.alertlogic/config
[default] access_key_id = YOUR_KEY secret_key = YOUR_SECRET
To create and manage access keys, use the Alert Logic Console. For information on creating an access key, see https://docs.alertlogic.com/prepare/access-key-management.htm
Optionally you can specify if you are working with integration deployment of Alert Logic MDR Services or production by specifying:
global_endpoint=integration
global_endpoint=production
NOTE: If global_endpoint isn't present, SDK defaults to production.
-
Test installation Launch python interpreter and then type:
import almdrlib aims = almdrlib.client("aims") res = aims.get_account_details() print(f"{res.json()}")
-
Python v3.7 or newer
-
virtualenv or virtualenvwrapper (We recommend virtualenvwrapper https://virtualenvwrapper.readthedocs.io/en/latest/ )
-
To produce RESTful APIs documentation install redoc-cli and npx:
npm install --save redoc-cli npm install --save npx
Setup your development environment and install required dependencies:
export WORKON_HOME=~/environments
mkdir -p $WORKON_HOME
source /usr/local/bin/virtualenvwrapper.sh
mkvirtualenv alsdk
git clone https://github.com/alertlogic/alertlogic-sdk-python
cd alertlogic-sdk-python
pip install -r requirements_dev.txt
pip install -e .