Skip to main content
****************************************
HIPOCHAT: Websocket chat server
****************************************

Supports notifications and keep the old messages

Hipochat is an open-source websocket chat server, using RabbitMQ as message queue, Tornado as Backend Server and
Redis for persistent data.

Keeps the notifications count and also supports injections from external server directly to websocket
Supports checking authentication with your own webserver.


How it works
======================================================

First clone the project

**git clone https://github.com/Hipo/hipochat.git**


Then install the requirements

**pip install -r requirements.txt**


Make sure that you have redis-server and rabbitmq servers are running
Set your variables in

vars.py::

PushNotificationURL = '<ENDPOINT RECEIVES YOUR PUSH NOTIFICATION SIGNAL AND SEND AN PN>'
ProfileURL = '<ENDPOINT YOU CAN ASK IF USER IS AUTHENTICATED>'
RABBIT_URL = '<RABBITMQ SERVER>'
RABBIT_USERNAME = '<RABBITMQ USERNAME>'
RABBIT_PASS = '<RABBITMQ PASSWORD>'
REDIS_URL = '<REDIS_URL>'


You can check the nginx reverse proxy details

Technical Detail
===================================================

Chat Server Endpoint
---------------------

Your backend server needs an EP that you should be able to create a chat room or receive the chat room tokens


Example request::

HEADER: Authentication: Token <Token>
URLs: **/api/chat**

Example response::

{
"chat": {
"token": "e598c2a9-317a-4577-8cbd-7fd5f0cddbdf"
}
}


If room is created you should receive '201 CREATED' MESSAGE else if exists '200 OK'
200 OK means you already have this chat room and you should fetch the old messages


Receive the old messages
-----------------------------------------

You visit the url with parameters below


Example Request::

HEADER -> Authorization: Token <token>
HTTP GET **/talk/old/<chat_room_token>/**


Response::

HTTP 200 OK

{
oldy: [
{
timestamp: 1414768486.196569,
message: "asdasda",
author: "asdasda"
},
{
timestamp: 1414770934.580683,
message: "adsadsdasads",
author: "assaddsa"
},
{
timestamp: 1414772188.836509,
message: "dsadasads",
author: "dssdaasd"
},
{
timestamp: 1414773038.058612,
token: "ac9e8485-8120-4cdc-a5c7-2687a04f01b5",
injected: {
message: "hede",
hodo: "hede"
}
}
]
}



As an authenticated user you can post injections to CHAT server
------------------------------------------------

You can inject external messages from a Backend Server directly into Websocket

Example Request::

HEADER -> Authorization: Token <token>
HTTP POST **/talk/item/<chat_room_token>/**

{ message: "foobar",
user: "johndoe"
}


Start the Live Chat Server
--------------------------------------------------------

Chat Server works with websocket technology
Also you will see the injections in chat dialogue when an injection comes directly to Chat Server
You should pass the user authentication token as query parameter

Example Request::

WEBSOCKET
ws://server.url/talk/chat/<chat_token>/?token=<auth_token>


NOTIFICATIONS COUNT
-----------------------------------------------------

You can receive the notifications count of chat rooms for authenticated user
by sending a request like below

HTTP GET **/talk/notification/<chat_token>/?type=<type>**

Got some of the code from https://github.com/haridas/RabbitChat

Metadata

Release files for hipochat 0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hipochat 0.1
File Size Uploaded Provenance
hipochat-0.1.tar.gz 6.4 kB Without provenance Details

Release files / hipochat-0.1.tar.gz

Download URL hipochat-0.1.tar.gz
Size 6.4 kB
Tags Source
SHA-256 checksum
How to use checksums
4c635fb6573f5c70ff772dbd7f76f4f74ed02b1e832d43eb7656df5a0684bcff
BLAKE2b-256 checksum
How to use checksums
d1f065011f280e29932a65073017562e795454e06c2510063d7c5ac08526f62d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for hipochat 0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page