pthree: Python Project Parser
A simple project parser for Python.
This package is designed to be a lightweight, dependency-free tool for parsing project trees using python’s built-in ast, importlib, and inspect modules. It was originally developed as a series of helper functions used to generate ASTs which could be passed to Sphinx’s sphinx.ext.autosummary extension; I have since extracted it into its own package for easier reuse viz. so that it can be injected into other documentation projects.
Installation
You can install the package directly from PyPI using pip:
pip install pthree
Examples
Here is a simple example demonstrating how to use the package to parse a project tree:
import json
from pthree import build_node_tree, node_tree_to_dict
node_tree = build_node_tree(json)
node_dict = node_tree_to_dict(node_tree)
print(json.dumps(node_dict, indent=2, sort_keys=False, ensure_ascii=False))
Metadata
Release files for pthree 1.0.1
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 |
|---|---|---|---|---|
| pthree-1.0.1.tar.gz | 9.2 kB | Without provenance | Details for pthree-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pthree-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for pthree-1.0.1-py3-none-any.whl |
Total release size: 18.8 kB
Release files / pthree-1.0.1.tar.gz
| Download URL | pthree-1.0.1.tar.gz |
|---|---|
| Size | 9.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fe815ff3dcdd338861f5b5043784643b94184868e99dd277d3ba42b5e5b0ac7a
|
|
BLAKE2b-256 checksum How to use checksums |
f082d0fc45289cd1f552b75c5c4e1f6693acd9f29e0d032992323bacebd85cc4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.0
|
Release files / pthree-1.0.1-py3-none-any.whl
| Download URL | pthree-1.0.1-py3-none-any.whl |
|---|---|
| Size | 9.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
187e44c9ef0fef0d3192015b5f3143e8c6b2d9e11978b2d4bbf5d55df1a61195
|
|
BLAKE2b-256 checksum How to use checksums |
a9ee5b57ad9d59793d8b37ab2911ec5aed43404d327bd2ac4ebe657eed232a0a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.0
|
Security for pthree 1.0.1
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.