{"id":19584993,"url":"https://github.com/krypton-byte/lexz","last_synced_at":"2025-02-26T12:42:29.039Z","repository":{"id":188932900,"uuid":"679715012","full_name":"krypton-byte/lexz","owner":"krypton-byte","description":"Time travel for obfuscation purpose xD","archived":false,"fork":false,"pushed_at":"2023-08-21T18:04:28.000Z","size":141,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-26T05:06:53.694Z","etag":null,"topics":["ast","python","tree","variable"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/krypton-byte.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-08-17T13:06:02.000Z","updated_at":"2023-08-19T07:56:06.000Z","dependencies_parsed_at":"2023-08-17T14:44:52.931Z","dependency_job_id":"6de48959-28a5-4b07-ab81-a5a659508c3e","html_url":"https://github.com/krypton-byte/lexz","commit_stats":{"total_commits":31,"total_committers":2,"mean_commits":15.5,"dds":0.06451612903225812,"last_synced_commit":"84d7aef2d5861bba17b22e6770f8e69fbcf91761"},"previous_names":["krypton-byte/lexz"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krypton-byte%2Flexz","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krypton-byte%2Flexz/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krypton-byte%2Flexz/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krypton-byte%2Flexz/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/krypton-byte","download_url":"https://codeload.github.com/krypton-byte/lexz/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240858536,"owners_count":19868997,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ast","python","tree","variable"],"created_at":"2024-11-11T07:52:13.288Z","updated_at":"2025-02-26T12:42:28.989Z","avatar_url":"https://github.com/krypton-byte.png","language":"Python","readme":"# lexz\nRemapping Variable Using Abstract Syntax Tree [(AST)](https://docs.python.org/3/library/ast.html) \n# Task\n- [x] Graph\n- [x] Aliasing Variable\n- [x] Alias Backend\n- [x] JSON\n- [ ] Fully support annotation\n# Tutorial\n### Generate GraphViz File\n```bash\npython -m lexz -f test.py -g graph.dot\n```\n### Generate SVG Image\n```bash\npython -m lexz test.py -g graph.dot\ndot -Tsvg output.svg graph.dot\n\n#in single line\n python -m lexz -f test.py -g /dev/stdout|dot -Tsvg -o output.svg\n```\n# Demo\n### Input\n\n```python\nclass HelloWorld:\n    def __init__(self) -\u003e None:\n        try:\n            self.a = 3\n        except Exception:\n            self.b = 3\n\n        class HelloWorld2((child:=HelloWorld)):\n            def __init__(selx) -\u003e None:\n                selx.a = 3\n                for i in range(10):\n                    self.for_ = i\n            @dfunc((decorator:=10))\n            async def xyz(self, a):\n                async for i in range(10):\n                    self.tesx = i\n                async with open(\"test3.py\", \"r\") as f:\n                    print(f.read())\n                lambda ho: 123\n\n@(lambda:(call := dfunc((arg := 2))))()\ndef FunDec():\n    data = {'a': (a := (b := (c := 3)))}\n    print(data, a, b, c)\n    pass\n\n\ndef dfunc(arg):\n    def func(f):\n        def execute(*args, **kwargs):\n            return f(*args, **kwargs)\n        return execute\n    return func\n\n```\n\n### Result Graphviz( Dot Graph )\n![image](assets/output.svg)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrypton-byte%2Flexz","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkrypton-byte%2Flexz","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrypton-byte%2Flexz/lists"}