uml-django


Nameuml-django JSON
Version 0.0.1 PyPI version JSON
download
home_pagehttps://github.com/Pedro-V8/uml-django
SummaryA UML Generator for Django and Django Rest Framework projects
upload_time2024-09-27 20:40:49
maintainerNone
docs_urlNone
authorPedro Vieira
requires_pythonNone
licenseMIT
keywords generator converter convert uml django rest framework
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Django UML Generator

Uml-Django is a library that aims to convert project models into a UML diagram, indicating their attributes, methods and the relationships of all entities.

## How it Works

From a file created at the root of the project (this is an important step that will be demonstrated below), it will be necessary to create an instance of the Library Class, passing the path to the project's "settings.py" file as a parameter.

With this configuration duly performed and executing the created file, an inspection will be carried out throughout the project in search of all the models of the apps present. Once identified, their attributes, methods, and their relationships with other models, if any, will be saved.

After that, a png file named "class diagram.png" will be created (also in the project root) with a simple class diagram of all classes of the identified models.

## Installation and Usage

Before starting the installation, below are important guidelines to ensure the proper functioning of the application.

- Make sure that python and pip are properly updated, in the current release the library was created with python Python 3.9.6 and Pip 21.2.4. Be with equal or higher versions.

- Install in the same environment as the project's dependencies, for example with the python virtual environment activated (venv), so that the inspection is effective.


1.  Start by downloading the "django_uml" dependency via pip

```
pip3 install uml-django
```

2. Create a .py file at the root of the project (this step is important), below is an example of a simple project and the extension file called "inspect_class.py"

```
.
├── db.sqlite3
├── django_project/
│   ├── __init__.py
│   ├── asgi.py
│   ├── settings.py
│   ├── urls.py
│   └── wsgi.py
├── manage.py
├── app_01/
├── app_02/
└── app_03/
├── requirements.txt
├── inspect_class.py <---
├── venv

```
- The project has 3 apps and the "django_project" directory where the configuration file "settings.py" is located. In addition, the file "inspect_class.py" was added to the root of the project

3. With the file created, just follow the code below, which consists of instantiating an object and parameterizing the path to the project's "settings.py" file, then just call two functions as shown below.

```
from uml_django.inspect import Inspect

inspect_obj = Inspect('django_project.settings')

inspect_obj.inspect()
inspect_obj.create_UML()
```

4. Run the file "inspect_class.py"

```
python3 inspect_class.py
```

After the guidelines, the png file with the diagram will appear in the root of the project with the name "class_diagram.png", containing all the project models synthesized in a class diagram

