uml-generator


Nameuml-generator JSON
Version 0.2.4 PyPI version JSON
download
home_pagehttps://github.com/SIIR3X/python-uml-generator
SummaryA tool to generate UML diagrams from project files.
upload_time2024-08-31 16:31:06
maintainerNone
docs_urlNone
authorSIIR3X
requires_python>=3.6
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # UML Generator - Python

[![PyPI version](https://badge.fury.io/py/uml-generator.svg)](https://pypi.org/project/uml-generator/)
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://github.com/SIIR3X/python-uml-generator/blob/main/LICENSE)

A tool to generate UML diagrams from project files.

![UML](https://raw.githubusercontent.com/SIIR3X/python-uml-generator/main/examples/class_uml_example.png)


## Description

UML Generator is a Python tool available on PyPI that allows you to generate UML diagrams from your project's source
code. This tool is designed to help developers quickly visualize the structure and relationships within their codebase,
making it easier to understand and communicate the architecture of the project.

The tool analyzes your project's files, identifies classes, interfaces, and their relationships, and generates UML
diagrams in PNG format. It's particularly useful for small projects where a fast and straightforward way to document
the software architecture is needed.

Currently, UML Generator only supports projects written in Java. Future updates may include support for additional
programming languages and new types of UML diagrams to expand its capabilities.


## Installation

You can install this tool via pip:
```bash
pip install uml-generator
```


## Dependencies

This project uses the following dependencies:

- **Python:** >= 3.12.4
- **plantuml:** == 0.3.0
- **pytest:** (dev dependency): 8.3.2


## Usage

### Generate a class UML
```Python
from uml_generator import *

def example():
    project_directory = "/examples/project_example/"
    language_type = LANGUAGES.JAVA
    output_file = "/examples/example_uml"

    generate_class_uml(project_directory, language_type, output_file)
```


## Methods

### generate_uml(project_directory, language_type, output_file)

Generates a UML diagram from a project directory.

**Parameters:**

* **project_directory (string)** - The directory path of the project to analyze.
* **language_type (string)** - The programming language used in the project. This should be one of the constants 
defined in the LANGUAGES class (e.g., LANGUAGES.JAVA).
* **output_file (string)** - The file path where the UML diagram should be saved.

**Returns:**

This function does not return a value. It generates a UML diagram, converts it to PlantUML code, and saves the diagram 
to the specified output file.

**Notes:**

* The `project_directory` parameter should point to the root directory of the project you wish to analyze.
* The `language_type parameter must be one of the constants defined in the LANGUAGES class. Currently, only Java 
is supported (LANGUAGES.JAVA). 
* The output will be saved in PNG format, as specified by the `output_file` path.

The `LANGUAGES` class, defined in `src/uml_generator/types/languages.py`, contains constants representing the supported 
programming languages for UML generation. This ensures consistency and reduces the likelihood of errors when specifying 
the language type.

## License

This project is licensed under the MIT License. See the `LICENSE` file for details.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/SIIR3X/python-uml-generator",
    "name": "uml-generator",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": null,
    "author": "SIIR3X",
    "author_email": "siir3xs@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/0a/40/59a119bcf24f0fc42a7d861f9133ae1041263d693ea1e5d5540454cc2483/uml_generator-0.2.4.tar.gz",
    "platform": null,
    "description": "# UML Generator - Python\r\n\r\n[![PyPI version](https://badge.fury.io/py/uml-generator.svg)](https://pypi.org/project/uml-generator/)\r\n[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://github.com/SIIR3X/python-uml-generator/blob/main/LICENSE)\r\n\r\nA tool to generate UML diagrams from project files.\r\n\r\n![UML](https://raw.githubusercontent.com/SIIR3X/python-uml-generator/main/examples/class_uml_example.png)\r\n\r\n\r\n## Description\r\n\r\nUML Generator is a Python tool available on PyPI that allows you to generate UML diagrams from your project's source\r\ncode. This tool is designed to help developers quickly visualize the structure and relationships within their codebase,\r\nmaking it easier to understand and communicate the architecture of the project.\r\n\r\nThe tool analyzes your project's files, identifies classes, interfaces, and their relationships, and generates UML\r\ndiagrams in PNG format. It's particularly useful for small projects where a fast and straightforward way to document\r\nthe software architecture is needed.\r\n\r\nCurrently, UML Generator only supports projects written in Java. Future updates may include support for additional\r\nprogramming languages and new types of UML diagrams to expand its capabilities.\r\n\r\n\r\n## Installation\r\n\r\nYou can install this tool via pip:\r\n```bash\r\npip install uml-generator\r\n```\r\n\r\n\r\n## Dependencies\r\n\r\nThis project uses the following dependencies:\r\n\r\n- **Python:** >= 3.12.4\r\n- **plantuml:** == 0.3.0\r\n- **pytest:** (dev dependency): 8.3.2\r\n\r\n\r\n## Usage\r\n\r\n### Generate a class UML\r\n```Python\r\nfrom uml_generator import *\r\n\r\ndef example():\r\n    project_directory = \"/examples/project_example/\"\r\n    language_type = LANGUAGES.JAVA\r\n    output_file = \"/examples/example_uml\"\r\n\r\n    generate_class_uml(project_directory, language_type, output_file)\r\n```\r\n\r\n\r\n## Methods\r\n\r\n### generate_uml(project_directory, language_type, output_file)\r\n\r\nGenerates a UML diagram from a project directory.\r\n\r\n**Parameters:**\r\n\r\n* **project_directory (string)** - The directory path of the project to analyze.\r\n* **language_type (string)** - The programming language used in the project. This should be one of the constants \r\ndefined in the LANGUAGES class (e.g., LANGUAGES.JAVA).\r\n* **output_file (string)** - The file path where the UML diagram should be saved.\r\n\r\n**Returns:**\r\n\r\nThis function does not return a value. It generates a UML diagram, converts it to PlantUML code, and saves the diagram \r\nto the specified output file.\r\n\r\n**Notes:**\r\n\r\n* The `project_directory` parameter should point to the root directory of the project you wish to analyze.\r\n* The `language_type parameter must be one of the constants defined in the LANGUAGES class. Currently, only Java \r\nis supported (LANGUAGES.JAVA). \r\n* The output will be saved in PNG format, as specified by the `output_file` path.\r\n\r\nThe `LANGUAGES` class, defined in `src/uml_generator/types/languages.py`, contains constants representing the supported \r\nprogramming languages for UML generation. This ensures consistency and reduces the likelihood of errors when specifying \r\nthe language type.\r\n\r\n## License\r\n\r\nThis project is licensed under the MIT License. See the `LICENSE` file for details.\r\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A tool to generate UML diagrams from project files.",
    "version": "0.2.4",
    "project_urls": {
        "Homepage": "https://github.com/SIIR3X/python-uml-generator"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9eca35443d6f00b270578c4efdecb7f92c232b19db127b26133195fc928f9f38",
                "md5": "a5d462393fcfc079951ecaa494c7f080",
                "sha256": "13f2052d87c076fd201e65952e82a528be96138b510b5d97e95388bae609218c"
            },
            "downloads": -1,
            "filename": "uml_generator-0.2.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "a5d462393fcfc079951ecaa494c7f080",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 24426,
            "upload_time": "2024-08-31T16:31:04",
            "upload_time_iso_8601": "2024-08-31T16:31:04.634837Z",
            "url": "https://files.pythonhosted.org/packages/9e/ca/35443d6f00b270578c4efdecb7f92c232b19db127b26133195fc928f9f38/uml_generator-0.2.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0a4059a119bcf24f0fc42a7d861f9133ae1041263d693ea1e5d5540454cc2483",
                "md5": "4d10b8942a20db92889a8b1405eb4d34",
                "sha256": "f5b8ae2a8b311b62d8eb29225e9653979a2bdfc9cf52210d4f21b7c74535679f"
            },
            "downloads": -1,
            "filename": "uml_generator-0.2.4.tar.gz",
            "has_sig": false,
            "md5_digest": "4d10b8942a20db92889a8b1405eb4d34",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 58221,
            "upload_time": "2024-08-31T16:31:06",
            "upload_time_iso_8601": "2024-08-31T16:31:06.121697Z",
            "url": "https://files.pythonhosted.org/packages/0a/40/59a119bcf24f0fc42a7d861f9133ae1041263d693ea1e5d5540454cc2483/uml_generator-0.2.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-31 16:31:06",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "SIIR3X",
    "github_project": "python-uml-generator",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "uml-generator"
}
        
Elapsed time: 0.56405s