Alert Logic Software Development Kit for Python.
Project description
The Alert Logic SDK For Python (almdrlib)
Alert Logic Software Development Kit for Python allows developers to integrate with Alert Logic MDR Services.
Quick Start
-
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()}")
Development
Getting Started
Prerequisites:
-
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 .
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
v1.0.61
- Mon, 28 Jun 2021 17:02:43 +0100 - Do full clone for the pypi release (#100)
v1.0.60
- Mon, 28 Jun 2021 16:57:05 +0100 - Adjust formatting for the release history (#99)
v1.0.59
- Mon, 28 Jun 2021 16:45:42 +0100 - Add automatic rel notes (#98)
v1.0.58
- Mon, 28 Jun 2021 14:18:35 +0100 - For each operation call try to resolve proper service endpoint if account_id is present in the args (#97)
v1.0.57
- Tue, 20 Apr 2021 14:10:27 +0100 - Update setup.py
- Tue, 20 Apr 2021 14:09:57 +0100 - Update requirements.txt
v1.0.54
- Tue, 30 Mar 2021 17:17:46 +0100 - Bump pyyaml from 5.1.2 to 5.4 (#96)
v1.0.53
- Thu, 25 Mar 2021 06:52:07 -0700 - Add operations to dir(...) result on clients (#94)
- Wed, 24 Mar 2021 06:55:02 -0700 - Merge pull request #95 from MikeBenza/dont-blap-moduletype
- Sun, 21 Mar 2021 21:59:27 -0700 - Don't overwrite types.ModuleType
v1.0.52
- Thu, 18 Mar 2021 12:47:40 +0000 - Support raw endpoint url (#93)
- Thu, 28 Jan 2021 19:36:24 +0000 - Rename .travis.yml to .travis.yml.defunct
v1.0.51
- Wed, 27 Jan 2021 20:10:03 +0000 - Install newver setuptools on build
- Wed, 27 Jan 2021 17:03:31 +0000 - PyPi act on tags
v1.0.50
- Wed, 27 Jan 2021 17:00:38 +0000 - AlEnv support for the mdr lib (#89)
- Wed, 27 Jan 2021 16:54:03 +0000 - Bump definitions version (#90)
- Wed, 27 Jan 2021 15:49:41 +0000 - Add test and deploy workflows
v1.0.49
- Sat, 24 Oct 2020 07:52:04 -0500 - Added user_id property to the session object (#87)
v1.0.48
- Mon, 5 Oct 2020 08:50:45 -0500 - Don't duplicate logger hander (#86)
v1.0.47
- Fri, 2 Oct 2020 11:50:11 +0100 - bump sdk definitions to v0.0.47 (#85)
- Fri, 2 Oct 2020 05:37:20 -0500 - Don't log AIMS tokens (#84)
v1.0.46
- Tue, 29 Sep 2020 18:01:05 +0100 - bump alertlogic sdk defintions version (#83)
v1.0.45
- Tue, 29 Sep 2020 14:59:05 +0100 - bump definitions dependency (#82)
v1.0.44
- Thu, 17 Sep 2020 11:22:03 +0100 - bump definitions dep (#81)
v1.0.43
- Thu, 13 Aug 2020 16:41:41 +0100 - Revert "support python < 3.6 (#78)" (#79)
v1.0.42
- Wed, 12 Aug 2020 15:15:49 +0100 - support python < 3.6 (#78)
v1.0.41
- Mon, 10 Aug 2020 16:15:13 -0500 - Updated to indicate python 3.6 support (#77)
- Mon, 10 Aug 2020 11:05:21 +0100 - Add docs test (#76)
v1.0.40
- Mon, 10 Aug 2020 10:10:44 +0100 - Update README.md
- Mon, 10 Aug 2020 10:07:48 +0100 - add docs badge (#75)
- Mon, 10 Aug 2020 10:05:06 +0100 - Support documentation case when yaml converted from json has :{} empty object (#74)
v1.0.39
- Fri, 7 Aug 2020 16:00:07 +0100 - Serialize boolean parameters to lowercase (#73)
- Fri, 7 Aug 2020 11:54:54 +0100 - Initialise _endpoints_map in the client since it is requested by default session (#72)
- Fri, 31 Jul 2020 08:08:51 -0500 - Local services (#61)
v1.0.38
- Sun, 26 Jul 2020 16:23:15 +0100 - bump definitions dependency to 0.0.31 (#60)
v1.0.37
- Fri, 24 Jul 2020 19:23:37 +0100 - bump definitions dependency to v0.0.30 (#59)
v1.0.36
- Fri, 24 Jul 2020 14:20:27 +0100 - bump sdk definitions to 0.0.28 (#58)
- Fri, 24 Jul 2020 14:17:02 +0100 - Move parsing, loading and normalisation logic for the definitions to the alsdkdefs package (#57)
v1.0.35
- Fri, 17 Jul 2020 19:30:23 +0100 - bump definitions v0.0.23 (#56)
v1.0.34
- Thu, 16 Jul 2020 12:53:39 -0500 - Residency initialization and session initialization logging. (#54)
v1.0.33
- Wed, 15 Jul 2020 11:36:13 -0500 - Merge pull request #53 from alertlogic/init_residency_fix
- Wed, 15 Jul 2020 10:47:04 -0500 - Fixed to correctly initialize default residency
- Thu, 9 Jul 2020 15:46:35 +0100 - Change readme typo (#51)
v1.0.32
- Wed, 15 Jul 2020 06:39:11 -0500 - Support further query parameter serialization (#52)
v1.0.31
- Fri, 3 Jul 2020 14:09:38 -0500 - Merge pull request #50 from alertlogic/session_global_endpoint_fix
- Fri, 3 Jul 2020 14:07:04 -0500 - Added missing global_endpoint parameter to the session initialization
- Thu, 2 Jul 2020 22:37:02 +0100 - Doc generation requires install first (#49)
v1.0.30
- Thu, 2 Jul 2020 16:55:55 +0100 - Add CR into readme (#48)
v1.0.29
- Mon, 29 Jun 2020 20:49:20 +0100 - bump default definitions to 0.0.13 (#47)
v1.0.28
- Thu, 18 Jun 2020 13:08:44 +0100 - Move definitions to definitions package (#45)
- Thu, 11 Jun 2020 18:48:46 -0500 - Fixed typo
v1.0.27
- Wed, 10 Jun 2020 10:58:35 +0100 - add token for pypi (#43)
- Wed, 10 Jun 2020 10:30:30 +0100 - add skip cleanup to allow releases (#42)
- Wed, 10 Jun 2020 04:08:26 -0500 - Request body object serialize fix (#41)
- Thu, 4 Jun 2020 13:08:55 -0300 - Update AIMS OpenAPI documentation (#39)
- Fri, 22 May 2020 14:33:41 -0500 - Merge pull request #38 from alertlogic/aerta
- Fri, 22 May 2020 14:29:31 -0500 - Added initial version of aerta API spec
- Fri, 22 May 2020 10:10:37 -0500 - Merge branch 'master' of github.com:alertlogic/alertlogic-sdk-python
- Fri, 22 May 2020 10:09:50 -0500 - Bumped version number to indicate inclusion of IRIS API
- Fri, 22 May 2020 10:07:17 -0500 - Merge pull request #36 from FinlayShepherd/iris
- Thu, 21 May 2020 20:28:11 -0500 - Merge pull request #37 from alertlogic/configure_support
- Thu, 21 May 2020 20:24:36 -0500 - Added support for configure operation. Use AIMS token when resolving endpoints
- Thu, 21 May 2020 17:32:04 +0100 - Improve IRIS example responses
- Thu, 21 May 2020 14:38:47 +0100 - Add IRIS docs
- Mon, 18 May 2020 07:02:48 -0700 - Merge pull request #32 from alertlogic/windows_installer
- Sat, 16 May 2020 20:57:54 -0500 - Ensure to read specs using utf-8 encoding to support running on windows
- Sun, 10 May 2020 14:04:53 -0500 - Merge pull request #31 from alertlogic/ingest_schema_fix
- Sun, 10 May 2020 13:39:49 -0500 - Fixed ingest service schema to pass 'anyOf' validation for send_data operation'
- Sat, 9 May 2020 16:54:04 -0500 - Merge pull request #30 from alertlogic/request_body_param_fix
- Sat, 9 May 2020 16:52:09 -0500 - Fixed to not use 'required' for object parameters as it breaks jsonschema validation
- Fri, 8 May 2020 17:50:20 -0500 - Merge pull request #29 from alertlogic/windows_support
- Fri, 8 May 2020 17:46:08 -0500 - Updated to work on windows plus other minor fixes
- Thu, 7 May 2020 11:10:22 -0700 - Merge pull request #28 from mcnielsen/master
- Thu, 7 May 2020 10:34:49 -0700 - Added a package.json to allow the repository to be consumed by NPM.
- Tue, 5 May 2020 08:33:03 -0500 - Handle a case of m2r not being installed
- Tue, 5 May 2020 08:27:01 -0500 - Merge pull request #27 from alertlogic/documentation
- Mon, 4 May 2020 18:14:21 -0500 - Changed to use newer version of sphinx
- Mon, 4 May 2020 18:09:07 -0500 - Changed to use newer version of sphinx
- Mon, 4 May 2020 18:03:37 -0500 - Added support for indirect types and other documentation improvements
- Thu, 23 Apr 2020 14:58:44 -0500 - Pinned to the supported version of m2r
- Thu, 23 Apr 2020 14:46:10 -0500 - Pinned to the supported version of m2r
- Thu, 23 Apr 2020 11:17:08 -0500 - Merge pull request #26 from alertlogic/incident_handling_support
- Thu, 23 Apr 2020 11:14:15 -0500 - Updated to the latest version of aetuner that includes incident handling settings support
- Mon, 20 Apr 2020 17:49:50 -0500 - Merge pull request #25 from alertlogic/config_init_fix
- Mon, 20 Apr 2020 17:47:34 -0500 - Fixed to correctly intialize session configuration
- Wed, 15 Apr 2020 14:15:31 -0500 - Merge pull request #24 from alertlogic/ingest-send-data-improvement
- Wed, 15 Apr 2020 14:12:53 -0500 - Support binary format for simple parameters
- Tue, 14 Apr 2020 16:07:07 -0500 - Merge pull request #23 from alertlogic/ingest-send-data-improvement
- Tue, 14 Apr 2020 16:04:42 -0500 - Increased version number
- Tue, 14 Apr 2020 16:03:33 -0500 - Added automatic retries for POST
- Tue, 14 Apr 2020 16:02:00 -0500 - Updated to support publishing syslog data to ingest
- Sun, 12 Apr 2020 14:16:04 -0500 - Merge pull request #22 from alertlogic/aetuner_release
- Sun, 12 Apr 2020 14:05:34 -0500 - Updated to support new aetuner spec
- Sat, 11 Apr 2020 15:40:56 -0500 - Merge pull request #21 from msayler/doc-fixes
- Thu, 2 Apr 2020 15:11:48 -0500 - Improve docs for first-use
- Fri, 3 Apr 2020 16:31:16 -0500 - Fixed aetuner paths and bumped up sdk version
- Fri, 3 Apr 2020 15:59:22 -0500 - Erronously bumped the version number
- Fri, 3 Apr 2020 15:41:59 -0500 - Fixed to actually have proper urls
- Fri, 3 Apr 2020 15:29:12 -0500 - Added support for aetuner endpoints.
- Fri, 3 Apr 2020 09:38:49 -0500 - Updated to use endpoints
- Wed, 1 Apr 2020 14:03:48 -0500 - Merge pull request #20 from alertlogic/response_support
- Wed, 1 Apr 2020 13:56:42 -0500 - Updated ingest api to have response information
- Wed, 1 Apr 2020 13:53:40 -0500 - Removed the need for pydoc
- Tue, 24 Mar 2020 17:11:54 -0500 - Added required module to sphinx doc generation
- Tue, 24 Mar 2020 17:04:19 -0500 - Added initial support for response objects
- Sun, 15 Mar 2020 16:16:38 -0500 - Merge pull request #19 from alertlogic/aims_token_fix
- Sun, 15 Mar 2020 16:14:03 -0500 - Fixed handling object based request bodies
- Sat, 14 Mar 2020 19:54:13 -0500 - Fixed to work with 'dictionary-like' payloadBody
- Sat, 14 Mar 2020 19:53:20 -0500 - fixed lint error'
- Sat, 14 Mar 2020 11:12:26 -0500 - Updated version number
- Sat, 14 Mar 2020 11:06:18 -0500 - Updated to allow aims token based sessions
- Fri, 13 Mar 2020 10:32:38 -0500 - Merge pull request #18 from alertlogic/ingest
- Fri, 13 Mar 2020 10:28:03 -0500 - Added jsonschema to the list of requirements
- Fri, 13 Mar 2020 10:00:41 -0500 - Updated tests
- Fri, 13 Mar 2020 10:00:21 -0500 - Added examples
- Fri, 13 Mar 2020 09:59:51 -0500 - Added new required for jsonschema validation
- Fri, 13 Mar 2020 09:59:28 -0500 - Added new required for jsonschema validation
- Fri, 13 Mar 2020 09:53:30 -0500 - Fixed lint errors
- Fri, 13 Mar 2020 09:53:08 -0500 - Added support for indirect types: oneOf, anyOf, allOf
- Fri, 13 Mar 2020 09:50:06 -0500 - Added logging.
- Fri, 13 Mar 2020 09:47:19 -0500 - Bumping up version
- Fri, 13 Mar 2020 09:46:58 -0500 - Enabled logging and put back AL image
- Fri, 6 Mar 2020 14:33:50 -0600 - Merge pull request #17 from alertlogic/docs
- Fri, 6 Mar 2020 14:31:15 -0600 - Bump version number
- Fri, 6 Mar 2020 14:29:41 -0600 - Sort operations and parameters
- Fri, 6 Mar 2020 09:41:25 -0600 - Updated readthedocs config to install sdk via setuptools
- Fri, 6 Mar 2020 08:34:49 -0600 - Removed incorrect reference to AlertLogic_Logo_White.png
- Thu, 5 Mar 2020 18:20:13 -0600 - Added response syntax
- Wed, 4 Mar 2020 12:53:13 -0600 - Merged with redoc PR
- Wed, 4 Mar 2020 12:43:15 -0600 - Merge branch 'master' of github.com:alertlogic/alertlogic-sdk-python into docs
- Wed, 4 Mar 2020 12:43:05 -0600 - Added support for dict params and enums
- Wed, 4 Mar 2020 12:42:12 -0600 - Merge pull request #16 from mcnielsen/docs
- Tue, 3 Mar 2020 19:55:17 -0800 - Merge branch 'docs' of algithub.pd.alertlogic.net:knielsen/alertlogic-sdk-python into docs
- Tue, 3 Mar 2020 19:47:27 -0800 - fix font family
- Tue, 3 Mar 2020 19:45:51 -0800 - Merge branch 'docs' of algithub.pd.alertlogic.net:knielsen/alertlogic-sdk-python into docs
- Tue, 3 Mar 2020 19:45:36 -0800 - A few finishing touches
- Tue, 3 Mar 2020 19:45:12 -0800 - fix font family
- Tue, 3 Mar 2020 19:42:05 -0800 - fix font family
- Tue, 3 Mar 2020 19:30:22 -0800 - styles for the skeery Ukrainian
- Tue, 3 Mar 2020 17:50:11 -0800 - Fixed some relative paths and added the class to the API selector
- Tue, 3 Mar 2020 17:27:42 -0800 - Merge branch 'docs' of github.com:alertlogic/alertlogic-sdk-python into docs
- Tue, 3 Mar 2020 15:30:49 -0600 - Fixed to actually build for each service
- Tue, 3 Mar 2020 13:21:01 -0800 - Added template
- Tue, 3 Mar 2020 11:39:27 -0800 - Merge branch 'docs' of github.com:alertlogic/alertlogic-sdk-python into docs
- Tue, 3 Mar 2020 13:32:34 -0600 - Added redoc support
- Mon, 2 Mar 2020 14:29:50 -0600 - Merge pull request #15 from alertlogic/docs
- Mon, 2 Mar 2020 14:24:28 -0600 - Removing “Edit on …” Buttons from Documentation
- Mon, 2 Mar 2020 14:16:39 -0600 - Merge pull request #14 from alertlogic/docs
- Mon, 2 Mar 2020 13:22:08 -0600 - Commented out formats setting
- Mon, 2 Mar 2020 11:51:13 -0600 - Merge pull request #13 from alertlogic/docs
- Mon, 2 Mar 2020 11:49:19 -0600 - Added configuration files for readthedocs.io
- Mon, 2 Mar 2020 10:56:13 -0600 - Merge pull request #12 from alertlogic/docs
- Mon, 2 Mar 2020 10:53:17 -0600 - Added missing docs generating module. Fixed lint errors
- Mon, 2 Mar 2020 10:49:46 -0600 - Initial support of generating sphinx SDK documentation
- Mon, 24 Feb 2020 16:44:18 -0600 - Merge branch 'master' of github.com:alertlogic/alertlogic-sdk-python
- Mon, 24 Feb 2020 16:44:13 -0600 - Merge pull request #11 from alertlogic/bump_version
- Mon, 24 Feb 2020 16:42:37 -0600 - Another try
- Mon, 24 Feb 2020 16:34:29 -0600 - Increased version to enable push to pypi
- Mon, 24 Feb 2020 16:32:54 -0600 - Merge pull request #10 from alertlogic/readme_travis
- Mon, 24 Feb 2020 16:31:21 -0600 - Fixed formatting
- Mon, 24 Feb 2020 16:28:40 -0600 - Added pypi and python versions
- Mon, 24 Feb 2020 16:08:12 -0600 - Merge pull request #9 from alertlogic/readme_travis
- Mon, 24 Feb 2020 16:05:44 -0600 - Added travis build status to readme
- Mon, 24 Feb 2020 15:57:06 -0600 - Merge pull request #8 from alertlogic/travis_ci
- Mon, 24 Feb 2020 15:54:52 -0600 - Initial version of travis-ci support
- Mon, 24 Feb 2020 14:31:25 -0600 - Merge pull request #7 from alertlogic/payload_serialize_fix
- Mon, 24 Feb 2020 14:30:26 -0600 - Bumped version number
- Mon, 24 Feb 2020 14:29:27 -0600 - Fixed to return a dictionary not a tuple
- Mon, 24 Feb 2020 10:56:02 -0600 - Merge pull request #6 from alertlogic/bug_fixes
- Mon, 24 Feb 2020 10:54:12 -0600 - Fixed multiple bugs. Reworked RequestBody to support multiple content-types. Fixed lint violations. Added schema tests. Use explode OpenAPI keyword to indicate that an object properties are to be serialized. Introduce v1 of exceptions
- Fri, 7 Feb 2020 15:56:50 -0600 - Merge pull request #4 from alertlogic/search_v2
- Fri, 7 Feb 2020 15:55:45 -0600 - Search API (beta) support
- Thu, 6 Feb 2020 15:25:03 -0600 - Updated to use new version of aetuner implementation
- Thu, 6 Feb 2020 14:13:26 -0600 - Merge pull request #3 from alertlogic/publish_alpha
- Thu, 6 Feb 2020 14:12:44 -0600 - Publish alpha to pypi
- Wed, 5 Feb 2020 15:54:20 -0600 - Merge pull request #2 from alertlogic/config_support
- Wed, 5 Feb 2020 15:50:46 -0600 - Bumped version number
- Wed, 5 Feb 2020 15:48:56 -0600 - Added support for alcli to pass global configuration parameters
- Tue, 4 Feb 2020 08:34:14 -0600 - Fixed to use SafeLoader for yaml
- Tue, 28 Jan 2020 13:47:40 -0600 - Merge pull request #1 from alertlogic/bug_fixes
- Tue, 28 Jan 2020 13:46:39 -0600 - Reworked to support lazy authentication
- Tue, 28 Jan 2020 13:45:00 -0600 - Fixed to use proper package name
- Tue, 28 Jan 2020 13:44:24 -0600 - Fixed to use proper package name
- Tue, 28 Jan 2020 13:44:04 -0600 - Initial version of README.md
- Sun, 26 Jan 2020 17:18:19 -0600 - Initial version OpenAPI based Python SDK
- Wed, 15 Jan 2020 13:08:23 -0600 - Initial commit
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file alertlogic-sdk-python-1.0.61.tar.gz
.
File metadata
- Download URL: alertlogic-sdk-python-1.0.61.tar.gz
- Upload date:
- Size: 98.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d8f210b7b3bf1c9c5bb875df428a2afa804d0daee9f88908ed2bb80bdbbf9e59 |
|
MD5 | abb8bbfaa43add5543c7fda40558b571 |
|
BLAKE2b-256 | 70b548178ff27c4c4d6112e63b368fa8c51e9d04b47b3295ced29a219ef6d36b |
File details
Details for the file alertlogic_sdk_python-1.0.61-py3-none-any.whl
.
File metadata
- Download URL: alertlogic_sdk_python-1.0.61-py3-none-any.whl
- Upload date:
- Size: 28.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8cbf4bb2fc84f2ed7e1088bf583cff8e54caa8d75c9eebe04ba90c02d58ace95 |
|
MD5 | 9db4245862b48c328247152c17aaf308 |
|
BLAKE2b-256 | 59795d6555df2cf4f198fcc1e97a35174228e21daa1039b55c20653ce06809f5 |