{"library":"rocketchat-api","title":"Rocket.Chat API Wrapper","description":"rocketchat-api is a Python API wrapper for Rocket.Chat, allowing developers to programmatically interact with Rocket.Chat instances. It provides a convenient interface to various Rocket.Chat API endpoints, abstracting away direct HTTP requests. The library is actively maintained, with a typical release cadence of minor versions every 1-2 months, and its current version is 3.5.0.","language":"python","status":"active","last_verified":"Sun May 17","install":{"commands":["pip install rocketchat-api"],"cli":null},"imports":["from rocketchat_API.rocketchat import RocketChatAPI"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import os\nfrom rocketchat_API.rocketchat import RocketChatAPI\n\n# Configure connection details and credentials via environment variables for security\nROCKETCHAT_SCHEME = os.environ.get('ROCKETCHAT_SCHEME', 'https')\nROCKETCHAT_HOST = os.environ.get('ROCKETCHAT_HOST', 'demo.rocket.chat')\nROCKETCHAT_PORT = os.environ.get('ROCKETCHAT_PORT', '443') # Note: Port should be string for consistent config\nROCKETCHAT_USER = os.environ.get('ROCKETCHAT_USER', 'your_username')\nROCKETCHAT_PASS = os.environ.get('ROCKETCHAT_PASS', 'your_password')\n\nrocket = RocketChatAPI(settings={\n    'scheme': ROCKETCHAT_SCHEME,\n    'host': ROCKETCHAT_HOST,\n    'port': int(ROCKETCHAT_PORT), # Ensure port is int if expected by library\n    'username': ROCKETCHAT_USER,\n    'password': ROCKETCHAT_PASS\n})\n\n# Example: Get information about the current user\ntry:\n    me_info = rocket.me().json()\n    print(f\"Logged in as: {me_info.get('username')}\")\nexcept Exception as e:\n    print(f\"Error connecting or authenticating: {e}\")\n\n# Example: Send a direct message\ntry:\n    if me_info and 'username' in me_info:\n        # Replace 'otheruser' with a valid Rocket.Chat username to send a message to\n        response = rocket.chat_post_message(room_id='GENERAL', text='Hello from rocketchat-api!').json()\n        print(f\"Message sent status: {response.get('success')}\")\nexcept Exception as e:\n    print(f\"Error sending message: {e}\")","lang":"python","description":"Initializes the RocketChatAPI client using environment variables for credentials and connects to a Rocket.Chat instance. It then demonstrates fetching the current user's information and sending a public message. Ensure you replace 'your_username' and 'your_password' with actual credentials or set the corresponding environment variables.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":{"tag":null,"tag_description":null,"last_tested":"2026-05-17","installed_version":"3.6.1","pypi_latest":"3.6.1","is_stale":false,"summary":{"python_range":"3.10–3.9","success_rate":100,"avg_install_s":2.2,"avg_import_s":null,"wheel_type":"wheel"},"results":[{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"rocketchat-api","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"22.2M"},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"rocketchat-api","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":2.2,"import_time_s":null,"mem_mb":null,"disk_size":"23M"},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"rocketchat-api","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"24.5M"},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"rocketchat-api","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":2.2,"import_time_s":null,"mem_mb":null,"disk_size":"25M"},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"rocketchat-api","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"16.2M"},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"rocketchat-api","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":2,"import_time_s":null,"mem_mb":null,"disk_size":"17M"},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"rocketchat-api","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"16.0M"},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"rocketchat-api","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":2.1,"import_time_s":null,"mem_mb":null,"disk_size":"16M"},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"rocketchat-api","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"21.5M"},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"rocketchat-api","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":2.6,"import_time_s":null,"mem_mb":null,"disk_size":"22M"}]}}