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
       
builtins.object
CsvDeserializer
DictObject
JsonDeserializer

 
class CsvDeserializer(builtins.object)
    CsvDeserializer(csv: _io.TextIOWrapper, *args, **kwargs)
 
DictObjects from CSV.
 
  Methods defined here:
__init__(self, csv: _io.TextIOWrapper, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
__iter__(self)

Data descriptors defined here:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

 
class DictObject(builtins.object)
    DictObject(data: dict)
 
This class create object and sub-object from Json Structure.
 
  Methods defined here:
__getitem__(self, item: str) -> Any
__init__(self, data: dict)
Initialize self.  See help(type(self)) for accurate signature.
__setitem__(self, item: str, value: Any) -> None

Data descriptors defined here:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

 
class JsonDeserializer(DictObject)
    JsonDeserializer(json: Union[str, bytes, _io.TextIOWrapper], *args, **kwargs)
 
DictObject for Json.
 
 
Method resolution order:
JsonDeserializer
DictObject
builtins.object

Methods defined here:
__init__(self, json: Union[str, bytes, _io.TextIOWrapper], *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.

Methods inherited from DictObject:
__getitem__(self, item: str) -> Any
__setitem__(self, item: str, value: Any) -> None

Data descriptors inherited from DictObject:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

 
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