pypif.pif module¶
-
pypif.pif.
dump
(pif, fp, **kwargs)¶ Convert a single Physical Information Object, or a list of such objects, into a JSON-encoded text file.
Parameters: - pif – Object or list of objects to serialize.
- fp – File-like object supporting .write() method to write the serialized object(s) to.
- kwargs – Any options available to json.dump().
-
pypif.pif.
dumps
(pif, **kwargs)¶ Convert a single Physical Information Object, or a list of such objects, into a JSON-encoded string.
Parameters: - pif – Object or list of objects to serialize.
- kwargs – Any options available to json.dumps().
-
pypif.pif.
load
(fp, **kwargs)¶ Convert content in a JSON-encoded text file to a Physical Information Object or a list of such objects.
Parameters: - fp – File-like object supporting .read() method to deserialize from.
- kwargs – Any options available to json.load().
Returns: Single object derived from
Pio
or a list of such object.