{"id":21140190,"url":"https://github.com/srccircumflex/wsdatautil","last_synced_at":"2026-02-14T08:31:13.923Z","repository":{"id":258349447,"uuid":"874768430","full_name":"srccircumflex/wsdatautil","owner":"srccircumflex","description":"The WsDataUtil is a lightweight, highly compatible Python module to process WebSocket data.","archived":false,"fork":false,"pushed_at":"2024-11-10T19:59:08.000Z","size":23,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-08T01:56:53.401Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/srccircumflex.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-10-18T12:32:01.000Z","updated_at":"2025-01-19T06:51:02.000Z","dependencies_parsed_at":"2024-10-18T15:40:31.720Z","dependency_job_id":null,"html_url":"https://github.com/srccircumflex/wsdatautil","commit_stats":null,"previous_names":["srccircumflex/wsdatautil"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/srccircumflex/wsdatautil","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srccircumflex%2Fwsdatautil","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srccircumflex%2Fwsdatautil/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srccircumflex%2Fwsdatautil/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srccircumflex%2Fwsdatautil/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/srccircumflex","download_url":"https://codeload.github.com/srccircumflex/wsdatautil/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srccircumflex%2Fwsdatautil/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29440297,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-14T07:24:13.446Z","status":"ssl_error","status_checked_at":"2026-02-14T07:23:58.969Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2024-11-20T07:08:36.904Z","updated_at":"2026-02-14T08:31:13.902Z","avatar_url":"https://github.com/srccircumflex.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"WsDataUtil (WebSocket Data Util)\n################################\n\nThe WsDataUtil is a lightweight, highly compatible Python module for processing WebSocket data.\nThe parsing, building and masking of WebSocket frames is implemented in C to increase performance.\n\nThe core of the module is the ``Frame`` and the ``StreamReader`` object as an interface to the C api.\n``Frame`` serves as the result value from parsing and as the parameter for building a WebSocket frame.\nA ``Frame`` is not checked for plausibility or according to the specification RFC6455.\nThis should be implemented later if required.\n\nFor the sake of completeness, the ``HandshakeRequest`` object is available.\n\nInstallation::\n\n    python -m pip install wsdatautil --upgrade\n\nGallery of WebSocket data\n=========================\n\nConnection establishment\n------------------------\n\nminimum client request::\n\n    GET /\u003cURL\u003e HTTP/1.1\n    Upgrade: websocket\n    Connection: Upgrade\n    Sec-WebSocket-Key: \u003cString-In\u003e\n    Sec-WebSocket-Version: \u003cVersion-in\u003e\n\nminimum server response::\n\n    HTTP/1.1 101 Switching Protocols\n    Upgrade: websocket\n    Connection: Upgrade\n    Sec-WebSocket-Accept: \u003cString-Out\u003e\n    Sec-WebSocket-Version: \u003cVersion-out\u003e\n\n\nThe WebSocket Key conversion\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n- `\u003cString-In\u003e` can be any base64 string.\n- On the server side, the static string ``258EAFA5-E914-47DA-95CA-C5AB0DC85B11`` is appended to the `\u003cString-In\u003e`.\n- The result is hashed with the SHA-1 function.\n- A base64 string is then created from the digest and returned as `\u003cString-Out\u003e`.\n\nWebSocket-Frame\n---------------\n\n::\n\n                 0                   1                   2                   3\n                 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1\n                |               |               |               |               |\n HEADER         +-+-+-+-+-------+-+-------------+-------------------------------+\n                |F|R|R|R|   op- |M| amount_spec | ... amount (extended I)       |\n                |I|S|S|S|  code |A|             | if amount_spec == (126|127)   |\n                |N|V|V|V|       |S|             |                               |\n                | |1|2|3|  (4)  |K|    (7)      |          (16|64)              |\n                +-+-+-+-+-------+-+-------------+— — — — — — — — — — — — — — — —+\n                | ... amount (extended II) if amount_spec == 127                |\n                +— — — — — — — — — — — — — — — —+-------------------------------+\n                |                               | masking_key if MASK == 1      |\n                +-------------------------------+-------------------------------+\n                | ... masking_key               |\n                +-------------------------------+\n\n BUFFER                                         +-------------------------------+\n                                                | payload                       |\n                +-------------------------------+— — — — — — — — — — — — — — — —+\n                : ... payload                                                   :\n                +— — — — — — — — — — — — — — — —+— — — — — — — — — — — — — — — —+\n                | ... payload                                                   |\n                +-------------------------------+-------------------------------+\n\n****\n\nTests\n=====\n\n::\n\n    python test.py\n    python test.py -h\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsrccircumflex%2Fwsdatautil","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsrccircumflex%2Fwsdatautil","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsrccircumflex%2Fwsdatautil/lists"}