Skip to main content

Python deepops module

Project description

PYTHON DEEPOPS MODULE

This module contains some functions for performing "deep" operations on standard Python "compound" data structures - lists/sets/dictionaries:

  • deepmerge() - merges two compound structures, including all sub-items, e.g. items to lists and sets, missing keys/items to dictionaries, optionally replacing clashing simple types.
  • deepremoveitems() - removes items (simple types, or whole compound structures) from within another compound data structure.
  • deepdiff() - compares two compound structures and returns a tuple of items to be removed and items to be updated: these could be passed to deepremoveitems() and deepmerge(), respectively, to transform one into the other (although note that they would need to be deepcopy()ed first).

The module was developed and used under Python 3.4-3.7 but seems to work OK in basic testing under 2.7.

Author

Robert Franklin, UK rcf@mince.net

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

deepops-1.6.2.tar.gz (10.8 kB view hashes)

Uploaded Source

Built Distribution

deepops-1.6.2-py2.py3-none-any.whl (9.8 kB view hashes)

Uploaded Python 2 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