Git Product home page Git Product logo

drint's Introduction

multiple_loader Logo

PyPI PyPI - Python Version PyPI - Format PyPI - License Downloads GitHub issues
GitHub followers Twitter


the latest version of 1.0.3๐ŸŽ‰

Changes in the new version of 1.0.3

- fix code -


drint

drint is a library that outputs dict type objects in python to console and other applications, fully formatted and displayed. This will improve debugging, output, and other tasks.


Description of drint

drint is a library that outputs dict type objects in python to console and other applications, fully formatted and displayed. In general, dict is displayed in python using pprint, etc., but this library can output dict in a more complete form than pprint.


More about drint

drint displays dict types in perfect alignment. Below is a test dict and an example of its display.

from dict_viewer.drint import drint

test_d3 = {
   "e": "EEE",
   "f": "FFF",
   "g": "GGG"
}

test_d2 = {
   "c": test_d3,
   "d": "DDD" 
}

test_d1 = {
   "a": "AAA",
   "b": test_d2
}

# drint
drint(test_d1)

The result is as follows:

{
    "a": AAA
    "b": {
        "c": {
            "e": EEE
            "f": FFF
            "g": GGG
        }
        "d": DDD
    }
}

Compared to the output with pprint and print, it is clearly aligned.

# print
{'a': 'AAA', 'b': {'c': {'e': 'EEE', 'f': 'FFF', 'g': 'GGG'}, 'd': 'DDD'}}

# pprint
{'a': 'AAA', 'b': {'c': {'e': 'EEE', 'f': 'FFF', 'g': 'GGG'}, 'd': 'DDD'}}

# drint
{
    "a": AAA
    "b": {
        "c": {
            "e": EEE
            "f": FFF
            "g": GGG
        }
        "d": DDD
    }
}

Also, with drint, indentation can be specified.

Optional arguments, etc

The list of arguments, etc. that can be used in drint is as follows.

from dict_viewer.drint import drint

drint(
   dict,      # Required argument
   indent     # defalut value is 4
)

Getting Started

Installing

Latest drint via PyPI (pip install)

PyPI Downloads

pip install drint

Install by pip from github

pip install git+https://github.com/Domzou-kun/drint.git

or install via SSH

pip install git+git://github.com:Domzou-kun/drint.git

Authors

Domzou

link

Version history

If you want to know about past versions, please refer to version history.

LICENSE

drint has a MIT license, as found in the LICENSE file.

drint's People

Contributors

domzou-kun avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.