Metadata-Version: 2.4
Name: krons
Version: 0.2.4
Summary: Spec-based composable framework for building type-safe systems
Project-URL: Homepage, https://github.com/khive-ai/krons
Project-URL: Repository, https://github.com/khive-ai/krons
Project-URL: Issues, https://github.com/khive-ai/krons/issues
Author-email: HaiyangLi <quantocean.li@gmail.com>
License-Expression: Apache-2.0
License-File: LICENSE
Keywords: composable,framework,pydantic,spec,type-safe,validation
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Python: >=3.11
Requires-Dist: anyio>=4.10.0
Requires-Dist: httpx>=0.26.0
Requires-Dist: orjson>=3.10.0
Requires-Dist: pydantic>=2.10.0
Requires-Dist: pyyaml>=6.0.3
Requires-Dist: rapidfuzz>=3.10.0
Provides-Extra: agent
Requires-Dist: fastmcp>=2.14.4; extra == 'agent'
Requires-Dist: tiktoken>=0.11.0; extra == 'agent'
Provides-Extra: all
Requires-Dist: fastmcp>=2.14.4; extra == 'all'
Requires-Dist: rich>=13.0; extra == 'all'
Requires-Dist: tiktoken>=0.11.0; extra == 'all'
Provides-Extra: display
Requires-Dist: rich>=13.0; extra == 'display'
Provides-Extra: fastmcp
Requires-Dist: fastmcp>=2.14.4; extra == 'fastmcp'
Provides-Extra: tiktoken
Requires-Dist: tiktoken>=0.11.0; extra == 'tiktoken'
Description-Content-Type: text/markdown

# krons

Spec-based composable framework for building type-safe systems.

## Installation

```bash
pip install krons
```

## Features

- **Spec/Operable**: Type-safe field definitions with validation, defaults, and DB metadata
- **Node**: Polymorphic content containers with DB serialization
- **Services**: Unified service interfaces (iModel) with hooks and rate limiting
- **Enforcement**: Policy evaluation and action handlers with typed I/O
- **Protocols**: Runtime-checkable protocols with `@implements` decorator

## Quick Start

```python
from krons.specs import Spec, Operable

# Define specs
name_spec = Spec(str, name="name")
count_spec = Spec(int, name="count", default=0, ge=0)

# Compose into structure
operable = Operable([name_spec, count_spec])
MyModel = operable.compose_structure("MyModel")
```

## Requirements

- Python 3.11+
- pydantic 2.x
- anyio
- httpx
- orjson

## License

Apache-2.0
