Skip to main content

Easiest-possible IO for basic file types.

Project description

dummio

IO for dummies! We make IO as easy as possible by implementing the most common and recommendable default options. (Users may pass additional keyword arguments to the underlying IO methods.) For example, instead of

import json

with open(file_path, 'r', encoding='utf-8') as file:
    data = json.load(file)

you can simply

import dummio

data = dummio.json.load(file_path)

So far we support:

  • text
  • json
  • yaml

Note that yaml is not a required dependency; you may install dummio and use it for json without bothering with yaml installation. Any other IO modules to be added will similarly be optional.

Examples

import dummio

text = "hello world"
data = {"key": text}
path = "io_example_file"

# Text
dummio.text.save(text, path=path)
assert text == dummio.text.load(path)

# JSON
dummio.json.save(data)
assert data == dummio.json.load(path)

# YAML
dummio.yaml.save(data)
assert data == dummio.yaml.load(path)

Installation

We're on pypi, so pip install dummio.

Development

git clone git@github.com:zkurtz/dummio.git
cd dummio
pip install uv
uv sync
source .venv/bin/activate
pre-commit install

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

dummio-0.0.3.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

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

dummio-0.0.3-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file dummio-0.0.3.tar.gz.

File metadata

  • Download URL: dummio-0.0.3.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.4

File hashes

Hashes for dummio-0.0.3.tar.gz
Algorithm Hash digest
SHA256 5b549d5479fad55960e32a1871e4f6601355dcb15a8a6e169bfdbbb45bd6651f
MD5 64a32822cccf7638832e68b22894b095
BLAKE2b-256 31073d725289bbb80707109127dedd1ebc75ace28406b1365ac74708eece8525

See more details on using hashes here.

File details

Details for the file dummio-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: dummio-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 4.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.4

File hashes

Hashes for dummio-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 40dc0dbfe9cce82db22c42d9f0bf621ab417fa0cd11cab854669080e2dbefa4c
MD5 31d69b65808ca246eb8806b4d63fd80a
BLAKE2b-256 e23ac91c225e1d552c77439b0c5a53198b44aedfb61f53f19e40cc6ce1a3662a

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