Metadata-Version: 2.4
Name: patchwork-core
Version: 2.0.1
Summary: Core of the Patchwork Framework - The distributed asynchronous microframework
Author: Paweł Pecio
License: MIT
Classifier: Development Status :: 5 - Production/Stable
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
Requires-Python: >=3.11.0
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: msgpack
Requires-Dist: msgpack>=1.0; extra == "msgpack"
Provides-Extra: metrics
Requires-Dist: prometheus-client>=0.20; extra == "metrics"
Provides-Extra: testing
Requires-Dist: pytest>=8; extra == "testing"
Requires-Dist: pytest-asyncio>=0.23; extra == "testing"
Provides-Extra: docs
Requires-Dist: mkdocs<2,==1.6.1; extra == "docs"
Requires-Dist: mkdocs-material; extra == "docs"
Requires-Dist: mkdocstrings[python]; extra == "docs"
Dynamic: license-file

# Patchwork Core

Core package of Patchwork - an asynchronous distributed microframework.

This library contains core structures shared by all Patchwork packages:

* `Component` - lifecycle of every Patchwork component
* `Message` and `Delivery` - message model
* serializers (`JSONSerializer`, `FramedSerializer`)
* `AsyncPublisher` and `AsyncSubscriber` - client contract for broker integrations
* `LocalBroker` - in-memory reference implementation of clients, for development and testing
* publisher routing of delayed messages to a postpone queue, see `patchwork-postponer` service
* client contract test suite (`patchwork.core.testing.contract`)

## Requirements

* Python 3.11+

## Installation

``pip install patchwork-core``

Optional extras: `msgpack`, `metrics` (Prometheus), `testing` (contract tests).

## Development

```bash
uv sync --all-extras --dev
uv run pytest tests
uv run ruff check patchwork tests
```

## Documentation

https://patchwork-framework.gitlab.io/core
