Skip to main content

Nested Dict Update With operation like insert , deleter , updater ,search

Project description

Dict Updater

It used to update any nested dict and list object . Also provide the option to update nested dictionary within the list by searching mechanism .

Feature Offer :

  • Update the dictionary object .
  • Delete nested dictionary value .
  • Append nested list object .

How to Install the library

pip install dictupdate

Example

Updating simple dictionary object

from dictupdate import DictUpdater

# source to update 
source = {
    "a" : {
        "b": "value_need_to_update"
    }
}

# target to update
target = {
    "a":{
        "b": "existing value updated",
        "c": "new value added"
    }
}

dict_update = DictUpdater.update(
    data=source,
    update_value=target
)

print(dict_update)

Output :

{'a': {'b': 'existing value updated', 'c': 'new value added'}}

Updating Recursive

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dictupdate-0.0.3.tar.gz (5.8 kB view hashes)

Uploaded Source

Built Distribution

dictupdate-0.0.3-py3-none-any.whl (6.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page