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)

#### 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'})

#### Supported Calls

Only a few calls exist within the API, and I am only adding them as they are needed by users. If you need a call, open an issue or send a pull request.

#### 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.1.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

rocket_python-1.2.1-py2.py3-none-any.whl (10.9 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

File hashes

Hashes for rocket-python-1.2.1.tar.gz
Algorithm Hash digest
SHA256 28bfde564e8b6ebd755f1b826fb23304c1ccdfedaa57c040c8447f9daf1f6a08
MD5 dbd279c3a80f9ca241266d572452eba4
BLAKE2b-256 bd5a30ec747c688b73414bf45fb3c93c4a376a7915baf0bfffc816e87a7351a3

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for rocket_python-1.2.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 8bc95d2d4293ee01b8c15dc96d27d4fd27fca97fa799ab44f3dfb23f0b37152a
MD5 c97000a13b2b561ae8cc2f6c7044ce26
BLAKE2b-256 df341aaffd3950023d7f4fa0912766164d1bb4e363118b2af77a1cee1f89e76a

See more details on using hashes here.

Provenance

Supported by

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