Skip to main content

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 @implements decorator

Quick Start

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

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.2.1.tar.gz (566.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

krons-0.2.1-py3-none-any.whl (311.7 kB view details)

Uploaded Python 3

File details

Details for the file krons-0.2.1.tar.gz.

File metadata

  • Download URL: krons-0.2.1.tar.gz
  • Upload date:
  • Size: 566.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for krons-0.2.1.tar.gz
Algorithm Hash digest
SHA256 afb47c44ad634ab7529f1b796316ba8d8b7b31353770a8a903c143c02f6fdfef
MD5 c6436da0f103db96becaeb5a8453f49d
BLAKE2b-256 d767176332aaa38fe070121f3faf3a9238795d3280a82b39c03d8ae6152db471

See more details on using hashes here.

File details

Details for the file krons-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: krons-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 311.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for krons-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 56863764ae55768fbf836ba2df3db929162177e2e151beb3439b3bf1b38d2120
MD5 d27d5cedcadb3f3269081178827c34ee
BLAKE2b-256 19978110597b7ea6a70535bc205f3af1907057fd1f4ba3e962e948777e0cca33

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page