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 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 - 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.4.tar.gz (2.6 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.4-py3-none-any.whl (2.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: stdpipeio-0.1.4.tar.gz
  • Upload date:
  • Size: 2.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for stdpipeio-0.1.4.tar.gz
Algorithm Hash digest
SHA256 713117b29272679a0eece4b3444e65b04120f84a8f8962de838a59ceee53a188
MD5 63858948cf13008579d81dadead7adf6
BLAKE2b-256 aec6e955999c5c2628099f7fb339b94cd3f53c37f44e441ddc68375d51b11ada

See more details on using hashes here.

Provenance

The following attestation bundles were made for stdpipeio-0.1.4.tar.gz:

Publisher: python-publish.yml on 6reend0g/stdpipeIO

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: stdpipeIO-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 2.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for stdpipeIO-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 3a7036e3fb7a46291c4b05bce930f14068cd6129ab92ecda18b80ec45f239bbf
MD5 ffe0c0c8b84eb4d9ca82a16b8f8ef84b
BLAKE2b-256 9bab003d513a854222d402363668694753e0ab250cba493567f06524433cb9cc

See more details on using hashes here.

Provenance

The following attestation bundles were made for stdpipeIO-0.1.4-py3-none-any.whl:

Publisher: python-publish.yml on 6reend0g/stdpipeIO

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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