No project description provided
Project description
print-dict
$ python examples/example1.py
{
'one': 'value-one',
'two': 'value-two',
'three': 'value-three',
'four': {
'1': '1',
'2': '2',
'3': [1, 2, 3, 4, 5],
'4': {
'method': <function custom_method at 0x7ff6ecd03e18>,
'tuple': (1, 2),
'unicode': '✓',
'ten': 'value-ten',
'eleven': 'value-eleven',
'3': [1, 2, 3, 4]
}
},
'object1': <__main__.Object1 object at 0x7ff6ecc588d0>,
'object2': <Object2 info>,
'class': <class '__main__.Object1'>
}
----------------
$ cat examples/example1.py
from print_dict import print_dict
class Object1:
pass
class Object2:
def __repr__(self):
return "<Object2 info>"
def custom_method():
pass
object1 = Object1()
data = {
"one": "value-one",
"two": "value-two",
"three": "value-three",
"four": {
'1': '1', '2': '2', '3': [1, 2, 3, 4, 5], '4': {
'method': custom_method,
'tuple': (1, 2),
'unicode': u'\u2713',
'ten': 'value-ten',
'eleven': 'value-eleven',
'3': [1, 2, 3, 4]
}
},
"object1": object1,
"object2": Object2(),
"class": Object1
}
print_dict(data)
# # Alias 'pd' also available
# from print_dict import pd
# pd(data)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
print-dict-0.1.6.tar.gz
(7.7 kB
view hashes)
Built Distribution
Close
Hashes for print_dict-0.1.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b68cfd2fc2ebbfe52c58f7eedd620d073120202a18f5dc3627c6bb1a1609404f |
|
MD5 | 6ad7e0b7fedb21045c4f98226d749d3a |
|
BLAKE2b-256 | 5a4238ca3da237224dfa85139b8aefd3aae37854187aceebaa4c70ec566cef89 |