Install & Compatibility
Where this runs
tested against v1.2.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.588s · 21MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 2.1s · import 0.528s · 21MB
19MB installed
● package 19MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
SplunkHecHandler
✓ from splunk_hec_handler import SplunkHecHandler
SplunkHecHandler
✓ from splunk_hec_handler import SplunkHecHandler
✗ import SplunkHecHandler
Incorrect: leads to ModuleNotFoundError
Basic setup: create handler with HEC URL and token, add to logger, log a test message.
import logging
from splunk_hec_handler import SplunkHecHandler
logger = logging.getLogger('splunk')
logger.setLevel(logging.DEBUG)
handler = SplunkHecHandler(
'https://splunkhec.example.com',
token='your-hec-token',
source='python',
sourcetype='json',
index='main'
)
logger.addHandler(handler)
logger.info('Test message')
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'splunk_hec_handler'
Package not installed or import name misspelled (underscore vs hyphen). Correct import is 'splunk_hec_handler' (underscores).
fixInstall with 'pip install splunk-hec-handler' and import with 'from splunk_hec_handler import SplunkHecHandler'.
AttributeError: module 'splunk_hec_handler' has no attribute 'SplunkHecHandler'
Incorrect import style (e.g., import splunk_hec_handler then splunk_hec_handler.SplunkHecHandler should work; but if using old version or typo, fails).
fixUse 'from splunk_hec_handler import SplunkHecHandler'.
Upgrade
Version history
1.2.0latest on PyPI · released Feb 16, 2023
Audit
Dependencies
No dependency data recorded yet.