Skip to main content

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


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.2.0.tar.gz (5.2 kB view hashes)

Uploaded Source

Built Distribution

sluth-0.2.0-py3-none-any.whl (4.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page