## Final Considerations
This is an Open-Source project, so you are free to receive suggestions for improvements and enhancements to ensure the quality and viability of the code.
This communication will be very effective if applied in Issues and PR's openings so that the maintainers can discuss and implement new ideas and bug fixes.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Pedro-V8/uml-django",
    "name": "uml-django",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "generator converter convert UML Django Rest Framework",
    "author": "Pedro Vieira",
    "author_email": "pedrophdv8@outlook.com",
    "download_url": "https://files.pythonhosted.org/packages/b2/b2/00fa1e5a0b6e73a6bad20f1daaa019f63044ee26592a730a8e5c05fdc1b1/uml_django-0.0.1.tar.gz",
    "platform": null,
    "description": "# Django UML Generator\r\n\r\nUml-Django is a library that aims to convert project models into a UML diagram, indicating their attributes, methods and the relationships of all entities.\r\n\r\n## How it Works\r\n\r\nFrom a file created at the root of the project (this is an important step that will be demonstrated below), it will be necessary to create an instance of the Library Class, passing the path to the project's \"settings.py\" file as a parameter.\r\n\r\nWith this configuration duly performed and executing the created file, an inspection will be carried out throughout the project in search of all the models of the apps present. Once identified, their attributes, methods, and their relationships with other models, if any, will be saved.\r\n\r\nAfter that, a png file named \"class diagram.png\" will be created (also in the project root) with a simple class diagram of all classes of the identified models.\r\n\r\n## Installation and Usage\r\n\r\nBefore starting the installation, below are important guidelines to ensure the proper functioning of the application.\r\n\r\n- Make sure that python and pip are properly updated, in the current release the library was created with python Python 3.9.6 and Pip 21.2.4. Be with equal or higher versions.\r\n\r\n- Install in the same environment as the project's dependencies, for example with the python virtual environment activated (venv), so that the inspection is effective.\r\n\r\n\r\n1.  Start by downloading the \"django_uml\" dependency via pip\r\n\r\n```\r\npip3 install uml-django\r\n```\r\n\r\n2. Create a .py file at the root of the project (this step is important), below is an example of a simple project and the extension file called \"inspect_class.py\"\r\n\r\n```\r\n.\r\n\u00e2\u201d\u0153\u00e2\u201d\u20ac\u00e2\u201d\u20ac db.sqlite3\r\n\u00e2\u201d\u0153\u00e2\u201d\u20ac\u00e2\u201d\u20ac django_project/\r\n\u00e2\u201d\u201a\u00c2\u00a0\u00c2\u00a0 \u00e2\u201d\u0153\u00e2\u201d\u20ac\u00e2\u201d\u20ac __init__.py\r\n\u00e2\u201d\u201a\u00c2\u00a0\u00c2\u00a0 \u00e2\u201d\u0153\u00e2\u201d\u20ac\u00e2\u201d\u20ac asgi.py\r\n\u00e2\u201d\u201a\u00c2\u00a0\u00c2\u00a0 \u00e2\u201d\u0153\u00e2\u201d\u20ac\u00e2\u201d\u20ac settings.py\r\n\u00e2\u201d\u201a\u00c2\u00a0\u00c2\u00a0 \u00e2\u201d\u0153\u00e2\u201d\u20ac\u00e2\u201d\u20ac urls.py\r\n\u00e2\u201d\u201a\u00c2\u00a0\u00c2\u00a0 \u00e2\u201d\u201d\u00e2\u201d\u20ac\u00e2\u201d\u20ac wsgi.py\r\n\u00e2\u201d\u0153\u00e2\u201d\u20ac\u00e2\u201d\u20ac manage.py\r\n\u00e2\u201d\u0153\u00e2\u201d\u20ac\u00e2\u201d\u20ac app_01/\r\n\u00e2\u201d\u0153\u00e2\u201d\u20ac\u00e2\u201d\u20ac app_02/\r\n\u00e2\u201d\u201d\u00e2\u201d\u20ac\u00e2\u201d\u20ac app_03/\r\n\u00e2\u201d\u0153\u00e2\u201d\u20ac\u00e2\u201d\u20ac requirements.txt\r\n\u00e2\u201d\u0153\u00e2\u201d\u20ac\u00e2\u201d\u20ac inspect_class.py <---\r\n\u00e2\u201d\u0153\u00e2\u201d\u20ac\u00e2\u201d\u20ac venv\r\n\r\n```\r\n- The project has 3 apps and the \"django_project\" directory where the configuration file \"settings.py\" is located. In addition, the file \"inspect_class.py\" was added to the root of the project\r\n\r\n3. With the file created, just follow the code below, which consists of instantiating an object and parameterizing the path to the project's \"settings.py\" file, then just call two functions as shown below.\r\n\r\n```\r\nfrom uml_django.inspect import Inspect\r\n\r\ninspect_obj = Inspect('django_project.settings')\r\n\r\ninspect_obj.inspect()\r\ninspect_obj.create_UML()\r\n```\r\n\r\n4. Run the file \"inspect_class.py\"\r\n\r\n```\r\npython3 inspect_class.py\r\n```\r\n\r\nAfter the guidelines, the png file with the diagram will appear in the root of the project with the name \"class_diagram.png\", containing all the project models synthesized in a class diagram\r\n\r\n## Final Considerations\r\nThis is an Open-Source project, so you are free to receive suggestions for improvements and enhancements to ensure the quality and viability of the code.\r\nThis communication will be very effective if applied in Issues and PR's openings so that the maintainers can discuss and implement new ideas and bug fixes.\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A UML Generator for Django and Django Rest Framework projects",
    "version": "0.0.1",
    "project_urls": {
        "C\u00f3digo fonte": "https://github.com/Pedro-V8/uml-django",
        "Download": "https://github.com/Pedro-V8/uml-django/archive/0.0.1.zip",
        "Homepage": "https://github.com/Pedro-V8/uml-django"
    },
    "split_keywords": [
        "generator",
        "converter",
        "convert",
        "uml",
        "django",
        "rest",
        "framework"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b2b200fa1e5a0b6e73a6bad20f1daaa019f63044ee26592a730a8e5c05fdc1b1",
                "md5": "68a3844b98eae06a2acdad2fa52aa272",
                "sha256": "c75f54a5f5c587af988fa8c4aa8f7254c1fee571b3cdc8b12de1f96b014b3c1d"
            },
            "downloads": -1,
            "filename": "uml_django-0.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "68a3844b98eae06a2acdad2fa52aa272",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 5449,
            "upload_time": "2024-09-27T20:40:49",
            "upload_time_iso_8601": "2024-09-27T20:40:49.135653Z",
            "url": "https://files.pythonhosted.org/packages/b2/b2/00fa1e5a0b6e73a6bad20f1daaa019f63044ee26592a730a8e5c05fdc1b1/uml_django-0.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-27 20:40:49",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Pedro-V8",
    "github_project": "uml-django",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "uml-django"
}
        
Elapsed time: 9.21088s