Skip to main content

Simple library for posting to Rocket.Chat via webhooks a.k.a. integrations.

Project description

Simple library for posting to Rocket.Chat via webhooks a.k.a. integrations


Rockethook can be installed from PyPi: pip install rockethook


The idea behind this library is to create Webhook object and then post Messages with it. You can create Message object and fulfill it with content (text and/or attachments) later.

Or you can just Webhook.quick_post('Your message') without bothering with Message objects.

It is a very small library indeed, so the best explanation is an example of usage:

>>> import rockethook
>>> my_hook = rockethook.Webhook('', my_token)
>>> msg = rockethook.Message(icon_url='')
>>> msg.append_text('First line.')
>>> msg.append_text('Second line.')
>>> msg.add_attachment(
...     title='Attach',
...     title_link='',
...     image_url=''
... )

To override default webhook’s channel:

>>> msg = rockethook.Message(channel="#my-channel")

To quickly post simple text messages:

>>> my_hook.quick_post('Hi!')
>>> my_hook.quick_post('Call me back\nPlease')

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for rockethook, version 1.0.2
Filename, size File type Python version Upload date Hashes
Filename, size rockethook-1.0.2.tar.gz (2.9 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page