Python Code Extraction UML

Source: Internet
Author: User

Python is a language that supports object-oriented programming, and in large software projects we often use object-oriented features to organize our code, is there a tool that can help us extract UML diagrams from existing code? The answer is yes. Below, we describe each of these tools individually.
Pyreverseis a set of Python code reverse engineering (reverse engineering) tools. It uses a class-hierarchy Python project to indicate that any available information has been extracted and can be easily applied to the generation of UML diagrams, or unit tests such as Pyargo and py2tests. Pyreverse has been integrated into the pylint. GraphvizIt's Bell Labs. Open source graphical Drawing toolkit Graphviz is an open source graphing software that draws structured abstractions and network graphics, and is used in many other technical fields, such as networking, bioinformatics, software engineering, database and Web design, machine learning, and visualization interfaces. The ability to extract UML diagrams from existing code can be implemented using Pyreverse and Graphviz in a comprehensive form. How to install Graphviz installation in the Linux environmentUsing Yum to install automatically, execute the following command under any path: Yum install ' graphviz* '--skip-broken when prompted, enter "Y". --skip-broken: Skip error dependency, do not add this parameter will prompt installation package dependency error, because there is no need for other installation packages, so skip. Install under Windows: http://www.graphviz.org/Download_windows.php Note: More than 2.30 versions, you need to manually add them to the environment variable pyreverse Tool InstallationPyreverse can easily generate UML class diagrams, Pylint with Pyreverse this tool. Installing Pylintpip install Pylint with PIP   start usingGenerally used as: Pyreverse-asmy-o PNG path-asmy: For pyreverse option parameter, all parameters can be viewed through Pyreverse--help. -asmy produces the most detailed results, even including the result parsing of class attributes. If you only need UML diagrams for classes and classes, it is not recommended to add-asmy.  -o Specifies the output file format, support PNG, SVG, DOT, etc. path for the file or folder to be parsed the output results will be directly generated at the command line current path. Results without-asmy at the above

Python Code Extraction UML

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.