Spec-based composable framework for building type-safe systems
Project description
krons
Spec-based composable framework for building type-safe systems.
Installation
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
@implementsdecorator
Quick Start
from kronos.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
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
krons-0.1.0.tar.gz
(392.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
krons-0.1.0-py3-none-any.whl
(216.5 kB
view details)
File details
Details for the file krons-0.1.0.tar.gz.
File metadata
- Download URL: krons-0.1.0.tar.gz
- Upload date:
- Size: 392.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1fed5b9d64d25a4a71afe9edac6a6cfcc1460b32d3ff8abbf48899ed0f97ea9d
|
|
| MD5 |
b9455e61f9d6e90ae93c74080e6dee6d
|
|
| BLAKE2b-256 |
f9df7a38bed672344290cc00fff15e565538f86ee79429f6f0f9d8e8b42c440b
|
File details
Details for the file krons-0.1.0-py3-none-any.whl.
File metadata
- Download URL: krons-0.1.0-py3-none-any.whl
- Upload date:
- Size: 216.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
77368c30bdc154dd1fb8f4ed126b925a285b7f88467ecbf71bbe1a4dd9a55716
|
|
| MD5 |
831519635058369e707db68c0e28b5af
|
|
| BLAKE2b-256 |
964389314fd6f582e4e7828f0c20ae17275a1722e6def68dd637343b416b71af
|