Print types of nested structues
Project description
This package helps describe complex, nested Python data structures. Use the prettytype function to print the structure and quickly understand what type of object you have.
For example, let’s examine a complex JSON object from the internet:
import requests
import json
r = requests.get('https://openlibrary.org/api/books?bibkeys=ISBN:0385472579,LCCN:62019420&format=json')
data = json.loads(r.text)
print 'Data:', data
print
from prettytype import prettytype
print 'Type:', prettytype(data)
===>
Data: {u'ISBN:0385472579': {u'bib_key': u'ISBN:0385472579', ......
Type: {str: {str: str}}
prettytype shows that the API returns nested dictionaries with string keys.
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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for prettytype-0.1.0-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3394e279893099146f5b5d737ff38463cba1c72de5070041bc340a3418d98baa |
|
MD5 | 02f072f33adce72c73f684e7a3bd9f43 |
|
BLAKE2b-256 | 8e013215204cb35c81b41abe332c4a633295dbf7627274fe4b23855295841cc8 |