Skip to main content

Python API wrapper for Rocket.Chat

Project description

rocketchat_API

Python API wrapper for Rocket.Chat

Codacy Badge Test Test against latest Rocket.Chat version codecov PyPI

Installation

  • From pypi: pip3 install rocketchat_API
  • From GitHub: Clone our repository and pip install . inside the cloned folder.

Requirements

Usage

from rocketchat_API.rocketchat import RocketChat

rocket = RocketChat('user', 'pass', server_url='https://demo.rocket.chat')
rocket.me()
for channel in rocket.channels_list():
    print(channel.get("name"))
rocket.chat_post_message('good news everyone!', channel='GENERAL', alias='Farnsworth')
rocket.channels_history('GENERAL', count=5)

Using a token for authentication instead of user and password

from rocketchat_API.rocketchat import RocketChat

rocket = RocketChat(user_id='WPXGmQ64S3BXdCRb6', auth_token='jvNyOYw2f0YKwtiFS06Fk21HBRBBuV7zI43HmkNzI_s',
                    server_url='https://demo.rocket.chat')
rocket.me()

Method parameters

Only required parameters are explicit on the RocketChat class, but you can still use all other parameters. For a detailed parameters list check the Rocket chat API

API coverage

Most of the API methods are already implemented. If you are interested in a specific call just open an issue or open a pull request.

Tests

We are actively testing :)

Tests run on a Rocket.Chat Docker container so install Docker and docker-compose.

  1. To start test server do docker-compose up and to take test server down docker-compose down
  2. To run the tests run pytest

Contributing

You can contribute by doing Pull Requests. (It may take a while to merge your code but if it's good it will be merged). Please, try to implement tests for all your code and use a PEP8 compliant code style.

Reporting bugs and asking for features is also contributing ;) Feel free to help us grow by registering issues.

We hang out here if you want to talk.

Supporters

JetBrains logo.

JetBrains supports this project by providing us with licenses for their fantastic products.

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

rocketchat_api-3.1.0.tar.gz (76.5 kB view details)

Uploaded Source

Built Distribution

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

rocketchat_api-3.1.0-py3-none-any.whl (23.5 kB view details)

Uploaded Python 3

File details

Details for the file rocketchat_api-3.1.0.tar.gz.

File metadata

  • Download URL: rocketchat_api-3.1.0.tar.gz
  • Upload date:
  • Size: 76.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for rocketchat_api-3.1.0.tar.gz
Algorithm Hash digest
SHA256 efb195048965de01f56fba485c6358183520e683ad9f4e8562c9776dc3a479b4
MD5 666f2f2c1fa3d38dc5bd2e14b0c415c9
BLAKE2b-256 a9d0091fba33e45d091f702e76c5e3911f7efd333add18ba65b2450679952eea

See more details on using hashes here.

Provenance

The following attestation bundles were made for rocketchat_api-3.1.0.tar.gz:

Publisher: release.yml on jadolg/rocketchat_API

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rocketchat_api-3.1.0-py3-none-any.whl.

File metadata

  • Download URL: rocketchat_api-3.1.0-py3-none-any.whl
  • Upload date:
  • Size: 23.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for rocketchat_api-3.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ef5c9b5172697e2cb24662835583bf0da2ae25e10c708a029b1960efaa12d1bc
MD5 357b2ec02a8f3946ee5f094534acb1f6
BLAKE2b-256 ff8910b929b946a1130062a8b60af53fa1797127b0b17fb182e99142ac3b4780

See more details on using hashes here.

Provenance

The following attestation bundles were made for rocketchat_api-3.1.0-py3-none-any.whl:

Publisher: release.yml on jadolg/rocketchat_API

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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