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

Uploaded Python 3

File details

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

File metadata

  • Download URL: dummio-0.1.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.1.0.tar.gz
Algorithm Hash digest
SHA256 552d8d04ec0e78f06a504727839807a32257b49c4ebe9f162fe1e39989766a56
MD5 7ece9921ce2fc676f6d738085ffe9a62
BLAKE2b-256 6ec294564ff9e3237ce73a538a329befa2fccf36a568489382876a3dcecfe3d1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dummio-0.1.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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d20486ee361e4a639817bc796eca0b9aca2d268dbce2aac936c1a80c61bb7fc0
MD5 966ac5566a9323468037446f4a074e52
BLAKE2b-256 6776d875347d49f2c182585454112574cea4a9ccf1092bb5ed45c0905386f49b

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