Skip to main content

Framework-agnostic core library for Petrarca Labs backend services (models, ids, schemas, state machines)

Project description

sonnet-core

Framework-agnostic core library for Petrarca Labs backend services.

sonnet-core is the foundation layer beneath sonnet-server. It holds pure data-layer and logic building blocks that carry no web/server framework dependency (no FastAPI, uvicorn, Alembic, Typer, or Jinja2). It may depend on data-modeling libraries (Pydantic, SQLAlchemy, SQLModel) and pure utilities (jsonschema, arrow, loguru).

Layering

sonnet-core    (this package -- pure data/logic)
   ^
sonnet-server  (web/server framework)
   ^
sonnet-auth / sonnet-graph / sonnet-storage

Contents

  • ids -- compact, time-sortable id generation (generate_id, to_base36).
  • models -- Pydantic/SQLModel model building and conversion (create_model, ModelBuilder, to_response_model, update_model_fields).
  • schema -- JSON Schema validation helpers (validate_instance, validate_schema, ValidationResult).
  • enums -- constraint-free enum columns (str_enum_column).
  • versioning -- version-string ordering (pick_latest).

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

sonnet_core-0.1.0.tar.gz (14.9 kB view details)

Uploaded Source

Built Distribution

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

sonnet_core-0.1.0-py3-none-any.whl (16.2 kB view details)

Uploaded Python 3

File details

Details for the file sonnet_core-0.1.0.tar.gz.

File metadata

  • Download URL: sonnet_core-0.1.0.tar.gz
  • Upload date:
  • Size: 14.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for sonnet_core-0.1.0.tar.gz
Algorithm Hash digest
SHA256 57053ccce413019ea7d520d102dcf5575cc9b2b6167de0b24d559efeed553807
MD5 f0a01729862053d3bfd38e407ffd9a35
BLAKE2b-256 4d764c7222ab5fc20bb9de283c962de57141e4dbcf4bb01cb692e403d7e321df

See more details on using hashes here.

Provenance

The following attestation bundles were made for sonnet_core-0.1.0.tar.gz:

Publisher: publish.yml on petrarca/sonnet-server

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sonnet_core-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: sonnet_core-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 16.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for sonnet_core-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4e2a7e457745a41e850288fa2a6ac4f54e83fc300f2c7b18e134cc45d6ae89e0
MD5 ab6b5218a1085bdd54b9b996a96b7f1f
BLAKE2b-256 7a2418d38db4e4a5bea6384394d18f5690752fd0617c20a16b36b02ca8794fab

See more details on using hashes here.

Provenance

The following attestation bundles were made for sonnet_core-0.1.0-py3-none-any.whl:

Publisher: publish.yml on petrarca/sonnet-server

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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