Skip to main content

Incredibly basic class for managing simple input/output streams

Project description

Incredibly Easy and Instantly Accessible Input Output

Class IOUtils with intuitive function names for basic petty I/O streams.

Many times there's no need to have fine-grained control over some I/O. Hence the idea to pack boilerplate code (e.g. the one in os,glob) in functions with intuitive names.

glob.os

The first aim is to pack in single functions otherwise long code snippets for operations done via the os or glob module. For instance, instead of having in the script something like this:

if not glob.os.path.exists(path):
    glob.os.makedirs(path)

Simply write IOUtils.mkdir(path). This also allows to have basic glob and os functions in a single place. For instance, get all the files in a folder recursively by extension with : IOUtils.ioglob(path,ext='txt',recursive=True).

JSON and pickle

It is often the case that for several reasons one need to (1) create simple configuration files or (2) load samll python object (e.g. dictionaries) across scripts. For this use case there's no need to have the fine-grained control provided by json and pickle modules. Hence IOUtils has load_json/save_json and load_pickle/save_pickle for these cases.

Project details


Download files

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

Files for ie-a-ia-io, version 0.1.6
Filename, size File type Python version Upload date Hashes
Filename, size ie_a_ia_io-0.1.6-py3-none-any.whl (18.7 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size ie-a-ia-io-0.1.6.tar.gz (5.6 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page