Skip to content

Commit

Permalink
Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
TLCFEM committed Mar 5, 2024
1 parent 14d03fe commit 48ff4cf
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/msglc/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,13 @@
from .config import configure
from .reader import Reader, to_obj
from .writer import Writer


def dump(file: str, obj, **kwargs):
with Writer(file, **kwargs) as msglc_writer:
msglc_writer.write(obj)


def load(file: str, **kwargs):
with Reader(file, **kwargs) as msglc_reader:
return to_obj(msglc_reader.read())

0 comments on commit 48ff4cf

Please sign in to comment.