Skip to content

Sending Hume from Python

Arturo Busleiman aka Buanzo edited this page Jul 27, 2020 · 2 revisions

If instead of using the hume command line tool you would rather integrate it in a Python (v3+ only) application, this is how you do it:

from hume import Hume

msg = {
    'level': 'warning',
    'msg': 'Hello World',
    'extra': {'Custom_variable': 'Some Custom Value'},
    'tags': ['test','example', 'extra'],
    'task': 'EXAMPLE',}

Hume(msg).send()

And that's it.

If you run hume --help you will see each parameter that can be set in the msg dictionary. For instance, 'verbose': True.