Skip to main content

A simple decorator for receiving and sending data via the standard pipe

Project description

stdpipeIO

stdpipeIO is a simple Python decorator for receiving and sending data via the standard pipe. It allows you to easily read input from standard input (stdin) and write output to standard output (stdout).

Installation

To install stdpipeIO, you can use the following command:

pip install stdpipeIO

Usage

To use the pipe_io decorator, simply import it and apply it to your function. The decorated function will read input from stdin, process it, and write the result to stdout.

from src.pipeio import pipe_io

@pipe_io
def process_input(input_data):
    return input_data.upper()

if __name__ == '__main__':
    process_input()

You can then run your script and provide input via stdin:

echo "Hello, World!" | python your_script.py

The output will be:

HELLO, WORLD!

Testing

To run the tests for stdpipeIO, you can use the following command:

python -m unittest discover tests

License

This project is licensed under the MIT License. See the LICENSE file for details.

Author

Greendog - x6reend0g@foxmail.com

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

stdpipeio-0.1.1.tar.gz (2.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

stdpipeIO-0.1.1-py3-none-any.whl (1.6 kB view details)

Uploaded Python 3

File details

Details for the file stdpipeio-0.1.1.tar.gz.

File metadata

  • Download URL: stdpipeio-0.1.1.tar.gz
  • Upload date:
  • Size: 2.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for stdpipeio-0.1.1.tar.gz
Algorithm Hash digest
SHA256 08f98ff323d829e85f54ded4b2c4a3591e401d9d4520ea0715a7e873fb511b24
MD5 bc3881c772baabef5509fb74ff2361f0
BLAKE2b-256 9c9e4a18aca2100c0d217fd75838c7438b182e9d6e19f3b8cda42beb2f43129b

See more details on using hashes here.

File details

Details for the file stdpipeIO-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: stdpipeIO-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 1.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for stdpipeIO-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ec655626f2fabca83de9b3acef8ff61dc678d825d76012373d007ef83ae946d6
MD5 0d2e31c5856bf9f6292443099a2276e1
BLAKE2b-256 06b38090b03ecfab6564f5e541cd8ba86e4e3b0af777e09e09175d360f10b7f7

See more details on using hashes here.

Supported by

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