{"id":42244522,"url":"https://github.com/harrydrippin/dismantler-python","last_synced_at":"2026-01-27T04:31:00.069Z","repository":{"id":57418494,"uuid":"141104052","full_name":"harrydrippin/dismantler-python","owner":"harrydrippin","description":"This module dismantles python code to parse tree, token, symbols and reproduces it to dictionary and string.","archived":false,"fork":false,"pushed_at":"2018-07-16T08:24:35.000Z","size":10,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-27T17:48:37.213Z","etag":null,"topics":["dismantler","parse-trees","python3"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/harrydrippin.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":"2018-07-16T07:43:35.000Z","updated_at":"2024-06-23T16:07:06.000Z","dependencies_parsed_at":"2022-09-12T14:25:05.050Z","dependency_job_id":null,"html_url":"https://github.com/harrydrippin/dismantler-python","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/harrydrippin/dismantler-python","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harrydrippin%2Fdismantler-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harrydrippin%2Fdismantler-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harrydrippin%2Fdismantler-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harrydrippin%2Fdismantler-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/harrydrippin","download_url":"https://codeload.github.com/harrydrippin/dismantler-python/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harrydrippin%2Fdismantler-python/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28802061,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T03:44:14.111Z","status":"ssl_error","status_checked_at":"2026-01-27T03:43:33.507Z","response_time":168,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["dismantler","parse-trees","python3"],"created_at":"2026-01-27T04:30:59.257Z","updated_at":"2026-01-27T04:31:00.055Z","avatar_url":"https://github.com/harrydrippin.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dismantler\n[![PyPI version](https://img.shields.io/pypi/v/dismantler-python.svg)](https://badge.fury.io/py/dismantler-python)\n[![Apache 2.0 License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)]()\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/dismantler-python.svg)\n[![Say Thanks](https://img.shields.io/badge/Say%20Thanks-!-1EAEDB.svg)](https://saythanks.io/to/harrydrippin)\n\n```\n██████╗ ██╗███████╗███╗   ███╗ █████╗ ███╗   ██╗████████╗██╗     ███████╗██████╗ \n██╔══██╗██║██╔════╝████╗ ████║██╔══██╗████╗  ██║╚══██╔══╝██║     ██╔════╝██╔══██╗\n██║  ██║██║███████╗██╔████╔██║███████║██╔██╗ ██║   ██║   ██║     █████╗  ██████╔╝\n██║  ██║██║╚════██║██║╚██╔╝██║██╔══██║██║╚██╗██║   ██║   ██║     ██╔══╝  ██╔══██╗\n██████╔╝██║███████║██║ ╚═╝ ██║██║  ██║██║ ╚████║   ██║   ███████╗███████╗██║  ██║\n╚═════╝ ╚═╝╚══════╝╚═╝     ╚═╝╚═╝  ╚═╝╚═╝  ╚═══╝   ╚═╝   ╚══════╝╚══════╝╚═╝  ╚═╝\n```\nThis module dismantles python code to parse tree, token, symbols and reproduces it to dictionary and json.\n\n[한국어 README는 여기를 참조하십시오: README.ko.md](https://github.com/harrydrippin/dismantler-python/blob/master/docs/README.ko.md)\n\n## What is this?\n\nDismantler takes a Python code as input and creates a parse tree in a short time. It also export the parse tree to a dictionary or json. You can get list of tokens or symbols separately if you want. This project can be used for research purpose, such as teaching the source code to deep learning model as tokenized sequential data or interpreting the Python code on token level and using it for educational programs (like tutoring).\n\n## Basic Usage\n\n```python\n\u003e\u003e\u003e import dismantler\n\n\u003e\u003e\u003e d = dismantler.run_from_string('a + 5').dictionary()\n\u003e\u003e\u003e print(d)\n{\n    \"type\": \"symbol\",\n    \"name\": \"stmt\",\n    \"value\": [\n        // Nodes...\n    ]\n}\n\n\u003e\u003e\u003e d = dismantler.run_from_file('file.py').json(indent=4)\n\u003e\u003e\u003e print(d)\n\"{\n    \"type\": \"symbol\",\n    \"name\": \"stmt\",\n    \"value\": [\n        // Nodes...\n    ]\n}\"\n```\n\n## Installation\n\n### Via pip\n```bash\npip3 install dismantler-python\n```\n\n### Via source\n```bash\ngit clone http://github.com/harrydrippin/dismantler-python\ncd dismantler-python\npython3 setup.py install\n```\n\n## Contribution\n\nThis project is very small now, so contribution to this project is very welcome. Feel free to submit some issues or PRs to this project.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharrydrippin%2Fdismantler-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fharrydrippin%2Fdismantler-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharrydrippin%2Fdismantler-python/lists"}