Metadata-Version: 2.4
Name: pleroma
Version: 0.2.0
Summary: Base classes for mergeable entities
Project-URL: Repository, https://gitlab.com/Kencho1/pleroma
Project-URL: Documentation, https://pleroma.readthedocs.io
Author: Jesús Alonso Abad
License-Expression: MIT
License-File: LICENSE.md
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.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: 3.15
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Python: >=3.11
Provides-Extra: docs
Requires-Dist: mkdocs-material~=9.5; extra == 'docs'
Requires-Dist: mkdocstrings[python]~=0.27; extra == 'docs'
Requires-Dist: mkdocs~=1.6; extra == 'docs'
Provides-Extra: pydantic
Requires-Dist: pydantic~=2.0; extra == 'pydantic'
Provides-Extra: test
Requires-Dist: mypy~=1.8; extra == 'test'
Requires-Dist: pydantic~=2.0; extra == 'test'
Requires-Dist: pytest-cov~=6.0; extra == 'test'
Requires-Dist: pytest-mark-ac~=1.1; extra == 'test'
Requires-Dist: pytest~=8.3; extra == 'test'
Requires-Dist: pyyaml~=6.0; extra == 'test'
Requires-Dist: ruff~=0.8; extra == 'test'
Requires-Dist: tox~=4.0; extra == 'test'
Description-Content-Type: text/markdown

# pleroma

> _*πλήρωμα* — Greek; Sum total._

Base classes for mergeable entities. Provides `MergeableMixin` for dataclasses and `MergeableModel`
for pydantic v2, with a composable last-non-`None`-wins merge strategy that can be customised at
any granularity.

Full documentation: <https://pleroma.readthedocs.io>

## Installation

```bash
pip install pleroma
```

With pydantic v2 support:

```bash
pip install "pleroma[pydantic]"
```

## Quick start

```python
import dataclasses
from pleroma import MergeableMixin

@dataclasses.dataclass
class Config(MergeableMixin):
    host: str | None = None
    port: int | None = None
    debug: bool | None = None

defaults = Config(host="localhost", port=8080, debug=False)
overrides = Config(port=9090)

result = Config.merge([defaults, overrides])
# Config(host='localhost', port=9090, debug=False)
```

## License

MIT — see [LICENSE.md](LICENSE.md).

## Author

Jesús Alonso Abad
