Skip to content

6reend0g/stdpipeIO

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

stdpipeIO

github PyPI - Version

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 stdpipeIO.std_pipe_io import std_pipe_io

@std_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 - [email protected]

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages