A package to create a BehaviorCloud compatible data analyzer.
Project description
BehaviorCloud Analyzer
Python Helper
This is a thin package to help you quickly create a BehaviorCloud analyzer. It will handle calls to the BehaviorCloud API server so you don't have to worry about it. This package supports the following features:
- Fully managed analyzer creation - you just make the conversion function!
- One off analysis (pass an "--id" command-line parameter)
- Daemon analysis (use the "--daemon" flag)
- Exception handling and automatic upload to Sentry.io
Example Usage:
import json
from behaviorcloud.analyzer.data import convert_stream_to_json
from behaviorcloud.analyzer.coordinator import Coordinator
def convert(source_request, source_settings, settings, source, targets):
target = targets[0]
source_data = convert_stream_to_json(source_request)
analyzed_data = [{processed: True, original: entry} for entry in source_data]
return [{
"data": json.dumps(analyzed_data),
"extension": "json",
"id": target["id"],
}]
coordinator = Coordinator(convert)
coordinator.run()
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
bc-analyzer-0.2.3.tar.gz
(5.7 kB
view hashes)
Built Distribution
Close
Hashes for bc_analyzer-0.2.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7e62cfdb1fa3bf4334b6a985133785227ae877e9736c95d8fde1f5895c039b77 |
|
MD5 | 9f1d8982960f3cd16495a0dcc586709a |
|
BLAKE2b-256 | 3824455fd5e8b8206e4c0242e6b79a1170de4fa0b631f17dc9d8141de12f7b62 |