Skip to main content

Record and play back pipes.

Project description

pipevcr

Record and play back pipes. Similar to what script does with the terminal but for pipes.

This can be used for debugging or testing where timing matters.

Installation

pip3 install --user pipevcr

# or if you have pipx
pipx install pipevcr

Usage

usage: pipevcr [-h] [-r] [-s SPEED] [-m MAX_PAUSE] FILE

pipevcr - the linux pipe recorder

positional arguments:
  FILE                  data file

options:
  -h, --help            show this help message and exit
  -r, --record          record pipe
  -s SPEED, --speed SPEED
                        playback speed, <1 to slow down, >1 to speed up
  -m MAX_PAUSE, --max-pause MAX_PAUSE
                        max pause time between outputs in seconds

Record

You record a pipe with -r, e.g.:

(echo wait 1; sleep 1; echo wait 2; sleep 2; echo end) | pipevcr -r test.vcr

Playback

And play it back with:

pipevcr test.vcr

Faster

To speed it up (2=double):

pipevcr -s 2 test.vcr

Slower

To slow it down (.5=half):

pipevcr -s .5 test.vcr

You can also set the maximum pause time separately:

pipevcr -m 1 test.vcr

Project details


Download files

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

Source Distribution

pipevcr-0.1.2.tar.gz (3.4 kB view details)

Uploaded Source

File details

Details for the file pipevcr-0.1.2.tar.gz.

File metadata

  • Download URL: pipevcr-0.1.2.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.3

File hashes

Hashes for pipevcr-0.1.2.tar.gz
Algorithm Hash digest
SHA256 164ca5ac86d3f822f5ea54a31179344212c3b8e3b3980a5ac064be5561b36cbd
MD5 2ae11e9f9afc310d4cc14be65769b88a
BLAKE2b-256 99b696b3fb0832d7deb092b8e320549b042aed9752d57e057a7aa6f549d7dd73

See more details on using hashes here.

Supported by

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