Skip to main content

RocketChat API with Python

Project description

#### RocketChat API

Python API wrapper for the [Rocket chat API](https://rocket.chat/docs/developer-guides/rest-api)

[Documentation](http://rocket-python.readthedocs.io/en/latest/)

#### Install

pip install rocket-python

#### Usage

Initialize the client with a username and password. This user must have Admin privs:

from rocketchat.api import RocketChatAPI

api = RocketChatAPI(settings={'username': 'someuser', 'password': 'somepassword',
                              'domain': 'https://myrockethchatdomain.com'})
##### Available Calls

api.send_message(‘message’, ‘room_id’) api.get_private_rooms() api.get_private_room_history(‘room_id’, oldest=date) api.get_public_rooms() api.get_room_info(‘room_id’) api.get_private_room_info(‘room_id’) api.get_room_history(‘room_id’) api.get_my_info()

check /rocketchat/calls/api.py for more.

#### Running Tests

py.test tests rocketchat

##### Sending a message

You’ll first need to get the _id of the room you want to send a message to. Currently, Rocket can only send messages to public rooms.

api.send_message(‘Your message’, room_id)

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

rocket-python-1.2.3.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rocket_python-1.2.3-py2.py3-none-any.whl (12.9 kB view details)

Uploaded Python 2Python 3

File details

Details for the file rocket-python-1.2.3.tar.gz.

File metadata

  • Download URL: rocket-python-1.2.3.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for rocket-python-1.2.3.tar.gz
Algorithm Hash digest
SHA256 1ee499a12228fcf18dc5f240d7f5abc7b8cbddcd9c4462d517164db33eaa739d
MD5 c17ce18db7631a6620d915991f94ef31
BLAKE2b-256 aef02efcba680808be75d7475fe66a8c8f4990a0a48182cfadd69902f9355187

See more details on using hashes here.

File details

Details for the file rocket_python-1.2.3-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for rocket_python-1.2.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 125566c0d11ee091fd0132643ef4e7da0b9cd7a66e47ed4d9f038db9db428ced
MD5 2b133ec03245c5dae1b6d4fbe4f5aba4
BLAKE2b-256 57b97ee308b2f2208884768a6ec59e9322ecc5f3f456a08bbb197711355a226c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page