Record and replay UDP streams
Reason this release was yanked:
bugged
Project description
UDPRecorder
UDPRecorder is a Python library for recording and replaying UDP steams. It is made to ease the development of applications based on UDP streams. It is originally used to replay telemetry data from sim racing games such as Assetto Corsa Competizione or F1 20XX games.
Installation
Use the package manager pip to install UDPRecorder.
pip install udprecorder
Usage
Commandline
record_udp -p 1234 -s 127.0.0.1 -f myfile.bin -b 1024 -c 9999 -s 3600
replay_udp -p 1234 -s 127.0.0.1 -f myfile.bin
| description | required | type | default | ||
|---|---|---|---|---|---|
| -p | --port | Port to listen/replay to | False | int | 1234 |
| -s | --server | Host to listen/replay to | False | str | 127.0.0.1 |
| -f | --file | File to save/read the stream | False | str | udp.bin |
| -b | --buffer | Buffer size limit | False | int | 65536 |
| -c | --count | number of message to read | False | int | 1000000000 |
| -t | --time | time limit to record | False | int | 1000000000 |
In scripts
import udprecorder
# To record a stream
udprecorder.record(
file_name = 'my_record.bin', # path to the saved replay
addr = ('127.0.0.1', 1234) # (host, port) to listen to
buffer_size = 65536 # size of buffer used for the socket
max_num_packets = 1200 # stop the record after 1200 event received
max_seconds = 3600 # stop the record after 1 hour
)
# To replay a stream
udprecorder.replay(
file_name = 'my_record.bin', # path to the saved replay
addr = ('127.0.0.1', 1234) # (host, port) to emit to
)
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. A list of future changes is available just below. Feel free to contribute on those points.
Please make sure to update tests as appropriate.
Future updates
- Add parameter to adjust the replay speed
- better handling of errors
- Add pipeline for tests / pre-commits
- Add badges on the readme based on build
- Add tox to tests multiples environments
License
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file udprecorder-0.1.5.tar.gz.
File metadata
- Download URL: udprecorder-0.1.5.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.5.1 CPython/3.10.11 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d6abb0e31eb872b070f41107267ecf15e9df31f97737920cc2e3e596fb1859a8
|
|
| MD5 |
048c3403bdc949bfbe5863020b8cbd6c
|
|
| BLAKE2b-256 |
063a73bb48dcd8389cb014a5b8fe29ce90cc5ca6249334263fc658a0421f7c5b
|
File details
Details for the file udprecorder-0.1.5-py3-none-any.whl.
File metadata
- Download URL: udprecorder-0.1.5-py3-none-any.whl
- Upload date:
- Size: 5.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.5.1 CPython/3.10.11 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
69e641d38233a2e99dfa56675a67caf6e844d692b6d2ac1de9a368556321c69f
|
|
| MD5 |
7b65f5b3fa4ac02deb4acfcab54bff48
|
|
| BLAKE2b-256 |
a5c506c544ccdb1888f1fd9e8bd8e7dc066b5ca0a8e1c3835c2f4774e8a612b5
|