Async single threaded connector to Splunk HEC using an asyncio session
Project description
Splunk HEC for Home Assistant
Requires you create an aiohttp Client Session, or reuse your existing one from homeassistant.helpers.aiohttp_client.async_get_clientsession
Example
import asyncio
import aiohttp
from hass_splunk import hass_splunk
async def main():
async with aiohttp.ClientSession() as session:
splunk = hass_splunk(session=session,host="192.168.1.1",use_ssl=True,verify_ssl=False,token="private")
print(await splunk.check(connectivity=True, token=True, busy=True))
await splunk.queue({
"time": 0,
"host": "name",
"event": {
"meta": "TEST",
},
},send=False)
await splunk.send()
asyncio.run(main())
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
hass_splunk-0.0.4.tar.gz
(2.8 kB
view hashes)
Built Distribution
Close
Hashes for hass_splunk-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | af281eb94f395635e9f7c0bc81f0b448a068883156d39e3198612fdddf24db2d |
|
MD5 | cff697706fdae7ecb763e04e3a907ea6 |
|
BLAKE2b-256 | 35007847d10789cc1168fd6c6530570f6ef3a25eaac63ff758cd6b8135b132ef |