Utility Functions & Classes
Project description
Klein Util
Module to contain some basic utility components
klein_util.dict
traverse_dict()
- function for traversing nested dicts using a list of keys
Example: get a field from a mongo doc
using dot notation:
from klein_util.dict import traverse_dict
property = 'ner.chemicalentities.found'
entities_found = traverse_dict(doc, property.split('.'))
Tests
To run tests, run the following command in the project root directory:
python -m pytest
License
This project is licensed under the terms of the Apache 2 license, which can be found in the repository as LICENSE.txt
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
klein_util-1.0.8a0.tar.gz
(7.5 kB
view hashes)
Built Distribution
Close
Hashes for klein_util-1.0.8a0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 35ca7adef7b9a9e00b8f5882edbfeeb0ff3e2091df2e9f70048b4dd2da43ce37 |
|
MD5 | f6155afb356529e5bba6ee8f8520c217 |
|
BLAKE2b-256 | 7708fd24ab63b3e304216c003941669173e177a0e94124beed76d40fc28d1d04 |