Skip to main content

Stream a file or stdin one line at a time with a delay

Project description

stream-delay

PyPI Changelog Tests License

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 line
  • stream-delay myfile.txt - same as above, this time using the filename
  • stream-delay myfile.txt myfile2.txt - streams from the first file, then the second file
  • stream-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

This version

0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

stream-delay-0.1.tar.gz (6.3 kB view hashes)

Uploaded Source

Built Distribution

stream_delay-0.1-py3-none-any.whl (6.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page