{"id":16318931,"url":"https://github.com/jadolg/rocketchat_api","last_synced_at":"2025-05-15T18:07:04.189Z","repository":{"id":37883632,"uuid":"84824266","full_name":"jadolg/rocketchat_API","owner":"jadolg","description":"Python API wrapper for Rocket.Chat","archived":false,"fork":false,"pushed_at":"2024-10-11T11:40:12.000Z","size":632,"stargazers_count":268,"open_issues_count":5,"forks_count":93,"subscribers_count":13,"default_branch":"master","last_synced_at":"2024-10-11T22:25:04.689Z","etag":null,"topics":["hacktoberfest","python-api-wrapper","rocketchat","rocketchat-api","rocketchat-sdk"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jadolg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-03-13T12:32:12.000Z","updated_at":"2024-10-11T11:40:13.000Z","dependencies_parsed_at":"2023-02-10T15:01:36.151Z","dependency_job_id":"f525a26b-8d14-47da-affe-5070adc21cd8","html_url":"https://github.com/jadolg/rocketchat_API","commit_stats":{"total_commits":634,"total_committers":47,"mean_commits":13.48936170212766,"dds":0.5741324921135647,"last_synced_commit":"44dea374868c74298f5cd71719217936071d5828"},"previous_names":[],"tags_count":81,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jadolg%2Frocketchat_API","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jadolg%2Frocketchat_API/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jadolg%2Frocketchat_API/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jadolg%2Frocketchat_API/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jadolg","download_url":"https://codeload.github.com/jadolg/rocketchat_API/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248631668,"owners_count":21136554,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hacktoberfest","python-api-wrapper","rocketchat","rocketchat-api","rocketchat-sdk"],"created_at":"2024-10-10T22:25:10.598Z","updated_at":"2025-05-15T18:07:04.183Z","avatar_url":"https://github.com/jadolg.png","language":"Python","readme":"## rocketchat_API\nPython API wrapper for [Rocket.Chat](https://developer.rocket.chat/reference/api/rest-api/)\n\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/fff725d9a0974c6597c2dd007daaa86e)](https://www.codacy.com/app/jadolg/rocketchat_API?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=jadolg/rocketchat_API\u0026amp;utm_campaign=Badge_Grade) [![Test](https://github.com/jadolg/rocketchat_API/actions/workflows/test.yml/badge.svg)](https://github.com/jadolg/rocketchat_API/actions/workflows/test.yml) [![Test against latest Rocket.Chat version](https://github.com/jadolg/rocketchat_API/actions/workflows/test_latest.yml/badge.svg)](https://github.com/jadolg/rocketchat_API/actions/workflows/test_latest.yml) [![codecov](https://codecov.io/gh/jadolg/rocketchat_API/branch/master/graph/badge.svg)](https://codecov.io/gh/jadolg/rocketchat_API) ![PyPI](https://img.shields.io/pypi/v/rocketchat_API.svg) ![](https://img.shields.io/pypi/dm/rocketchat-api.svg)\n\n### Installation\n- From pypi:\n`pip3 install rocketchat_API`\n- From GitHub:\nClone our repository and `python3 setup.py install`\n\n### Requirements\n- [requests](https://github.com/kennethreitz/requests)\n\n### Usage\n```python\nfrom pprint import pprint\nfrom rocketchat_API.rocketchat import RocketChat\n\nproxy_dict = {\n    \"http\"  : \"http://127.0.0.1:3128\",\n    \"https\" : \"https://127.0.0.1:3128\",\n}\n\nrocket = RocketChat('user', 'pass', server_url='https://demo.rocket.chat', proxies=proxy_dict)\npprint(rocket.me().json())\npprint(rocket.channels_list().json())\npprint(rocket.chat_post_message('good news everyone!', channel='GENERAL', alias='Farnsworth').json())\npprint(rocket.channels_history('GENERAL', count=5).json())\n```\n\n*note*: every method returns a [requests](https://github.com/kennethreitz/requests) Response object.\n\n#### Connection pooling\nIf 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.\n\n```python\nfrom requests import sessions\nfrom pprint import pprint\nfrom rocketchat_API.rocketchat import RocketChat\n\nwith sessions.Session() as session:\n    rocket = RocketChat('user', 'pass', server_url='https://demo.rocket.chat', session=session)\n    pprint(rocket.me().json())\n    pprint(rocket.channels_list().json())\n    pprint(rocket.chat_post_message('good news everyone!', channel='GENERAL', alias='Farnsworth').json())\n    pprint(rocket.channels_history('GENERAL', count=5).json())\n```\n\n#### Using a token for authentication instead of user and password\n\n```python\nfrom pprint import pprint\nfrom rocketchat_API.rocketchat import RocketChat\n\nrocket = RocketChat(user_id='WPXGmQ64S3BXdCRb6', auth_token='jvNyOYw2f0YKwtiFS06Fk21HBRBBuV7zI43HmkNzI_s', server_url='https://demo.rocket.chat')\npprint(rocket.me().json())\n```\n\n### Method parameters\nOnly 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](https://developer.rocket.chat/reference/api/rest-api)\n\n### API coverage\nMost of the API methods are already implemented. If you are interested in a specific call just open an issue or open a pull request.\n\n### Tests\nWe are actively testing :)\n\nTests run on a Rocket.Chat Docker container so install Docker and docker-compose.\n1. To start test server do `docker-compose up` and to take test server down `docker-compose down`\n2. To run the tests run `pytest`\n\n### Contributing\nYou 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.\n\nReporting bugs and asking for features is also contributing ;) Feel free to help us grow by registering issues.\n\nWe hang out [here](https://open.rocket.chat/channel/python_rocketchat_api) if you want to talk.\n\n### Supporters\n\n[![JetBrains logo.](https://resources.jetbrains.com/storage/products/company/brand/logos/jetbrains.svg)](https://jb.gg/OpenSourceSupport) \n\n[JetBrains](https://www.jetbrains.com/) supports this project by providing us with licenses for their fantastic products.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjadolg%2Frocketchat_api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjadolg%2Frocketchat_api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjadolg%2Frocketchat_api/lists"}