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.3.tar.gz (588.8 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.3-py3-none-any.whl (312.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: krons-0.2.3.tar.gz
  • Upload date:
  • Size: 588.8 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.3.tar.gz
Algorithm Hash digest
SHA256 a855ba866e05cf9fe23b3cee2ab07d2e175c18218a501c6f428a2a2a1cad0516
MD5 99d48c1cc3e328bc7f1db8e3a583277f
BLAKE2b-256 5b9e77ac1cf0e16c1fa8d9f0a4a560b0193400b8e1e9e023bc3849b1f425a2d9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: krons-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 312.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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 85598c344af82d3d749d3f1dd628164d99336175932064390b3a603b8de238a1
MD5 094a6f265d6ff95c610ac21ae21c0dad
BLAKE2b-256 084d84f85989719b7270a117e73e94822ed9a31803b75be7e035da1e0f07d30a

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