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.2.0.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.2.0-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dummio-0.2.0.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.2.0.tar.gz
Algorithm Hash digest
SHA256 a079431781a4898aa8e65bdda7211ea8c284c83ab41562d8faebab6383f71f4f
MD5 cc25b32f472e104c3ec9e91614e502e1
BLAKE2b-256 9713edb552d0c185aeaab6c978b4a1a7334a81a3829326cf9b268ab5b2aa5b6a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dummio-0.2.0-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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bc4f7315afb7889122a581c2b0d401fd152d2f61506327e2c7fe3c6f566c0805
MD5 a65482bb1a30656980df90b1555a51e9
BLAKE2b-256 3aaafa75e3bcf1bbcd9a96e27970448dc234d044e0f9cd4b11534b22fdc14527

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