Skip to main content

tree_types

A module that help with identifying the types of objects in a list or dictionary.

How to use

After installing it with pip install, import in your project and use as follows:

from tree_types import TreeTypes

obj = {
    'v1': [1, 2, 3, 4],
    'v2': {
        'v1': 1,
        'v2': 2
    }
}

tt = TreeTypes(obj)
tt.process()

print(tt)
>> <TreeTypes(type=dict[str,list[int]|dict[str,int]])>

Print Mode

You can chose how the Class will print the class tree by using the arg print_mode during instancing of class.

The arg receives a instance of the class PrintMode that is defined in this module too. It is defined as a Enum that has 2 modes:

  • Class mode: the Tree is printed as a Class like the exemple above.
  • Pretty mode: the Tree is printed as a text class, with indication of the itens in the object with the type of the item.

Metadata

Release files for tree-types 0.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tree-types 0.2.2
File Size Uploaded Provenance
tree_types-0.2.2.tar.gz 3.7 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for tree-types 0.2.2
File Interpreter ABI Platform
tree_types-0.2.2-py3-none-any.whl Python 3 none any Details

Total release size: 8.1 kB

Release files / tree_types-0.2.2.tar.gz

Download URL tree_types-0.2.2.tar.gz
Size 3.7 kB
Tags Source
SHA-256 checksum
How to use checksums
052399bd0a611bdc1513e60ebcdd50670ccbd5fb6ccc38e0af5bcd2fc5b7e9e9
BLAKE2b-256 checksum
How to use checksums
9dd302e201a94a9b33248c090b6de1f4e9a4f3797286b892a3d1fe3f205bc69b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Release files / tree_types-0.2.2-py3-none-any.whl

Download URL tree_types-0.2.2-py3-none-any.whl
Size 4.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8a2c8cf7bafb70894f1851916f0f823bb08dd7d1d27fb4726b7c2d7e1fa1a2c3
BLAKE2b-256 checksum
How to use checksums
deb701117db0c231743c3563a526ebb08df291f660b4865a6c517fec1472c40f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Security for tree-types 0.2.2

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page