Pretty-printer for complex python types
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.
Install with: pip install prettytype
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.
Metadata
Release files for prettytype 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| prettytype-0.2.0.tar.gz | 3.0 kB | Without provenance | Details for prettytype-0.2.0.tar.gz |
Release files / prettytype-0.2.0.tar.gz
| Download URL | prettytype-0.2.0.tar.gz |
|---|---|
| Size | 3.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bfe0fafe602c2167544a3e405e25fc3217f7caef39f44c0562da3ba6310a1277
|
|
BLAKE2b-256 checksum How to use checksums |
fe953793c7ed16bd8ff412a400a554b2d568688353effbd8bba707bef0c29cc1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.8.0
|
Security for prettytype 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.