Skip to content

RocketChat python client library using realtime api - WIP

License

Notifications You must be signed in to change notification settings

djuelg/realtime-rocketchat-python-client

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

88 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Realtime Rocketchat Python Client (originally Unha2)

This is a work-in-progress library to interact with Rocket.Chat using websockets (the "realtime API") in an asynchronous way.

It has been developed by @mathieui a year ago. Since that time aiohttp had some breaking change, which have been solved in this version. Furthermore some enhancements on missing functions have been made. Feel free to contribute to this library!

Getting started

You can clone the lib using:

git clone [email protected]:djuelg/realtime-rocketchat-python-client.git

Afterwards you have to install it, using the installer:

python3 setup.py install

Now head over to the examples/ folder and have a look at the example code. You can run the interactive shell example using:

python3 prompt.py --server open.rocket.chat --username username --password your-super-secret-password

Documentation

Classes in client.py

The most important funcionality is stored in client.py as shown below. The other files are rather small and you can take a look at them for yourself.

  • ClientData → Data used to connect to a server
  • ClientAPI → Contains all the API methods
  • Client → Creates a websocket and a connection to the server
  • EventClient → Handling incoming events of type added, changed, updated, removed, failed
  • OverrideClient → This is a basic implementation of a client. You can take a look how it is used in the prompt example

For further documentation take a look at the docs folder.

Thanks

I want to thank @mathieui for developing the basic structure of this library!

Many things were found out from reading the source of purple-rocketchat, so @mathieui want to thank its author for taking the time to write the plugin.

About

RocketChat python client library using realtime api - WIP

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%