Stream a file or stdin one line at a time with a delay
Project description
stream-delay
Stream a file or stdin one line at a time with a delay
Installation
Install this tool using pip
:
$ pip install stream-delay
Usage
Feed content to this tool either by piping to standard input or using one or more filenames.
The tool will output the data from those inputs one line at a time with a 100ms delay between each line.
You can use -d 500
to change the delay to another value expressed in milliseconds.
Examples:
cat myfile.txt | stream-delay
- will stream from that file with a 100ms delay between each linestream-delay myfile.txt
- same as above, this time using the filenamestream-delay myfile.txt myfile2.txt
- streams from the first file, then the second filestream-delay myfile.txt -d 1000
- streams from that file with a one second delay between each line
Development
To contribute to this tool, first checkout the code. Then create a new virtual environment:
cd stream-delay
python -m venv venv
source venv/bin/activate
Or if you are using pipenv
:
pipenv shell
Now install the dependencies and test dependencies:
pip install -e '.[test]'
To run the tests:
pytest
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
File details
Details for the file stream-delay-0.1.tar.gz
.
File metadata
- Download URL: stream-delay-0.1.tar.gz
- Upload date:
- Size: 6.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f1b3453d96c16e2dcb975d01f4ced618de3170e9c1d96745b36d09c5c9784583 |
|
MD5 | 3a328c144db51e51c3094ccf8d094fd0 |
|
BLAKE2b-256 | 954ea92cce1dba6a72b65fea5b83ce1a817eef57c7cd9d4356d3fa321a9155d7 |
File details
Details for the file stream_delay-0.1-py3-none-any.whl
.
File metadata
- Download URL: stream_delay-0.1-py3-none-any.whl
- Upload date:
- Size: 6.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1f103a5390d9dd1eeb3b6928ba452f8b382aa1f805d71eaacb8fdd8bd20b1c5e |
|
MD5 | ae6dadb75cfcde94ee70ef878938c3c1 |
|
BLAKE2b-256 | 564ee9e6215cbce6cf6088c16b7642862f0dc4b03976bc79c41cd7983ce62c20 |