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.1.0.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

sluth-0.1.0-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file sluth-0.1.0.tar.gz.

File metadata

  • Download URL: sluth-0.1.0.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: poetry/1.8.1 CPython/3.12.2 Linux/6.5.0-1015-azure

File hashes

Hashes for sluth-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3972c2dad3edabbcd19d8f46f776f34e5d46d43304b092208e654750f5a369c2
MD5 b1039b90df74a50b00906083ec56634b
BLAKE2b-256 548e86021cd300aba953d101156a496d951d615a423d5a000eea003b860258da

See more details on using hashes here.

File details

Details for the file sluth-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: sluth-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: poetry/1.8.1 CPython/3.12.2 Linux/6.5.0-1015-azure

File hashes

Hashes for sluth-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e447f3a3ce87edf5b8beae54ee8306f49bf14fa1c370c46b06ae224862254e5d
MD5 c77db5b7186dff1ef9a58da0c8440fd8
BLAKE2b-256 922f13d200e857dd0e3a2a263d413a9989c7d2b82c87f56e2187b7fe5c5742f3

See more details on using hashes here.

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