Registry / serialization / pyiotools

pyiotools

JSON →
library0.3.18pypypi✓ verified 24d ago

pyiotools is a Python library that offers various utilities for handling I/O operations, including an IOHandler class for collecting input programmatically, via command-line, or GUI with an API similar to `argparse`. It also includes utilities for caching, serialization, and secret management. The library is actively maintained with frequent minor releases, currently at version 0.3.18, but is explicitly noted as being under active development with a warning that its API may undergo significant breaking changes.

pip install pyiotools
INSTALL
IMPORT
SIG · PYIOTOOLS
P
pyiotools
serializationpythonv0.3.18
Install
20.5s avg
Import
Disk
544MB
Pass rate
5/ 10
Env Coverage5 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.3.18 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
build_error
glibc
py 3.103.95 runs
installs and imports cleanly · install 20.5s · import 0.000s · 536MB
544MB installed
● package 544MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

IOHandler
from iotools import IOHandler
from pyiotools import IOHandler

This quickstart demonstrates the core `IOHandler` for defining and (simulated) parsing arguments, and the `Cache` utility for simple persistent key-value storage. It uses environment variables to make the example interactive and runnable.

import os from iotools import IOHandler, Cache # 1. Using IOHandler (similar to argparse) # Create an IOHandler instance for input collection program_io = IOHandler( 'my_app', 'A simple application demonstrating iotools input handling.' ) program_io.add_argument('--name', help='Your name', default='Guest') program_io.add_argument('--verbose', action='store_true', help='Enable verbose output') # In a real script, this would parse sys.argv. # For programmatic quickstart, we simulate parsed arguments. class MockArgs: def __init__(self, name, verbose): self.name = name self.verbose = verbose # Use environment variables to make it runnable for testing args = MockArgs( name=os.environ.get('IOT_NAME', 'User'), verbose=os.environ.get('IOT_VERBOSE', 'False').lower() == 'true' ) print(f"Hello, {args.name}!") if args.verbose: print("Verbose output enabled.") # 2. Using Cache for persistent data storage cache_name = os.environ.get('IOT_CACHE_NAME', 'my_app_data') my_cache = Cache(cache_name) # Put and get data my_cache.put('favorite_color', os.environ.get('IOT_COLOR', 'blue')) print(f"Favorite color from cache: {my_cache.get('favorite_color')}") # Update data my_cache.put('favorite_color', 'red') print(f"Updated favorite color: {my_cache.get('favorite_color')}") # Pop data popped_color = my_cache.pop('favorite_color') print(f"Popped favorite color: {popped_color}") print(f"Is favorite_color still in cache? {my_cache.get('favorite_color', 'Not Found')}")
pyio --version
Debug
Known issues
breakingThe `pyiotools` library is explicitly stated as being 'under development'. Its API will likely undergo significant changes that may break existing code, and documentation may not always be up-to-date with the latest changes.
fix
Users should expect frequent API changes and be prepared to update their code with each new release. Monitor the GitHub repository for updates and review release notes carefully.
affects: 0.x.x (all current versions)
gotchaThe `Cache` and `Serializer` classes utilize `dill` for serialization. While `pyiotools` itself does not list `dill` as a direct dependency on PyPI, it is an implicit dependency for these features. If you use `Cache` or `Serializer`, you might need to install `dill` explicitly.
fix
Ensure `dill` is installed: `pip install dill` if you plan to use `Cache` or `Serializer` features.
affects: 0.x.x (all versions using Cache/Serializer)
gotchaNaming your Python script the same as the imported module (e.g., `iotools.py` importing `from iotools import IOHandler`) can lead to import errors or circular import issues, as Python might try to import your local file instead of the installed package.
fix
Always use a different name for your script files than the libraries you are importing (e.g., `my_script.py` instead of `iotools.py`).
affects: All versions of Python
Upgrade
Version history
0.3.18latest on PyPI · released Feb 1, 2021
Audit
Dependencies

No dependency data recorded yet.

Agent activity
31 hits · last 30 days
node
26
OpenAI (training)
1
Resources
pyiotools — pip install pyiotools · libregistry