Small customizable multiprocessing multi-proxy crawler.
Project description
Simple python package to transpose python dictionaries.
Installing Transpose_Dict
pip install transpose_dict
Basic usage example
from transpose_dict import TD
test = {
"a":{
"0":{
"I":[1,2,3],
"II":[4,5,6]
}
},
"b":{
"0":{
"I":[8,9,10],
"II":[467,23,23]
},
"1":{
"III":[6,7,9]
}
}
}
TD(test, 0) # The given dictionary does not change
#> {"b": {"0": {"I": [8, 9, 10], "II": [467, 23, 23]}, "1": {"III": [6, 7, 9]}}, "a": {"0": {"I": [1, 2, 3], "II": [4, 5, 6]}}}
TD(test, 1) # The new main axis is the one with ("0", "1")
#> {"0": {"a": {"I": [1, 2, 3], "II": [4, 5, 6]}, "b": {"I": [8, 9, 10], "II": [467, 23, 23]}}, "1": {"b": {"III": [6, 7, 9]}}}
TD(test, 2) # The new main axis is the one with ("I", "II", "III")
#> {"I": {"a": {"0": [1, 2, 3]}, "b": {"0": [8, 9, 10]}}, "III": {"b": {"1": [6, 7, 9]}}, "II": {"a": {"0": [4, 5, 6]}, "b": {"0": [467, 23, 23]}}}
License
The software is released under the MIT license.
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
transpose_dict-1.0.0.tar.gz
(3.6 kB
view hashes)
Built Distribution
Close
Hashes for transpose_dict-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 20002fccf0a762c945c6db77f8d3cb381de421983df4bfb318363a97d985e62c |
|
MD5 | fe12b2938677e4eaf9e7b1924f22baf5 |
|
BLAKE2b-256 | 33ea8d9a8697f2c6cab757a4ea632db17bad12d8abe106b5fb0b28570da331f4 |