{"id":18269505,"url":"https://github.com/ergo/channelstream_twisted_test","last_synced_at":"2025-04-09T03:14:41.344Z","repository":{"id":15173330,"uuid":"17901124","full_name":"ergo/channelstream_twisted_test","owner":"ergo","description":"EXPERIMENT: channelstream on twisted DO NOT USE IN PRODUCTION","archived":false,"fork":false,"pushed_at":"2014-04-06T12:38:06.000Z","size":168,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-14T21:29:09.937Z","etag":null,"topics":[],"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/ergo.png","metadata":{"files":{"readme":"README.rst","changelog":null,"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-19T11:02:28.000Z","updated_at":"2018-09-05T20:22:52.000Z","dependencies_parsed_at":"2022-08-25T08:22:43.615Z","dependency_job_id":null,"html_url":"https://github.com/ergo/channelstream_twisted_test","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ergo%2Fchannelstream_twisted_test","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ergo%2Fchannelstream_twisted_test/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ergo%2Fchannelstream_twisted_test/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ergo%2Fchannelstream_twisted_test/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ergo","download_url":"https://codeload.github.com/ergo/channelstream_twisted_test/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247968377,"owners_count":21025823,"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":[],"created_at":"2024-11-05T11:36:12.498Z","updated_at":"2025-04-09T03:14:41.330Z","avatar_url":"https://github.com/ergo.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"channelstream\n=============\n\nThis is **experimental code** based on twisted and autbahn.\n\nBasic usage::\n\n    YOUR_PYTHON_ENV/bin/channelstream\n\n\nYou can also see simple pyramid/angularjs demo included, open your browser and point it to following url::\n\n    http://127.0.0.1:8000/demo\n\n**To run the demo you will need to have the `requests` package installed in your environment**\n\nPossible config options for the server::\n\n    YOUR_PYTHON_ENV/bin/channelstream -h\n\nThe server can also be configured via ini files, example::\n\n    [channelstream]\n    debug = 0\n    port = 8000\n    demo_app_url = http://127.0.0.1\n    secret = YOURSECRET\n    admin_secret = YOURADMINSECRET\n    allow_posting_from = 127.0.0.1,\n                         x.x.x.x,\n                         y.y.y.y,\n\n\n\nData format and endpoints\n=========================\n\n/connect?secret=YOURSECRET\n--------------------------\n\nexpects a json request in form of::\n\n    { \"user\": YOUR_USER_NAME,\n      \"conn_id\": CUSTOM_UNIQUE_UID_OF_CONNECTION, # for example uuid.uuid4()\n    \"channels\": [ \"CHAN_NAME1\", \"CHAN_NAMEX\" ]\n    }\n   \nwhere channels is a list of channels this connection/user should be subscribed to.\n\n/info?secret=YOURSECRET\n--------------------------\n\nexpects a json request in form of::\n\n    { \n    \"channels\": [ \"CHAN_NAME1\", \"CHAN_NAMEX\" ]\n    }\n   \nwhere channels is a list of channels you want information about.\nIf channel list is empty server will return full list of all channels and their\ninformation.\n\n/disconnect\n--------------------------\n\nexpects a json request in form of::\n\n    { \"conn_id\": CONN_ID}\n\nmarks specific connection to be garbage collected\n\n/message?secret=YOURSECRET\n--------------------------\n\nexpects a json request in form of::\n\n    {\n    \"channel\": \"CHAN_NAME\", #optional\n    \"pm_users\": [USER_NAME1,USER_NAME2], #optional\n    \"user\": \"NAME_OF_POSTER\",\n    \"message\": MSG_PAYLOAD\n    }\n\nWhen just channel is present message is public to all connections subscribed \nto the channel. When channel \u0026 pm_users is a private message is sent \nto connections subscribed to this specific channel. \nIf only pm_users is present a private message is sent to all connections that are\nowned by pm_users.  \n\n/subscribe?secret=YOURSECRET\n----------------------------\n\nexpects a json request in form of::\n\n    { \"channels\": [ \"CHAN_NAME1\", \"CHAN_NAMEX\" ], \"conn_id\": \"CONNECTION_ID\"}\n\n\n/user_status?secret=YOURSECRET\n----------------------------\n\nexpects a json request in form of::\n\n    { \"user\": USER_NAME, \"status\":STATUS_ID_INT}\n\n\nResponses to js client\n----------------------\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\": null,\n    \"type\": \"join\",\n    \"user\": \"NAME_OF_POSTER\",\n    \"channel\": \"CHAN_NAME\"\n    }\n\n\nInstallation and Setup\n======================\n\nObtain source from bitbucket and do::\n\n    python setup.py develop\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fergo%2Fchannelstream_twisted_test","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fergo%2Fchannelstream_twisted_test","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fergo%2Fchannelstream_twisted_test/lists"}