{"id":20489285,"url":"https://github.com/channelstream/channelstream","last_synced_at":"2025-07-22T23:03:13.458Z","repository":{"id":15192762,"uuid":"17920892","full_name":"Channelstream/channelstream","owner":"Channelstream","description":"Channelstream is a websocket communication server for web applications","archived":false,"fork":false,"pushed_at":"2023-01-01T16:30:30.000Z","size":4959,"stargazers_count":61,"open_issues_count":14,"forks_count":13,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-06-27T17:06:55.018Z","etag":null,"topics":["async","broadcast","chat","comunication","django","flask","gevent","javascript","long-pooling","notification-service","pyramid","python","socket-server","webapp","websocket","websockets"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Channelstream.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-03-19T21:23:43.000Z","updated_at":"2024-10-10T06:40:45.000Z","dependencies_parsed_at":"2023-01-13T18:17:52.131Z","dependency_job_id":null,"html_url":"https://github.com/Channelstream/channelstream","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/Channelstream/channelstream","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Channelstream%2Fchannelstream","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Channelstream%2Fchannelstream/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Channelstream%2Fchannelstream/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Channelstream%2Fchannelstream/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Channelstream","download_url":"https://codeload.github.com/Channelstream/channelstream/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Channelstream%2Fchannelstream/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266586906,"owners_count":23952205,"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","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["async","broadcast","chat","comunication","django","flask","gevent","javascript","long-pooling","notification-service","pyramid","python","socket-server","webapp","websocket","websockets"],"created_at":"2024-11-15T17:12:09.571Z","updated_at":"2025-07-22T23:03:13.428Z","avatar_url":"https://github.com/Channelstream.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Channelstream\n\n[![Build Status]](https://travis-ci.org/Channelstream/channelstream)\n\nThis is a websocket-based real-time communication server,\nyour applications communicate with it via simple JSON REST API.\n\nVisit http://channelstream.org for more information.\n\n## Installation and Setup\n\nUse from docker:\n\n    docker pull channelstream/channelstream:latest\n    docker run --rm -p 8000:8000 -e CHANNELSTREAM_ALLOW_POSTING_FROM=0.0.0.0 channelstream/channelstream:latest\n\n# Direct usage\n\nObtain source from github and do:\n\n    YOUR_PYTHON_ENV/bin/pip install channelstream\n\nGenerate new configuration:\n\n    YOUR_PYTHON_ENV/bin/channelstream_utils make_config -o config.ini\n\nStart the server:\n\n    YOUR_PYTHON_ENV/bin/channelstream -i config.ini\n\n\n## Demos\n\nDemo applications live in https://github.com/Channelstream/channelstream_demos repository.\n\nThey show common patterns used in real-time applications.\n\n### Security and communication model\n\nChannelstream provides API explorer that you can use to interact with various\nendpoints, it is available by default under http://127.0.0.1:8000/api-explorer.\n\nTo send information client interacts only with your normal www application.\nYour app handled authentication and processing messages from client, then passed\nthem as signed message to channelstream server for broadcast.\n\nwebsocket client -\u003e webapp (security and transformation happens here) -\u003e REST call to socket server -\u003e broadcast to other clients\n\nThis model is easy to implement, secure, easy to scale and allows all kind of\nlanguages/apps/work queues to interact with socket server.\n\nAll messages need to be signed with a HMAC of destination endpoint ::\n\n    import requests\n    from itsdangerous import TimestampSigner\n    signer = TimestampSigner(SERVER_SECRET)\n    sig_for_server = signer.sign('/connect')\n    secret_headers = {'x-channelstream-secret': sig_for_server,\n                      'Content-Type': 'application/json'}\n    response = requests.post(url, data=json.dumps(payload),\n                             headers=secret_headers).json()\n\n## Data format and endpoints\n\nPlease consult API Explorer (http://127.0.0.1:8000/api-explorer) for in depth information\nabout endpoints.\n\nSome examples:\n\n* /connect **POST** connects users to the server\n* /subscribe **POST** Subscribes connection to new channels\n* /unsubscribe **POST** Removes connection from channels\n* /user_state **POST** set the state of specific user\n* /message **POST** Send message to channels and/or users\n* /message **DELETE** Delete message from history and emit changes\n* /message **PATCH** Edit existing message in history and emit changes\n* /channel_config **POST** Set channel configuration\n* /info **POST** Returns channel information\n\nClient API\n\n* /ws **GET** Handles websocket connections\n* /listen **GET** Handles long polling connections\n* /disconnect **GET** Permanently remove connection from server\n* /disconnect **POST** Permanently remove connection from server\n\n\nAdmin API\n\n* /admin/admin.json **GET** Return server information in json format for admin panel purposes\n* /admin/admin.json **POST** Return server information in json format for admin panel purposes\n\n### Responses to js client\n\nResponses to client are in form of **list** containing **objects**:\n\nexamples:\n\n**new message** ::\n\n    {\n    \"date\": \"2011-09-15T11:36:18.471862\",\n    \"message\": MSG_PAYLOAD,\n    \"type\": \"message\",\n    \"user\": \"NAME_OF_POSTER\",\n    \"channel\": \"CHAN_NAME\"\n    }\n\n**presence info** ::\n\n    {\n    \"date\": \"2011-09-15T11:43:47.434905\",\n    \"message\": {\"action\":\"joined/parted\"},\n    \"type\": \"presence\",\n    \"user\": \"NAME_OF_POSTER\",\n    \"channel\": \"CHAN_NAME\"\n    }\n\nCurrently following message types are emited: `message`, `message:edit`,\n`message:delete`, `presence`, `user_state_change`.\n\n[Build Status]: https://travis-ci.org/Channelstream/channelstream.svg?branch=master\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchannelstream%2Fchannelstream","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchannelstream%2Fchannelstream","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchannelstream%2Fchannelstream/lists"}