websockets Documentation
Release 3.3with the asyncio mo User guide If you’re new to websockets, Getting started describes usage patterns and provides examples. If you’ve used websockets before and just need a quick reference, have a look Cheat sheet. If you need more details, the API documentation is for you. If you’re upgrading websockets, check the Changelog. Contributing Bug reports, patches and suggestions welcome! Just open an client, sends a greeting, and closes the connection. #!/usr/bin/env python import asyncio import websockets async def hello(websocket, path): name = await websocket.recv() print("{}".format(name))0 码力 | 32 页 | 176.18 KB | 2 年前3
websockets Documentation
Release 2.22 2.1 15 5.3 2.0 15 5.4 1.0 15 6 Limitations 17 7 License 19 Python Module Index 21 websockets is a library for developing WebSocket servers and clients in Python. It implements RFC 6455 with making it easy to write highly concurrent applications. Installation is as simple as pip install websockets. It requires Python 3.4 or Python 3.3 with the asyncio module, which is available with pip install reads a name from the client and sends a message. #!/usr/bin/env python import asyncio import websockets @asyncio.coroutine def hello(websocket, path): name = yield from websocket.recv() print("{}"0 码力 | 27 页 | 143.46 KB | 2 年前3
websockets Documentation
Release 4.0that says “Hello world!”: #!/usr/bin/env python import asyncio import websockets async def hello(uri): async with websockets.connect(uri) as websocket: await websocket.send("Hello world asyncio import websockets async def echo(websocket, path): async for message in websocket: await websocket.send(message) asyncio.get_event_loop().run_until_complete( websockets.serve(echo, get_event_loop().run_forever() Do you like it? Let's dive in! Tutorials If you’re new to websockets, this is the place to start. ### 1.1 Getting started Warning: This documentation is written for0 码力 | 48 页 | 224.70 KB | 2 年前3
websockets Documentation
Release 2.7Deployment 18 3.5 Limitations 18 3.6 Changelog 18 3.7 License 20 Python Module Index 21 websockets is a library for developing WebSocket servers and clients in Python. It implements RFC 6455 with simple as pip install websockets. It requires Python 3.4 or Python 3.3 with the asyncio module, which is available with pip install asyncio. ## User guide If you’re new to websockets, Getting started describes If you’ve used websockets before and just need a quick reference, have a look at Cheat sheet. If you need more details, the API documentation is for you. If you’re upgrading websockets, check the Changelog0 码力 | 28 页 | 157.50 KB | 2 年前3
websockets Documentation
Release 3.4Deployment 21 3.5 Limitations 24 3.6 Changelog 24 3.7 License 27 Python Module Index 29 websockets is a library for developing WebSocket servers and clients in Python. It implements RFC 6455 with simple as pip install websockets. It requires Python 3.4 or Python 3.3 with the asyncio module, which is available with pip install asyncio. User guide If you’re new to websockets, Getting started describes If you’ve used websockets before and just need a quick reference, have a look at Cheat sheet. If you need more details, the API documentation is for you. If you’re upgrading websockets, check the Changelog0 码力 | 36 页 | 192.66 KB | 2 年前3
websockets Documentation
Release 5.0that says “Hello world!”: #!/usr/bin/env python import asyncio import websockets async def hello(uri): async with websockets.connect(uri) as websocket: await websocket.send("Hello world asyncio import websockets async def echo(websocket, path): async for message in websocket: await websocket.send(message) asyncio.get_event_loop().run_until_complete( websockets.serve(echo, get_event_loop().run_forever() Do you like it? Let's dive in! Tutorials If you’re new to websockets, this is the place to start. ### 1.1 Getting started #### 1.1.1 Requirements web sockets requires0 码力 | 56 页 | 245.43 KB | 2 年前3
websockets Documentation
Release 6.0that says “Hello world!”: #!/usr/bin/env python import asyncio import websockets async def hello(uri): async with websockets.connect(uri) as websocket: await websocket.send("Hello world asyncio import websockets async def echo(websocket, path): async for message in websocket: await websocket.send(message) asyncio.get_event_loop().run_until_complete( websockets.serve(echo, get_event_loop().run_forever() Do you like it? Let's dive in! Tutorials If you’re new to websockets, this is the place to start. ### 1.1 Getting started #### 1.1.1 Requirements web sockets requires0 码力 | 58 页 | 253.08 KB | 2 年前3
websockets Documentation
Release 1.04 URI parser 13 4.5 Utilities 13 5 Limitations 15 6 License 17 Python Module Index 19 websockets is a library for developing WebSocket servers and clients in Python. It implements RFC 6455 with making it easy to write highly concurrent applications. Installation is as simple as pip install websockets. It requires Python 3.4 or Python 3.3 with the asyncio module, which is available with pip install reads a name from the client and sends a message. #!/usr/bin/env python import asyncio import websockets @asyncio.coroutine def hello(websocket, uri): name = yield from websocket.recv() print("{}"0 码力 | 25 页 | 137.62 KB | 2 年前3
websockets Documentation
Release 9.04.3 Security 56 5 Project 59 5.1 Changelog 59 5.2 Contributing 69 5.3 License 70 5.4 websockets for enterprise 71 Python Module Index 73 Index 75 web sockets is a library for building WebSocket messages: #!/usr/bin/env python import asyncio import websockets async def hello(): uri = "ws://localhost:8765" async with websockets.connect(uri) as websocket: await websocket.send("Hello python import asyncio import websockets async def echo(websocket, path): async for message in websocket: await websocket.send(message) start_server = websockets.serve(echo, "localhost"0 码力 | 81 页 | 352.88 KB | 2 年前3
websockets Documentation
Release 3.2Deployment 20 3.5 Limitations 20 3.6 Changelog 20 3.7 License 23 Python Module Index 25 websockets is a library for developing WebSocket servers and clients in Python. It implements RFC 6455 with simple as pip install websockets. It requires Python 3.4 or Python 3.3 with the asyncio module, which is available with pip install asyncio. ## User guide If you’re new to websockets, Getting started describes If you’ve used websockets before and just need a quick reference, have a look at Cheat sheet. If you need more details, the API documentation is for you. If you’re upgrading websockets, check the Changelog0 码力 | 32 页 | 170.46 KB | 2 年前3
共 510 条
- 1
- 2
- 3
- 4
- 5
- 6
- 51













