pygetimportables
Python functions to get top-level importable names from a source tree or an already built wheel.
See https://discuss.python.org/t/script-to-get-top-level-packages-from-source-tree/40232?u=astrojuanlu
Installation
To install, run
(.venv) $ pip install pygetimportables
Usage
To get the top-level importable names directly from a source tree:
>>> from pygetimportables import get_top_importables
>>> get_top_importables(".") # Wait a few seconds, requires working `uv pip install`
{'pygetimportables'}
To get the top-level importable names from an already built wheel:
(.venv) $ python -m build --installer uv
...
(.venv) $ python -q
>>> from pygetimportables import get_top_importables_from_wheel
>>> get_top_importables_from_wheel("dist/pygetimportables-0.1.0+d20231204-py3-none-any.whl") # Fast
{'pygetimportables'}
Development
To run style checks:
(.venv) $ pip install pre-commit
(.venv) $ pre-commit -a
Metadata
Release files for pygetimportables 0.3.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 |
|---|---|---|---|---|
| pygetimportables-0.3.0.tar.gz | 6.0 kB | Without provenance | Details for pygetimportables-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pygetimportables-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for pygetimportables-0.3.0-py3-none-any.whl |
Total release size: 12.1 kB
Release files / pygetimportables-0.3.0.tar.gz
| Download URL | pygetimportables-0.3.0.tar.gz |
|---|---|
| Size | 6.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1cd28d18ad37a3be7fdd65db67097d59ae56ad66dd93f8b2fc533bb2e70eab6a
|
|
BLAKE2b-256 checksum How to use checksums |
c2d95a0d6f2f28b25ff0337b39df3b2198b0487ef31338e4a607f64b40cf189f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.0 CPython/3.12.4
|
Release files / pygetimportables-0.3.0-py3-none-any.whl
| Download URL | pygetimportables-0.3.0-py3-none-any.whl |
|---|---|
| Size | 6.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e12468b0d3c8599550c2923aa44a249c671d2488f3c6ed0b3dc1933b2b82424a
|
|
BLAKE2b-256 checksum How to use checksums |
49d3408ec9840abe977d0a1f001d2bf6910b4a78ce790ec2943cd1b9b340b76e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.0 CPython/3.12.4
|
Security for pygetimportables 0.3.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.