Skip to main content

lexz

Remapping Variable Using Abstract Syntax Tree (AST)

Tutorial

Generate GraphViz File

python -m lexz -f test.py -g graph.dot

Generate SVG Image

python -m lexz test.py -g graph.dot
dot -Tsvg output.svg graph.dot

#in single line
 python -m lexz -f test.py -g /dev/stdout|dot -Tsvg -o output.svg

Demo

Input

class HelloWorld:
    def __init__(self) -> None:
        try:
            self.a = 3
        except Exception:
            self.b = 3

        class HelloWorld2((child:=HelloWorld)):
            def __init__(selx) -> None:
                selx.a = 3
                for i in range(10):
                    self.for_ = i
            @dfunc((decorator:=10))
            async def xyz(self, a):
                async for i in range(10):
                    self.tesx = i
                async with open("test3.py", "r") as f:
                    print(f.read())
                lambda ho: 123

@(lambda:(call:=dfunc((arg:=2))))()
def FunDec():
    data ={'a': (a:=(b:=(c:=3)))}
    pass

def dfunc(arg):
    def func(f):
        def execute(*args, **kwargs):
            return f(*args, **kwargs)
        return execute
    return func

Result Graphviz( Dot Graph )

image

Metadata

Release files for lexz 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lexz 0.1.2
File Size Uploaded Provenance Actions
lexz-0.1.2.tar.gz 16.2 kB Without provenance Details for lexz-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for lexz 0.1.2
File Interpreter ABI Platform Actions
lexz-0.1.2-py3-none-any.whl Python 3 none any Details for lexz-0.1.2-py3-none-any.whl

Total release size: 34.0 kB

Release files / lexz-0.1.2.tar.gz

Download URL lexz-0.1.2.tar.gz
Size 16.2 kB
Tags Source
SHA-256 checksum
How to use checksums
724d09291b11dc72ce063f5a033f216634f43d1cebfd5df675d3f8aee2d81f3a
BLAKE2b-256 checksum
How to use checksums
12bb125e359109420e5589fb1ad6cf6ed4915d21e7315fac865f70d8b4162583
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.5.1 CPython/3.11.4 Linux/5.15.0-1042-azure

Release files / lexz-0.1.2-py3-none-any.whl

Download URL lexz-0.1.2-py3-none-any.whl
Size 17.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0ee414a767fcaa0e124361ccbba54d8367c9ed2f1ec96d077de86e5bdfce426e
BLAKE2b-256 checksum
How to use checksums
80f3dfe28c2f1fa9b8c7e07dbe6d6d45797449879f6679533a8a06d73d67cbdb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.5.1 CPython/3.11.4 Linux/5.15.0-1042-azure

Security for lexz 0.1.2

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page