This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!
Project Description
Python-PrettyPrintDictionary
============================

Prints Dictionary key-values in a human readable manner.

<h2>What it is?</h2>
Suppose you have the following dictionary:
```
dict_1 = {'a': 0, '1': {1: 'c', 2: 'd'}, '2': [1, 2, 3, 4, 5, 6]}
```
When you print this on the console you will have this:
```
>>> {'a': 0, '1': {1: 'c', 2: 'd'}, '2': [1, 2, 3, 4, 5, 6]}
```
What if you have a very larger dictionary of things that each key has an iterable object, i.e dictionary, list, ...? How does it look like?

Suppose you have the following dictionary:
```
dict_1 = {'a': 0, '1': {1: {'abc': [1, 2, 3, 4, 5, 6], 'efg': [7, 8, 9, 10, 100]},
2: {'1': {1: 'abc', 2: 'efg'}, '2': {3: 'abc'}}}, '2': [1, 2, 3, 4, 5, 6]}
```
if you print if normally it will be this:
```
{'a': 0, '1': {1: {'abc': [1, 2, 3, 4, 5, 6], 'efg': [7, 8, 9, 10, 100]}, 2: {'1': {1: 'abc', 2: 'efg'}, '2': {3: 'abc'}}}, '2': [1, 2, 3, 4, 5, 6]}
```
But if you use this lib it would be this(this is PyCharm Console):

<img src="http://s3.postimg.org/575oxpv7n/git_pretty_print_dict01.jpg" />

<h2>Usage</h2>

Simply import the <b>PrettyDict</b> from <b>pretty_dictionary</b> module from <b>pretty_print_dictionary</b> package
```
from pretty_print_dictionary.pretty_dictionary import PrettyDict
```

Create your own dictionary.
```
my_dictionary = {0:[1,2,3], 1:['a','b']}
```

Create a class of <b>PrettyDict</b> and set your dictionary as its argument.
```
pd = PrettyDict(my_dictionary)
```

Call the <b>ppd</b>(Pretty Print Dictionary) method to print the dictionary
```
pd.ppd()
```

<h4>Keywords</h4>
there is 4 keywords for this module:

<table >
<tr>
<th>
keyword
</th>
<th>
comments
</th>
<th>
value(s)
</th>

</tr>


<tr>
<td>fill_char_width</td>
<td>specifies number of chars to be indented for each level.</td>
<td> int </td>
</tr>

<tr>
<td>fill_char</td>
<td>specifies the char to be indented for each level.</td>
<td> str</td>
</tr>

<tr>
<td>order</td>
<td>specifies the color style for output.</td>
<td>'full', 'even', 'random'</td>
</tr>

<tr>
<td>show_level</td>
<td>prints the level number next to the key element</td>
<td>'show', 'hide'</td>
</tr>
</table>
Release History

Release History

1.1.1

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
pretty_print_dictionary-1.1.1-py2.7.egg (6.5 kB) Copy SHA256 Checksum SHA256 2.7 Egg Sep 6, 2014

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting