Skip to main content

Alert Logic Software Development Kit for Python.

Project description

The Alert Logic SDK For Python (almdrlib)

pypi python Build Status Docs

Alert Logic Software Development Kit for Python allows developers to integrate with Alert Logic MDR Services.

Quick Start

  1. Install the library:

    pip install alertlogic-sdk-python

  2. 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.

  3. Test installation Launch python interpreter and then type:

    import almdrlib
    aims = almdrlib.client("aims")
    res = aims.get_account_details()
    print(f"{res.json()}")
    

Development

Getting Started

Prerequisites:

  1. Python v3.7 or newer

  2. virtualenv or virtualenvwrapper (We recommend virtualenvwrapper https://virtualenvwrapper.readthedocs.io/en/latest/ )

  3. 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 .

Using local services

  • Setup a local profile:
[aesolo]
access_key_id=skip
secret_key=skip
global_endpoint=map
endpoint_map_file=aesolo.json
  • Write an endpoint map (here, ~/.alertlogic/aesolo.json; endpoint_map_file can also be an absolute path):
{
  "aecontent" : "http://127.0.0.1:8810",
  "aefr" : "http://127.0.0.1:8808",
  "aepublish" : "http://127.0.0.1:8811",
  "aerta" : "http://127.0.0.1:8809",
  "aetag" : "http://127.0.0.1:8812",
  "aetuner": "http://127.0.0.1:3000",
  "ingest" : "http://127.0.0.1:9000"
}

Alternatively global_endpoint configuration option or ALERTLOGIC_ENDPOINT value might be set to the url value:

[aesolo]
access_key_id=skip
secret_key=skip
global_endpoint=http://api.aesolo.com
...
global_endpoint=http://api.aesolo.com:3001
export ALERTLOGIC_ENDPOINT="http://api.aesolo.com"
...
export ALERTLOGIC_ENDPOINT="http://api.aesolo.com:3001"

======= History

1.0.1 (2020-02-06)

  • First release on PyPI.

1.0.4 (2020-02-07)

  • Introduce Search API support (beta)

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

alertlogic-sdk-python-1.0.55.tar.gz (93.2 kB view details)

Uploaded Source

Built Distribution

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

alertlogic_sdk_python-1.0.55-py3-none-any.whl (23.7 kB view details)

Uploaded Python 3

File details

Details for the file alertlogic-sdk-python-1.0.55.tar.gz.

File metadata

  • Download URL: alertlogic-sdk-python-1.0.55.tar.gz
  • Upload date:
  • Size: 93.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

File hashes

Hashes for alertlogic-sdk-python-1.0.55.tar.gz
Algorithm Hash digest
SHA256 4e8fc24d6a7ca0dd21fdec9408c437592cec9cc4632ebf7e9233188b72749c27
MD5 b6595eef5fa869727900aa97da6a4a4f
BLAKE2b-256 7203c3c1e4bab89d32c2611645e5b748a0e25701848ad549b6f7cc368f3d7b48

See more details on using hashes here.

File details

Details for the file alertlogic_sdk_python-1.0.55-py3-none-any.whl.

File metadata

  • Download URL: alertlogic_sdk_python-1.0.55-py3-none-any.whl
  • Upload date:
  • Size: 23.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

File hashes

Hashes for alertlogic_sdk_python-1.0.55-py3-none-any.whl
Algorithm Hash digest
SHA256 5121d1c20496e43805b9130f951fa8e5b6345f61aecbefb80974def6235b7fd0
MD5 9591f54175079e1de273550876bd7ae2
BLAKE2b-256 813ac6834564ee4ba45ade32cbb97c00222fb646988e99d9efb53de1809b1e6b

See more details on using hashes here.

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