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 theuser
andpassword
.
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
Built Distribution
File details
Details for the file rocketchat_py_sdk-0.0.8.tar.gz
.
File metadata
- Download URL: rocketchat_py_sdk-0.0.8.tar.gz
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c4ac084f27de6aece724f0030791673739c37e5421d9cbb305b520ab3171e252 |
|
MD5 | 0715ef88b9bd955ac2a35ec9b34308ed |
|
BLAKE2b-256 | 1241aa0df2d207ffd4bb351e9f1e9948eafbe55d6cfd20fc907d0451fa76429b |
File details
Details for the file rocketchat_py_sdk-0.0.8-py3-none-any.whl
.
File metadata
- Download URL: rocketchat_py_sdk-0.0.8-py3-none-any.whl
- Upload date:
- Size: 6.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fdd33d80fc6c8a1909a203de17d4f3f7ec9c9b11b9df04876a4414b65551f14a |
|
MD5 | c9d90f29d2c023163a669232ca8a58fc |
|
BLAKE2b-256 | cd9276d819c60f17f0e56ffaaad6b02fd9bed331cac428cdb1e39a7f38f06f07 |