Last updated:
0 purchases
astnames 0.1.0
ast_names
Collect top level variable names using the ast.
Installation
pip install ast_names
Usage
>>> from ast_names import ast_names
>>> ast_names("""
... import sys, os
... import sys as foo
...
... from foo import (
... bar as baz,
... alpha
... )
...
... MYCONSTANT = 1
...
... def my_func():
... ...
...
... class MyClass:
... ...
... """)
{'os', 'MYCONSTANT', 'alpha', 'baz', 'foo', 'sys', 'MyClass', 'my_func'}
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.