deep_mapper

Mapper that able to return an object with converted keys, or a list of objects


License
MIT
Install
pip install deep_mapper==0.1.2

Documentation

deep_mapper

could be used to turn one py-object (mash of dicts / lists etc) into another one, using deep mapping structure and postprocessing through custom functions / builtins

mapping structure example

{
    'name': {
        'path': '/title'
    },
    'time': {
        'path': '/runtime',
        'postprocess': int
    },
    'restrictions': {
        'path': '/age_restricted'
    },
    'tags': {
        'path': '/tags/tag'
    },
    'image': {
        'path': '/gallery/image/@href'
    },
}

all pathes need to be based on XPath rules available from pip (python3):

pip install deep_mapper