Asyncio high level UDP sockets.
Project description
Asyncio high level UDP sockets
Asyncio high level UDP sockets.
Project homepage: https://github.com/eerimoq/asyncudp
Documentation: https://asyncudp.readthedocs.org/en/latest
Installation
$ pip install asyncudp
Example client
import asyncio
import asyncudp
async def main():
sock = await asyncudp.create_socket(remote_addr=('127.0.0.1', 9999))
sock.sendto(b'Hello!')
print(await sock.recvfrom())
sock.close()
asyncio.run(main())
Example server
import asyncio
import asyncudp
async def main():
sock = await asyncudp.create_socket(local_addr=('127.0.0.1', 9999))
while True:
data, addr = await sock.recvfrom()
print(data, addr)
sock.sendto(data, addr)
asyncio.run(main())
Test
$ python3 -m unittest
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
asyncudp-0.11.0.tar.gz
(4.0 kB
view details)
Built Distribution
File details
Details for the file asyncudp-0.11.0.tar.gz
.
File metadata
- Download URL: asyncudp-0.11.0.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c8ab6459f4dc8ebc42f401d3bd72c2a6c6808d10e42231f39e0c433ac646abf9 |
|
MD5 | d412333ac0d0c9387b7ff1dc7d1b1ee1 |
|
BLAKE2b-256 | 890bb94c42d75e2bd018727e625fa3147447cdfb26603e7b0892a4fdfcd2154d |
File details
Details for the file asyncudp-0.11.0-py3-none-any.whl
.
File metadata
- Download URL: asyncudp-0.11.0-py3-none-any.whl
- Upload date:
- Size: 3.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 96d859d86471e3ed30cf9f05cb38e96920156e3a9fe70ee916096ba758ea316e |
|
MD5 | d90226c138344f1cf41893edcbeca01c |
|
BLAKE2b-256 | 17fe77f4a24264e728fd95542e53f026a91249b51d1611087b8c82d3a033ea97 |