Skip to main content

A easy way to connect and interact with Rocket.Chat

Project description

Rocket.Chat.py.SDK

Python DDP client for Rocket.Chat.

Quick Start

Install the dependencies in your virtualenv:

pip install -e .

Run the example bot.

python examples/bot.py

Say hello and the bot will answer you.

Overview

This is a python SDK to make the access to Rocket.Chat easier, this package it's published here.

The main class of this package is the class Driver, to see it run in your terminal:

$ python

>>> import rocketchat_py_sdk.driver as driver

>>> help(driver)

>>> bot = driver.Driver(url='localhost:3000', ssl=False)

>>> bot.connect()

Docs

Publish new version

  • In your virtualenv:
python3 -m pip install --upgrade setuptools wheel

python3 setup.py sdist bdist_wheel

python3 -m pip install --upgrade twine

twine upload dist/*

Message Objects

The Rocket.Chat message schema can be found here.

Driver Methods

TODO

Development

A local instance of Rocket.Chat is required for unit tests to confirm connection and subscription methods are functional. And it helps to manually run your SDK interactions (i.e. bots) locally while in development.

In this repository have a docker-compose file that will help you to up your own Rocket.Chat instance.

Docker

Run this commands to start Rocket.Chat and database in background mode:

docker-compose up -d mongo

docker-compose up -d rocketchat
  • After that access localhost:3000

  • Create the administrator user.

  • Add the bot user with the necessary settings see easybot.py to check the user and password.

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

rocketchat_py_sdk-0.0.8.tar.gz (5.7 kB view hashes)

Uploaded Source

Built Distribution

rocketchat_py_sdk-0.0.8-py3-none-any.whl (6.0 kB view hashes)

Uploaded Python 3

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