Metadata-Version: 2.4
Name: unitymanager
Version: 0.0.1a0
Summary: Utilities for formatting common units.
Project-URL: Homepage, https://github.com/PlayGames-2020/UnityManager
Project-URL: Repository, https://github.com/PlayGames-2020/UnityManager.git
Project-URL: Documentation, https://github.com/PlayGames-2020/UnityManager/blob/main/README.md
Project-URL: Authors, https://github.com/PlayGames-2020
Author-email: PlayGames-2020 <playgames16.01.2020@gmail.com>
License: MIT License
        
        Copyright (c) 2026 PlayGames-2020
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: bytes,formatting,length,mass,units,volume
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Python: >=3.9
Provides-Extra: dev
Requires-Dist: pytest>=8.4.2; extra == 'dev'
Description-Content-Type: text/markdown

# UnityManager

Utilities for formatting common units without runtime dependencies.

> **Status:** alpha (`0.0.1-alpha`). The API is still subject to change.

## Requirements

- Python **3.9 or later**
- No runtime dependencies

## Installation

### GitHub

``` bash
pip install git+https://github.com/PlayGames-2020/SystemDetector.git
```

or

``` bash
pip install git+https://github.com/PlayGames-2020/SystemDetector.git@main
```

### PyPI

``` bash
pip install SystemDetector
```

To install the development dependencies:

```bash
pip install "unitymanager[dev]"
```

## Quick start

```python
from UnityManager import (
    format_bytes,
    format_capacity,
    format_length,
    format_mass,
    format_volume,
)

print(format_bytes(1024))       # 1.00 KB
print(format_length(1500))      # 1.50 km
print(format_capacity(2.5))     # 2.50 l
print(format_mass(2500))        # 2.50 kg
print(format_volume(1))         # 1.00 m³
```

Each formatter accepts a text mode. The default mode `"s"` displays the unit symbol. Use `"n"` for the unit name, combine modes such as `"ns"`, or add `"upper"`, `"lower"`, `"title"` and `"v"` as needed.

## Supported formatters

- `format_bytes`: binary byte units (`B`, `KB`, `MB`, and so on).
- `format_length`: metric lengths from millimetres to kilometres.
- `format_capacity`: metric capacities from millilitres to kilolitres.
- `format_mass`: metric masses from milligrams to kilograms.
- `format_volume`: cubic metric units from cubic millimetres to cubic kilometres.

## Development and testing

```bash
git clone https://github.com/PlayGames-2020/UnityManager.git
cd UnityManager
pip install -e ".[dev]"
python -m pytest
```

## License

Distributed under the [MIT License](LICENSE).

## Links

- [Repository](https://github.com/PlayGames-2020/UnityManager)
- [Documentation](https://github.com/PlayGames-2020/UnityManager/blob/main/README.md)
