{"id":31942282,"url":"https://github.com/irahorecka/astree","last_synced_at":"2025-10-14T09:41:48.756Z","repository":{"id":44859886,"uuid":"253983733","full_name":"irahorecka/astree","owner":"irahorecka","description":"Visualize abstract syntax trees of methods, declarations, expressions, and more","archived":false,"fork":false,"pushed_at":"2023-07-26T02:44:18.000Z","size":15127,"stargazers_count":15,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-07-26T03:42:09.334Z","etag":null,"topics":["abstract-syntax-tree","astree","graphviz-dot","pydot","syntax-trees"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/irahorecka.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}},"created_at":"2020-04-08T04:19:18.000Z","updated_at":"2023-07-26T02:43:33.000Z","dependencies_parsed_at":"2022-09-14T01:25:24.751Z","dependency_job_id":null,"html_url":"https://github.com/irahorecka/astree","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"purl":"pkg:github/irahorecka/astree","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/irahorecka%2Fastree","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/irahorecka%2Fastree/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/irahorecka%2Fastree/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/irahorecka%2Fastree/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/irahorecka","download_url":"https://codeload.github.com/irahorecka/astree/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/irahorecka%2Fastree/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279018626,"owners_count":26086404,"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","status":"online","status_checked_at":"2025-10-14T02:00:06.444Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["abstract-syntax-tree","astree","graphviz-dot","pydot","syntax-trees"],"created_at":"2025-10-14T09:41:42.978Z","updated_at":"2025-10-14T09:41:48.748Z","avatar_url":"https://github.com/irahorecka.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# astree\n### Visualize abstract syntax trees of methods, declarations, expressions, and more\n\n```astree.py``` combines the Python \u003ca href=https://docs.python.org/3.8/library/ast.html\u003e```ast```\u003c/a\u003e module with\n\u003ca href=https://github.com/pydot/pydot-ng\u003e```pydot_ng```\u003c/a\u003e to draw abstract syntax trees specified in DOT language scripts.\nAn \u003ca href=https://en.wikipedia.org/wiki/Abstract_syntax_tree\u003e abstract syntax tree\u003c/a\u003e is a tree representation of the abstract\nsyntactic structure of source code written in a programming language (e.g. Python).\u003cbr\u003e\n\u003chr\u003e\n  \n\u003cb\u003eJumpstart\u003c/b\u003e -- running the program:\n1) Clone repository\n2) ```$ pip install -r requirements.txt```\u003cbr\u003e\n3) ```$ python astree.py```\n\nInput modules, methods, declarations, statements, expressions, etc.\u003cbr\u003e\nView video example \u003ca href=\"https://i.imgur.com/C43Mn6p.mp4\"\u003ehere\u003c/a\u003e.\u003cbr\u003e\n\nFor example, let's look at the ```requests.get``` method:\u003cbr\u003e\n```\u003e\u003e\u003e Input a method name, expression, etc.:```\u003cbr\u003e\n```requests.get```\u003cbr\u003e\n\n\u003cp align = 'center'\u003e\n\u003cimg src=https://i.imgur.com/41FcAwg.png alt=\"AST visualize requests.get\"\n    width=800\u003e\u003cbr\u003e\n\u003c/p\u003e\n\u003cbr\u003e\nNote: please report bugs to \u003ca href=\"https://github.com/irahorecka/astree/issues\"\u003eissues\u003c/a\u003e.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Firahorecka%2Fastree","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Firahorecka%2Fastree","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Firahorecka%2Fastree/lists"}