DictObject (version 0.0.1) | index DictObject.html |
This package implements tools to build python package and tools.
>>> d = DictObject({"_1": 1})
>>> d._1
1
>>> d["_1"]
1
>>> d.get("_1")
1
>>> d.get("_2")
>>> d = DictObject({"-1": 1})
>>> d["_1"]
1
>>> d["_2"] = 2
>>> d["_2"]
2
>>> d = JsonDeserializer('{"-1": 1}')
>>> d._1
1
>>> d = JsonDeserializer('{"-1": {"-1": 1}}')
>>> d._1._1
1
>>> from io import StringIO
>>> csv = CsvDeserializer(StringIO("-1,-2\n1,2\n3,4"))
>>> [(d._1, d._2) for d in csv]
[('1', '2'), ('3', '4')]
>>> csv = CsvDeserializer(StringIO("-1,-2\n1,2\n3,4"))
>>> [d for d in csv]
[<DictObject.DictObject object at ...>, <DictObject.DictObject object at ...>]
>>>
Classes | ||||||||||||||||||||||||||
|
Data | ||
__all__ = ['DictObject', 'JsonDeserializer', 'CsvDeserializer'] __author_email__ = 'mauricelambert434@gmail.com' __copyright__ = '\nPythonToolsKit Copyright (C) 2022 Maurice Lam...ome to redistribute it\nunder certain conditions.\n' __description__ = '\nThis package implements tools to build python package and tools.\n' __license__ = 'GPL-3.0 License' __maintainer__ = 'Maurice Lambert' __maintainer_email__ = 'mauricelambert434@gmail.com' __url__ = 'https://github.com/mauricelambert/PythonToolsKit' |
Author | ||
Maurice Lambert |