Metadata-Version: 2.1
Name: transpose-dict
Version: 1.0.0
Summary: Small customizable multiprocessing multi-proxy crawler.
Home-page: https://github.com/LucaCappelletti94/transpose_dict
Author: Luca Cappelletti
Author-email: cappelletti.luca94@gmail.com
License: MIT
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Information Technology
Classifier: Topic :: Scientific/Engineering :: Information Analysis
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Provides-Extra: test
Requires-Dist: pytest ; extra == 'test'
Requires-Dist: pytest-cov ; extra == 'test'
Requires-Dist: coveralls ; extra == 'test'

.. role:: py(code)
   :language: python

.. role:: json(code)
   :language: json


Transpose Dictionary
====================

|travis| |sonar_quality| |sonar_maintainability| |sonar_coverage| |code_climate_maintainability| |pip|

Simple python package to transpose python dictionaries.

Installing Transpose_Dict
-------------------------------------------------------------

.. code:: shell

    pip install transpose_dict

Basic usage example
---------------------

.. code:: python

    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.

.. |preview| image:: https://github.com/LucaCappelletti94/transpose_dict/blob/master/preview.png?raw=true

.. |travis| image:: https://travis-ci.org/LucaCappelletti94/transpose_dict.png
   :target: https://travis-ci.org/LucaCappelletti94/transpose_dict

.. |sonar_quality| image:: https://sonarcloud.io/api/project_badges/measure?project=transpose_dict.lucacappelletti&metric=alert_status
    :target: https://sonarcloud.io/dashboard/index/transpose_dict.lucacappelletti

.. |sonar_maintainability| image:: https://sonarcloud.io/api/project_badges/measure?project=transpose_dict.lucacappelletti&metric=sqale_rating
    :target: https://sonarcloud.io/dashboard/index/transpose_dict.lucacappelletti

.. |sonar_coverage| image:: https://sonarcloud.io/api/project_badges/measure?project=transpose_dict.lucacappelletti&metric=coverage
    :target: https://sonarcloud.io/dashboard/index/transpose_dict.lucacappelletti

.. |code_climate_maintainability| image:: https://api.codeclimate.com/v1/badges/25fb7c6119e188dbd12c/maintainability
   :target: https://codeclimate.com/github/LucaCappelletti94/transpose_dict/maintainability
   :alt: Maintainability

.. |pip| image:: https://badge.fury.io/py/transpose_dict.svg
    :target: https://badge.fury.io/py/transpose_dict

