Skip to content

Commit

Permalink
docs and version
Browse files Browse the repository at this point in the history
  • Loading branch information
zkurtz committed Oct 7, 2024
1 parent 3ab7750 commit a1f46c9
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
# packio

Packio makes it easy to use a single file to store and retrieve multiple python object. A typical use case is in defining IO methods on a dataclass containing heterogenous data objects, such as a dictionary and a data frame.
Packio allows you to use a single file to store and retrieve multiple python objects. A typical use case is to define IO methods on an instance of a class that contains multiple types of objects, such as a
- dictionary
- data frame
- string
- trained ML model (for example, lightgbm and xgboost each have built-in serialization methods for trained models)

When a class contains multiple of these data types, or even multiple instances of the same data type, saving and loading the data associated with a class tends to become unwieldy, requiring the user to either keep track multiple file paths or to fall back to using pickle, which introduces other problems (see below). The goal of packio is to make it as easy as possible to write `save` and `load` methods for such a class while allowing you to keep using all of your favorite object-type-specific serializers (i.e. `to_parquet` for pandas, `json` for dictionaries, `pathlib.Path.write_text` for strings, etc).


## Why not pickle?

Expand Down
4 changes: 4 additions & 0 deletions packio/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
"""Public methods and classes for packio package."""

from importlib.metadata import version

from packio.io import Reader as Reader
from packio.io import Writer as Writer

__version__ = version("packio")
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
[tool.poetry]
name = "packio"
version = "0.0.1"
version = "0.0.2"
description = "IO for multiple python objects to/from a single file"
authors = ["Zach Kurtz <[email protected]>"]
readme = "README.md"
homepage = "https://github.com/zkurtz/packio"

[project.urls]
Source = "https://github.com/zkurtz/packio"
Expand Down

0 comments on commit a1f46c9

Please sign in to comment.