{"id":19612559,"url":"https://github.com/chenjd/pyuml","last_synced_at":"2025-04-27T23:30:47.629Z","repository":{"id":37673288,"uuid":"245058855","full_name":"chenjd/pyuml","owner":"chenjd","description":"A toy project that generates UML diagrams of Python code by parsing the abstract syntax tree of the target Python code.","archived":false,"fork":false,"pushed_at":"2023-10-03T22:35:45.000Z","size":883,"stargazers_count":4,"open_issues_count":4,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-05-02T05:11:39.196Z","etag":null,"topics":["ast","code-analysis","python","python3","uml"],"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/chenjd.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-03-05T03:22:12.000Z","updated_at":"2022-04-10T21:20:14.000Z","dependencies_parsed_at":"2022-08-18T10:30:07.644Z","dependency_job_id":null,"html_url":"https://github.com/chenjd/pyuml","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chenjd%2Fpyuml","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chenjd%2Fpyuml/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chenjd%2Fpyuml/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chenjd%2Fpyuml/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chenjd","download_url":"https://codeload.github.com/chenjd/pyuml/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224091944,"owners_count":17254149,"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","code-analysis","python","python3","uml"],"created_at":"2024-11-11T10:47:03.733Z","updated_at":"2024-11-11T10:47:04.179Z","avatar_url":"https://github.com/chenjd.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pyuml\nA toy project that generates UML diagrams of Python code by parsing the abstract syntax tree of the target Python code.\n\n![](https://img.shields.io/github/v/release/chenjd/pyuml?sort=semver)\n[![Build Status](http://52.230.5.15:8080/buildStatus/icon?job=pyuml)](http://52.230.5.15:8080/job/pyuml/)\n![](https://img.shields.io/jenkins/coverage/cobertura?jobUrl=http%3A%2F%2F52.230.5.15%3A8080%2Fjob%2Fpyuml%2F)\n\n## How to use\n\n\n    ========================================\n    2uml  load  config  exit  help  version\n\n    2uml:\n    usage: 2uml [-h] input output\n    \n    Generate UML diagram from Python source code\n\n    positional arguments:\n      input       input file/folder\n      output      output folder\n\n    optional arguments:\n      -h, --help  show this help message and exit\n    \n    load:\n    usage: load [-h] input\n    \n    Deserialize AST data from serialization data\n\n    positional arguments:\n      input       input class name\n\n    optional arguments:\n      -h, --help  show this help message and exit\n      \n    config:\n    Print config info\n    \n    version:\n    Print version info\n    \n    exit:\n    Exit the app\n      \n\n## A Command Line Interpreter runs on Windows \u0026 macOS\nYou can download it from the [release page](http://github.com/chenjd/pyuml/releases).\n\n## Support [Type Annotation](https://docs.python.org/3/library/typing.html) \u0026 [Type Comments](https://www.python.org/dev/peps/pep-0484/#type-comments)\n\n    # Type Annotation\n    class Car(MovementObject):\n    def __init__(self):\n        self.num_one: int = 1\n        self.num_two: float = 2.0\n        self.name: str = \"car\"\n\n    def get_user_name(self, user_id: int) -\u003e str:\n        return 'car'\nhttps://github.com/chenjd/pyuml/blob/master/test/test_py_code/py_type_annotations.py\n\n    # Type Comments \n    class Car(MovementObject):\n    def __init__(self):\n        self.num_one = 1  # type: int\n        self.num_two = 2.0  # type: float\n        self.name = \"car\"  # type: str\n\n    def get_user_name(self,\n                      user_id,  # type: int\n                      ):  # type: str\n        return 'car'\n            \nhttps://github.com/chenjd/pyuml/blob/master/test/test_py_code/py_type_comments.py\n      \n![](./result/uml0.png)\n\n\n## Testing\n\n#### Unit Test\nYou can find unit test in the **test** folder. There are some code resources be used in the tests. There are 23 test cases now.\n\n![](./result/unittest_screenshot.png)\n\n\n## Data Persistence\nstore some information of a class, such as the count of methods in a class etc. in artifact folder.\n\n## Config\n  \n    [DEFAULT]\n    author = jiadong chen\n    version = 0.0.1\n    url = https://github.com/chenjd/pyuml\nuserConfig.ini\n\n\n## Exception Handle\nexception information will be written to the error.log file in log folder.\n\n     \n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchenjd%2Fpyuml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchenjd%2Fpyuml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchenjd%2Fpyuml/lists"}