All Projects → jadolg → Rocketchat_api

jadolg / Rocketchat_api

Licence: mit
Python API wrapper for Rocket.Chat

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Rocketchat api

Documentation
Pantheon Docs
Stars: ✭ 157 (-1.26%)
Mutual labels:  hacktoberfest
Creative Computing Society.github.io
This is the Hacktoberfest first contribution website of CCS
Stars: ✭ 158 (-0.63%)
Mutual labels:  hacktoberfest
Ajari Koding
📚 Kumpulan berbagai sumber daya untuk belajar koding dari hasil karya para kreator lokal yang terpercaya dan telah dikurasi oleh komunitas PHPID
Stars: ✭ 156 (-1.89%)
Mutual labels:  hacktoberfest
Products.cmfplone
The core of the Plone content management system
Stars: ✭ 157 (-1.26%)
Mutual labels:  hacktoberfest
Go Appimage
Go implementation of AppImage tools. Still experimental
Stars: ✭ 156 (-1.89%)
Mutual labels:  hacktoberfest
Osbrain
osBrain - A general-purpose multi-agent system module written in Python
Stars: ✭ 157 (-1.26%)
Mutual labels:  hacktoberfest
Playframework
Play Framework
Stars: ✭ 12,041 (+7472.96%)
Mutual labels:  hacktoberfest
Docs
Various Yii 3.0 related documentation
Stars: ✭ 159 (+0%)
Mutual labels:  hacktoberfest
Jsx Pragmatic
Build JSX structures, then decide at runtime which pragma you want to use to render them.
Stars: ✭ 157 (-1.26%)
Mutual labels:  hacktoberfest
Camunda Bpm Platform
Flexible framework for workflow and decision automation with BPMN and DMN. Integration with Spring, Spring Boot, CDI.
Stars: ✭ 2,390 (+1403.14%)
Mutual labels:  hacktoberfest
Eleventy Garden
🌱 A starter site for building a mind garden with eleventy
Stars: ✭ 157 (-1.26%)
Mutual labels:  hacktoberfest
Photos
📸 Your memories under your control
Stars: ✭ 157 (-1.26%)
Mutual labels:  hacktoberfest
Fselect
Find files with SQL-like queries
Stars: ✭ 3,103 (+1851.57%)
Mutual labels:  hacktoberfest
Syliusresourcebundle
Simpler CRUD for Symfony applications
Stars: ✭ 156 (-1.89%)
Mutual labels:  hacktoberfest
Notas De Aula
Reunião de anotações sobre conteúdos aprendidos por mim.
Stars: ✭ 159 (+0%)
Mutual labels:  hacktoberfest
Brain.js
brain.js is a GPU accelerated library for Neural Networks written in JavaScript.
Stars: ✭ 12,358 (+7672.33%)
Mutual labels:  hacktoberfest
Sampleapis
This repository is a playground for API's. These are just a collection of items that you can utilize for learning purposes.
Stars: ✭ 157 (-1.26%)
Mutual labels:  hacktoberfest
Kotlin Openapi Spring Functional Template
🍃 Kotlin Spring 5 Webflux functional application with api request validation and interactive api doc
Stars: ✭ 159 (+0%)
Mutual labels:  hacktoberfest
Uint128
uint128 for Go
Stars: ✭ 156 (-1.89%)
Mutual labels:  hacktoberfest
Relm
Idiomatic, GTK+-based, GUI library, inspired by Elm, written in Rust
Stars: ✭ 2,063 (+1197.48%)
Mutual labels:  hacktoberfest

rocketchat_API

Python API wrapper for Rocket.Chat

Codacy Badge Test and publish codecov PyPI

Installation

  • From pypi: pip3 install rocketchat_API
  • From GitHub: Clone our repository and python3 setup.py install

Requirements

Usage

from pprint import pprint
from rocketchat_API.rocketchat import RocketChat

proxy_dict = {
    "http"  : "http://127.0.0.1:3128",
    "https" : "https://127.0.0.1:3128",
}

rocket = RocketChat('user', 'pass', server_url='https://demo.rocket.chat', proxies=proxy_dict)
pprint(rocket.me().json())
pprint(rocket.channels_list().json())
pprint(rocket.chat_post_message('good news everyone!', channel='GENERAL', alias='Farnsworth').json())
pprint(rocket.channels_history('GENERAL', count=5).json())

note: every method returns a requests Response object.

Connection pooling

If you are going to make a couple of request, you can user connection pooling provided by requests. This will save significant time by avoiding re-negotiation of TLS (SSL) with the chat server on each call.

from requests import sessions
from pprint import pprint
from rocketchat_API.rocketchat import RocketChat

with sessions.Session() as session:
    rocket = RocketChat('user', 'pass', server_url='https://demo.rocket.chat', session=session)
    pprint(rocket.me().json())
    pprint(rocket.channels_list().json())
    pprint(rocket.chat_post_message('good news everyone!', channel='GENERAL', alias='Farnsworth').json())
    pprint(rocket.channels_history('GENERAL', count=5).json())

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. To start test server do docker-compose -f docker-compose-test-server.yml up and to take test server down docker-compose -f docker-compose-test-server.yml down

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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].