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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

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

Hashes for stream-delay-0.1.tar.gz
Algorithm Hash digest
SHA256 f1b3453d96c16e2dcb975d01f4ced618de3170e9c1d96745b36d09c5c9784583
MD5 3a328c144db51e51c3094ccf8d094fd0
BLAKE2b-256 954ea92cce1dba6a72b65fea5b83ce1a817eef57c7cd9d4356d3fa321a9155d7

See more details on using hashes here.

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

Hashes for stream_delay-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1f103a5390d9dd1eeb3b6928ba452f8b382aa1f805d71eaacb8fdd8bd20b1c5e
MD5 ae6dadb75cfcde94ee70ef878938c3c1
BLAKE2b-256 564ee9e6215cbce6cf6088c16b7642862f0dc4b03976bc79c41cd7983ce62c20

See more details on using hashes here.

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