# dict-utils 
[](http://travis-ci.org/#!/glowdigitalmedia/dict-utils)
[](https://coveralls.io/r/glowdigitalmedia/dict-utils?branch=master)
[](http://badge.fury.io/py/dict-utils)
dict-utils is a set of utilities and accessory methods usable
with Python dicts.
## Examples
1. Search for a value in a dictionary, passing a key:
```python
from dict_utils import dict_utils
dict_1 = {'first_level': {'second_level': {'name': 'Joe', 'age': 30}}}
found_value = dict_utils.dict_search_value(dict_1, 'name')
```
**found_value** will contain **'Joe'**
2. Compare two different dictionaries having the same keys
```python
from dict_utils import dict_utils
dict_1 = {'first_level': {'second_level': {'name': 'Joe', 'age': 30}}}
dict_2 = {'level_1': {'level_2': {'name': 'Joe', 'age': 30}}}
dict_utils.compare_assert_dicts(self, ['name', 'age'], dict_1, dict_2)
```
## Running Tests
```
python setup.py test
```
[](http://travis-ci.org/#!/glowdigitalmedia/dict-utils)
[](https://coveralls.io/r/glowdigitalmedia/dict-utils?branch=master)
[](http://badge.fury.io/py/dict-utils)
dict-utils is a set of utilities and accessory methods usable
with Python dicts.
## Examples
1. Search for a value in a dictionary, passing a key:
```python
from dict_utils import dict_utils
dict_1 = {'first_level': {'second_level': {'name': 'Joe', 'age': 30}}}
found_value = dict_utils.dict_search_value(dict_1, 'name')
```
**found_value** will contain **'Joe'**
2. Compare two different dictionaries having the same keys
```python
from dict_utils import dict_utils
dict_1 = {'first_level': {'second_level': {'name': 'Joe', 'age': 30}}}
dict_2 = {'level_1': {'level_2': {'name': 'Joe', 'age': 30}}}
dict_utils.compare_assert_dicts(self, ['name', 'age'], dict_1, dict_2)
```
## Running Tests
```
python setup.py test
```
Metadata
Release files for dict-utils 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| dict-utils-0.1.2.tar.gz | 2.6 kB | Details |
Release files / dict-utils-0.1.2.tar.gz
| Download URL | dict-utils-0.1.2.tar.gz |
|---|---|
| Size | 2.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a5bbbc1da14597dda251e19d0b2179cd06f11e122489126077667d06c14606c1
|
|
BLAKE2b-256 checksum How to use checksums |
07f91860c89321923547ed7a66109d0cd05b6f36905cc0a38d595787895d11ef
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |