DataReducer
- Info:
DataReducer is an python tool for easily handling data.
- Repository:
- Author:
Tri Nguyen (https://github.com/shinrel22)
- Maintainer:
Tri Nguyen (https://github.com/shinrel22)
Installation
pipenv install python-data-reducer
Examples
Some simple examples of what DataReducer can do:
from data_reducer import DataReducer
>>> origin_data = {
'id': '1',
'avatar': {
'creator': {
'birthday': {'day': 22, 'month': 1, 'year': 1993},
'email': 'example@gmail.com',
'id': '1',
'name': 'example'
},
'deleted': False,
'id': '1',
'path': 'abc',
'types': ['a', 'b', 'c'],
'url': 'url'
},
'translations': [
{'content': '1', 'id': '1', 'locale': 'vi', 'name': 'A'},
{'content': '2', 'id': '2', 'locale': 'en', 'name': 'B'}
]
}
>>> only_fields = [
'id',
'translations.id',
'translations.locale',
'translations.name',
'translations.types',
'avatar.url',
'avatar.id',
'avatar.creator.id',
'avatar.creator.birthday.year',
]
>>> DataReducer(data=origin_data, include_fields=only_fields).run()
{
'id': '1',
'translations': [
{'id': '1', 'locale': 'vi', 'name': 'A'},
{'id': '2', 'locale': 'en', 'name': 'B'}
],
'avatar': {
'url': 'url',
'id': '1',
'creator': {
'id': '1',
'birthday': {'year': 1993}
}
}
}
Metadata
Release files for python-data-reducer 0.0.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| python_data_reducer-0.0.6.tar.gz | 2.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| python_data_reducer-0.0.6-py2-none-any.whl | Python 2 | none | any | Details |
Total release size: 7.1 kB
Release files / python_data_reducer-0.0.6.tar.gz
| Download URL | python_data_reducer-0.0.6.tar.gz |
|---|---|
| Size | 2.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
36f354a7a7da98ea1c6a60befd2484e357803fe6c55a52ac360e41219389fd26
|
|
BLAKE2b-256 checksum How to use checksums |
89c1c86601c8cf5cb9cfb2314638807e8c8a075ca26b85c0bf4670b01aa11c3c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.8
|
Release files / python_data_reducer-0.0.6-py2-none-any.whl
| Download URL | python_data_reducer-0.0.6-py2-none-any.whl |
|---|---|
| Size | 4.3 kB |
| Tags | Python 2 |
|
SHA-256 checksum How to use checksums |
0f6a2818ccba523ccdf35282a1fc22f467d742aaba6f15f56386254638a97341
|
|
BLAKE2b-256 checksum How to use checksums |
09ee5a4d32bf5a778d13db21a9a3cf520685dd56fe0593218cbaf1c1f0dc4ad7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.8
|