Sluth- a python library to find python definitions in code without running it
Sluth is a simple utility to find definitions in python code without running it. It is useful for building documentation, finding dependencies, and other tasks that require knowing what a python file does without running it.
from sluth import NodeWalk
source = """
raise ValueError('This file cannot be run')
class Foo:
def bar(self):
pass
"""
node_walk = NodeWalk.from_source(source)
assert node_walk["Foo"]["bar"].lineno == 5
Metadata
Release files for sluth 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 |
|---|---|---|---|---|
| sluth-0.2.0.tar.gz | 5.2 kB | Without provenance | Details for sluth-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sluth-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for sluth-0.2.0-py3-none-any.whl |
Total release size: 9.9 kB
Release files / sluth-0.2.0.tar.gz
| Download URL | sluth-0.2.0.tar.gz |
|---|---|
| Size | 5.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
263ef548db251e560e3278a08ef41d9adfc906704a3a8f1f245c620e814e0ca0
|
|
BLAKE2b-256 checksum How to use checksums |
c080d37377eddf987aeced2c53e8b66888cb01aed355f6309b82c36d8df9a21b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
poetry/1.8.1 CPython/3.12.2 Linux/6.5.0-1015-azure
|
Release files / sluth-0.2.0-py3-none-any.whl
| Download URL | sluth-0.2.0-py3-none-any.whl |
|---|---|
| Size | 4.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9ee34ccd19230ff659c8a39e3c412f87c461148ff3a97c29fd36626cb220b8b9
|
|
BLAKE2b-256 checksum How to use checksums |
9bd0091cfe63567571e88f5edd36bab702cef4d9d2bee16303e1abb1cf369fbc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
poetry/1.8.1 CPython/3.12.2 Linux/6.5.0-1015-azure
|
Security for sluth 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.