sion

loading and dumping a SION format file


Keywords
python, python3
License
MIT
Install
pip install sion==0.2.2

Documentation

py-sion

SION deserializer/serializer for Python.

Synopsis

stream

text

import sion
#...
with open('spam.sion') as f:
    obj = sion.load(f)
with open('eggs.sion', 'w') as f:     
    sion.dump(obj, f)
#...

bytes

import sion
from urllib.request import urlopen
#...
with urlopen(ham) as res:
    obj = load(res)
#...

string

import sion
#...
spam = sion.loads('sion data')
eggs = sion.dumps(spam)
#...

Here are some other examples.

Installation

$ pip3 install sion