Metadata-Version: 2.4
Name: acty-core
Version: 0.1.0
Summary: Group-only runtime core for scheduling, lifecycle, events, and cache primitives
Project-URL: Homepage, https://github.com/conspol/acty-core
Project-URL: Repository, https://github.com/conspol/acty-core
Project-URL: Issues, https://github.com/conspol/acty-core/issues
Maintainer-email: Konstantin Polev <70580603+conspol@users.noreply.github.com>
License-Expression: MIT
License-File: LICENSE
Keywords: asyncio,runtime,scheduler,workflow
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: System :: Distributed Computing
Requires-Python: >=3.12
Requires-Dist: rich>=13.0.0
Requires-Dist: structlog>=21.5.0
Provides-Extra: dev
Requires-Dist: build>=1.2.2; extra == 'dev'
Requires-Dist: opentelemetry-sdk>=1.39.0; extra == 'dev'
Requires-Dist: prometheus-client>=0.22.0; extra == 'dev'
Requires-Dist: pytest-asyncio>=1.3.0; extra == 'dev'
Requires-Dist: pytest>=9.0.0; extra == 'dev'
Requires-Dist: twine>=5.1.1; extra == 'dev'
Description-Content-Type: text/markdown

# acty-core

`acty-core` is the low-level runtime package behind the Acty ecosystem. It
provides the scheduler, lifecycle controller, event bus, cache primitives, and
lightweight demo executors without the higher-level TUI API.

## Install

```bash
pip install acty-core
```

For local development:

```bash
pip install -e .[dev]
```

## Example

Run the headless group demo:

```bash
python examples/group_headless.py --groups 3
```

Run the scheduler-only demo:

```bash
python examples/scheduler_headless.py --groups 3
```

Write JSONL events that can be inspected later:

```bash
python examples/scheduler_jsonl.py --event-jsonl /tmp/acty_events.jsonl
```

## What It Includes

- `GroupLifecycleController` for primer/follower orchestration
- `WorkStealingScheduler` and pool configuration
- event bus primitives and JSONL-friendly event emission
- cache registry and cache-handle propagation support
- development executors such as `NoopExecutor`, `EchoExecutor`, and `SimulatedExecutor`

## Logging

`acty-core` uses `structlog`. For readable local logs and rich tracebacks:

```python
from acty_core import configure_logging

configure_logging(handler="rich", show_locals=True)
```

## Cache Behavior

When a group uses a cache registry, the lifecycle attaches the resolved cache
handle to queued jobs as `job.cache_handle`. Executors can reuse provider
metadata from the cache handle instead of creating duplicate cache entries.

## Development

- tests live under `tests/`
- example programs live under `examples/`
- the package is intentionally usable without the higher-level `acty` TUI layer
