No project description provided
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
sluth-0.1.0.tar.gz
(5.1 kB
view hashes)
Built Distribution
sluth-0.1.0-py3-none-any.whl
(4.7 kB
view hashes)