Metadata-Version: 2.4
Name: umlio
Version: 2.0.0
Summary: serialize deserialize umlshapes
Author-email: "Humberto A. Sanchez II" <Humberto.A.Sanchez.II@gmail.com>
Maintainer-email: "Humberto A. Sanchez II" <Humberto.A.Sanchez.II@gmail.com>
License-Expression: AGPL-1.0-or-later
Project-URL: Repository, https://github.com/hasii2011/umlio
Keywords: uml,graphical,shapes,python,umldiagrammer
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: untangle>=1.3.1
Requires-Dist: wxPython>=4.3.2
Requires-Dist: codeallybasic>=1.41.0
Requires-Dist: codeallyadvanced>=3.1.0
Requires-Dist: umlmodel>=4.0.0
Requires-Dist: umlshapes>=5.3.0
Provides-Extra: test
Requires-Dist: mypy==2.4.1; extra == "test"
Requires-Dist: mypy-extensions==1.1.0; extra == "test"
Requires-Dist: mypy-plugins-ally>=1.0.0; extra == "test"
Requires-Dist: types-Deprecated==1.3.1.20260130; extra == "test"
Requires-Dist: html-testRunner~=1.2.1; extra == "test"
Requires-Dist: human_id==0.2.0; extra == "test"
Requires-Dist: types-networkx==3.6.1.20260728; extra == "test"
Requires-Dist: termcolor>=3.3.0; extra == "test"
Provides-Extra: deploy
Requires-Dist: wheel==0.48.0; extra == "deploy"
Requires-Dist: setuptools==84.2.1; extra == "deploy"
Requires-Dist: twine==7.0.0; extra == "deploy"
Requires-Dist: build==1.6.1; extra == "deploy"
Dynamic: license-file

[![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://github.com/hasii2011/umlio/graphs/commit-activity)
[![CI](https://github.com/hasii2011/umlio/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/hasii2011/umlio/actions/workflows/ci.yml)
[![PyPI version](https://badge.fury.io/py/umlio.svg)](https://badge.fury.io/py/umlio)
[![License: AGPL v3](https://img.shields.io/badge/License-AGPL_v3-blue.svg)](LICENSE)
[![Made with Python](https://img.shields.io/badge/Made%20with-Python-3776AB?logo=python&logoColor=white)](https://www.python.org/)
[![GitHub Copilot: No](https://img.shields.io/badge/GitHub_Copilot-No-red?logo=github&style=flat-square)](https://github.com/hasii2011/code-ally-basic/wiki/GitHub-Copilot)

# Introduction

`umlio` provides a Python serialization and deserialization layer for [UML Diagrammer](https://github.com/hasii2011/umldiagrammer) `.udt` (compressed project) and `.xml` files (currently XML format `14.0`). It is the updated successor to [oglio](https://github.com/hasii2011/oglio) and bridges [umlmodel](https://github.com/hasii2011/umlmodel) and [umlshapes](https://github.com/hasii2011/umlshapes).

## Supported Diagrams

- **Class Diagrams** (`UmlDocumentType.CLASS_DOCUMENT`): classes, notes, text labels, lollipop interfaces, and links (associations, aggregations, compositions, inheritance, interface realization, and note links).
- **Use Case Diagrams** (`UmlDocumentType.USE_CASE_DOCUMENT`): actors, use cases, notes, text labels, and links.
- **Sequence Diagrams** (`UmlDocumentType.SEQUENCE_DOCUMENT`): instances/lifelines, messages, executions, combined fragments, notes, and text labels.

# Installation

Requires Python 3.13 and `wxPython>=4.3.2`:

```bash
pip install umlio
```

For local development with test and packaging dependencies:

```bash
pip install -e '.[test,deploy]'
```

# Usage

Use `Reader` to load `.udt` or `.xml` files into an `UmlProject`, and `Writer` to serialize an `UmlProject` back to disk:

```python
from pathlib import Path

from umlio.IOTypes import UmlProject
from umlio.Reader import Reader
from umlio.Writer import Writer

reader: Reader = Reader()
umlProject: UmlProject = reader.readProjectFile(fileName=Path('MyProject.udt'))

writer: Writer = Writer()
writer.writeFile(umlProject=umlProject, fileName=Path('MyProjectCopy.udt'))
writer.writeXmlFile(umlProject=umlProject, fileName=Path('MyProjectCopy.xml'))
```

# Development & Verification

Run type checks and the unit test suite from the project root:

```bash
mypy --config-file .mypi.ini --check-untyped-defs src/umlio tests
PYTHONPATH=src:. python -m unittest discover -s tests -t . -p 'Test*.py' -v
```

*(On headless Linux, prefix the test command with `xvfb-run -a` for wxPython.)*

___

Written by <a href="mailto:humberto.a.sanchez.ii@gmail.com?subject=Hello Humberto">Humberto A. Sanchez II</a> (C) 2026
___

## Note
For all kinds of problems, requests, enhancements, bug reports, etc., please drop me an e-mail.


> [!NOTE]
> **I do not consent to GitHub's use of this project's code in Copilot.** See our [GitHub Copilot Statement](https://github.com/hasii2011/code-ally-basic/wiki/GitHub-Copilot) for details.
