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.2.tar.gz (569.0 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.2-py3-none-any.whl (313.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: krons-0.2.2.tar.gz
  • Upload date:
  • Size: 569.0 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.2.tar.gz
Algorithm Hash digest
SHA256 3f1abf3e06e9293957cdcf60fd1716527ea0522a14cd7538ac9132e61eff7ffb
MD5 28d521636fc30d9b31ec465194e61fe1
BLAKE2b-256 2cef3595c4e48fef795d8cab42e00de292b224f5f8f4ba94ef3d94ca56817a47

See more details on using hashes here.

File details

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

File metadata

  • Download URL: krons-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 313.3 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d2389d530620f18aaac408c09d4ab5d7b482e8874cf6374cc1073ceaf49eac70
MD5 d0e519199a4b2719a9fab922f2f48744
BLAKE2b-256 ed1ccac53fc19f99a67d864a1e8a54f34823c7e7c00f03e258fe7b8da66b6ab9

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