{"id":8785,"library":"wsaccel","title":"wsaccel: WebSocket Accelerator","description":"wsaccel is a Python library that provides a WebSocket accelerator for `ws4py` and `AutobahnPython`. It replaces per-byte processing in these libraries with a faster Cython implementation, primarily for UTF-8 validation and payload masking. The project is currently at version 0.6.7, but its maintainer has indicated that it will cease active development due to its dependencies (ws4py and AutobahnPython) no longer being actively maintained. Users are advised to migrate to more actively supported WebSocket libraries like Tornado or websockets.","status":"deprecated","version":"0.6.7","language":"python","source_language":"en","source_url":"https://github.com/methane/wsaccel","tags":["websocket","performance","accelerator","cython","ws4py","autobahn"],"install":[{"cmd":"pip install wsaccel","lang":"bash","label":"Install latest version"}],"dependencies":[{"reason":"wsaccel accelerates UTF-8 validation and masking operations in ws4py, if ws4py is installed.","package":"ws4py","optional":true},{"reason":"wsaccel accelerates UTF-8 validation and masking operations in AutobahnPython, if AutobahnPython is installed.","package":"AutobahnPython","optional":true},{"reason":"wsaccel provides a minor performance boost for UTF-8 validation and masking in websocket-client when available, without explicit patching.","package":"websocket-client","optional":true}],"imports":[{"wrong":"import wsaccel","symbol":"patch_autobahn","correct":"from wsaccel import patch_autobahn"},{"wrong":"import wsaccel","symbol":"patch_ws4py","correct":"from wsaccel import patch_ws4py"}],"quickstart":{"code":"import wsaccel\n\n# To accelerate AutobahnPython:\n# import autobahn.websocket\n# wsaccel.patch_autobahn()\n# print('AutobahnPython patched by wsaccel.')\n\n# To accelerate ws4py:\n# import ws4py.server.cherrypyserver\n# wsaccel.patch_ws4py()\n# print('ws4py patched by wsaccel.')\n\nprint('wsaccel imported. Manual patching for target libraries is required if not automatically detected.')","lang":"python","description":"After installing `wsaccel`, it typically needs to be explicitly patched into `AutobahnPython` or `ws4py` to provide acceleration. For `websocket-client`, `wsaccel` is automatically used if present. The patching calls should be made before the target library processes WebSocket frames."},"warnings":[{"fix":"Plan to refactor your application to use a different WebSocket library (e.g., `websockets` or `Tornado`).","message":"The wsaccel project is explicitly marked by its maintainer as no longer actively maintained. Users are strongly advised to migrate to modern, actively maintained WebSocket libraries like Tornado or websockets.","severity":"deprecated","affected_versions":"0.6.7 and prior"},{"fix":"Consider using Python versions <= 3.9 if `wsaccel` is strictly necessary, or, preferably, migrate to an actively maintained WebSocket library that is compatible with newer Python versions.","message":"Building `wsaccel` with Python 3.10 and newer may fail due to the removal of the deprecated Python buffer protocol API (e.g., `PyObject_AsReadBuffer()`). This can lead to `ImportError` or build failures.","severity":"breaking","affected_versions":"Python 3.10+"},{"fix":"Ensure that `ws4py`, `AutobahnPython`, or `websocket-client` are installed alongside `wsaccel`, and for `ws4py`/`AutobahnPython`, apply the `patch_*()` calls as shown in the quickstart.","message":"Installing `wsaccel` alone does not provide any functionality. It acts as an accelerator for other WebSocket libraries. If those libraries are not installed or explicitly patched (for `ws4py`/`AutobahnPython`), `wsaccel` will have no effect.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"search_vec":"'-8':35 '0.6.7':46 'acceler':3,13,87 'activ':56,68,77 'advis':72 'autobahn':90 'autobahnpython':17,64 'byte':22 'ceas':55 'current':43 'cython':30,88 'depend':61 'develop':57 'due':58 'faster':29 'implement':31 'indic':51 'librari':8,26,80 'like':81 'longer':66 'maintain':49,69 'mask':39 'migrat':74 'payload':38 'per':21 'per-byt':20 'perform':86 'primarili':32 'process':23 'project':41 'provid':10 'python':7 'replac':19 'support':78 'tornado':82 'user':70 'utf':34 'valid':36 'version':45 'websocket':2,12,79,84,85 'ws4py':15,62,89 'wsaccel':1,4","created_at":"2026-04-16T17:03:59.864074+00:00","updated_at":"2026-04-16T17:03:59.864074+00:00","problems":null,"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"0.6.7","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/methane/wsaccel","docs":null,"changelog":null,"pypi":"https://pypi.org/project/wsaccel/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["http-networking"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-30","last_verified":"2026-06-30","next_check":"2026-07-30","install_tag":null}}