
Security News
New CNA Scorecard Tool Ranks CVE Data Quality Across the Ecosystem
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.
This library implements the WebSocket protocol based on the Sans-IO library wsproto. I/O is handled by the anyio project which makes this library compatible to asyncio, trio and curio.
This library requires Python 3.5+. You can install it directly from PyPI:
python3 -m pip install -U anysocks
If you want the cutting edge development version instead, install it directly from GitHub:
python3 -m pip install -U git+https://github.com/clamor-py/anysocks@master#egg=anysocks
This README only provides a short overview, see the full documentation here.
import anyio
from anysocks import open_connection
async def main():
async with open_connection('wss://echo.websocket.org') as con:
print('Connection established!')
# First, let's send some text to the server.
text = input('What to send? ')
await con.send_message(text)
# Now, we receive and verify the server's response.
message = await con.get_message()
assert message == text, "Received {}, expected {}".format(message, text)
print('Connection closed with code {}', con.close_code.value)
anyio.run(main)
FAQs
WebSocket protocol implementation for anyio
We found that anysocks demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.
Research
/Security News
Two npm packages masquerading as WhatsApp developer libraries include a kill switch that deletes all files if the phone number isn’t whitelisted.
Research
/Security News
Socket uncovered 11 malicious Go packages using obfuscated loaders to fetch and execute second-stage payloads via C2 domains.