Metadata-Version: 2.4
Name: CharacterManager
Version: 0.0.1a0
Summary: A Python library for creating, validating, and managing characters,  RPG stats, inventories, equipment, skills, and relationships.
Project-URL: Homepage, https://github.com/PlayGames-2020/CharacterManager
Project-URL: Repository, https://github.com/PlayGames-2020/CharacterManager.git
Project-URL: Documentation, https://github.com/PlayGames-2020/CharacterManager/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: characters,game,inventory,relationships,rpg
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

# CharacterManager

A Python library for creating and managing game characters and RPG systems.
The project brings together, in a simple API based on dataclasses, character data,
combat statistics, progression, inventory, equipment, skills,
status effects, and compatibility rules for relationships.

> **Status:** alpha (`0.0.1-alpha`). A API ainda pode sofrer alterações.

## Requisitos

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

## Instalação

### PyPI

```bash
pip install CharacterManager
```

### GitHub

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

To install the development dependencies:

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

## Quick Start

```python
from decimal import Decimal

from CharacterManager import Character, Combat, Inventory, Item, RPG

character = Character(
    name="Andrew",
    age=20,
    sex="man",
    sexuality="heterosexual",
    weight=60.0,
    height=Decimal("1.70"),
    race="human",
    job="unemployed",
    social_class="outsider",
)

combat = Combat(attack=15, defense=12)
rpg = RPG(level=1, hp=100, max_hp=100)

potion = Item(
    name="Healing potion",
    type="consumable",
    value=25,
    description="Restores health points.",
)
inventory = Inventory()
inventory.add(potion, count=3)

print(character.name)          # Andrew
print(character.is_adult)      # True
print(character.bmi)           # Calculated BMI
print(inventory.count_of("Healing potion"))  # 3
```

## Key features

- **Characters:** identity, age, race, profession, social class and physical attributes.
- **Validation:** race-specific limits for age, height and weight, as well as RPG validations.
- **Combat and progression:** attributes, health, mana, stamina, gold, experience and levels.
- **Inventory:** stackable items, weight limit, count and total value.
- **Equipment:** slots, compatibility rules and item bonuses.
- **Skills:** costs, cooldowns and applicable effects.
- **Status effects:** buffs, debuffs, damage and healing per turn.
- **Relationships:** compatibility based on gender, sexuality and narrative restrictions.
- **Serialisation:** converting structures to dictionaries using `as_dict()` and copying them using `as_class()`.

## Development and testing

Clone the repository and install the package along with the development dependencies:

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

Run the tests using:

```bash
python -m pytest
```

The tests are located in the `tests/` directory.

## License

Distributed under the licence [MIT](LICENSE).

## Links

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