Metadata-Version: 2.4
Name: lattice-core-ai
Version: 0.1.0
Summary: What lattice's packages share and must keep identical.
Keywords: agents,pydantic,lattice
Author: Alex Nodeland
Author-email: Alex Nodeland <alex@ournature.studio>
License-Expression: MIT
License-File: LICENSE
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Framework :: Pydantic :: 2
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Software Development :: Libraries
Classifier: Typing :: Typed
Requires-Dist: pydantic>=2.13
Requires-Dist: langfuse>=4.15,<5 ; extra == 'langfuse'
Requires-Dist: opentelemetry-sdk>=1.45 ; extra == 'langfuse'
Requires-Dist: pydantic-ai-slim[openai]>=2.51 ; extra == 'litellm'
Requires-Dist: httpx2>=2.7 ; extra == 'litellm'
Requires-Dist: opentelemetry-api>=1.45 ; extra == 'litellm'
Requires-Dist: opentelemetry-exporter-otlp-proto-http>=1.45 ; extra == 'otel'
Requires-Dist: opentelemetry-instrumentation-asyncpg>=0.66b0 ; extra == 'otel'
Requires-Dist: opentelemetry-instrumentation-fastapi>=0.66b0 ; extra == 'otel'
Requires-Dist: opentelemetry-instrumentation-httpx>=0.66b0 ; extra == 'otel'
Requires-Dist: opentelemetry-instrumentation-logging>=0.66b0 ; extra == 'otel'
Requires-Dist: opentelemetry-instrumentation-sqlalchemy>=0.66b0 ; extra == 'otel'
Requires-Dist: opentelemetry-processor-baggage>=0.66b0 ; extra == 'otel'
Requires-Dist: opentelemetry-sdk>=1.45 ; extra == 'otel'
Requires-Dist: pydantic-ai-slim>=2.51 ; extra == 'otel'
Requires-Dist: sqlalchemy[asyncio]>=2.1 ; extra == 'sql'
Requires-Python: >=3.12
Project-URL: Homepage, https://lattice.alexnodeland.com/lattice-core/
Project-URL: Documentation, https://lattice.alexnodeland.com/lattice-core/
Project-URL: Repository, https://github.com/alexnodeland/lattice
Project-URL: Issues, https://github.com/alexnodeland/lattice/issues
Project-URL: Changelog, https://github.com/alexnodeland/lattice/blob/main/packages/lattice-core/CHANGELOG.md
Provides-Extra: langfuse
Provides-Extra: litellm
Provides-Extra: otel
Provides-Extra: sql
Description-Content-Type: text/markdown

<p align="center">
  <a href="https://github.com/alexnodeland/lattice/blob/main/packages/lattice-core/LICENSE"><img alt="License: MIT" src="https://img.shields.io/badge/license-MIT-9E0A5E"></a>
</p>

**lattice-core** is what lattice's packages share and must keep identical. artifactr, reflexr and grantr import none of one another, and relayr bridges artifactr and reflexr; where two of them would otherwise copy the same code, they depend on lattice-core, which imports no lattice package. Each re-exports what it makes public, so an application imports from the package it uses, never from here.

> **Status:** it holds `tag_required`, the JSON Schema helper for tagged unions; `holds_nul`, which finds text PostgreSQL can't store; and, behind extras (the telemetry contract, `lattice_core.otel.contribution`, needs none), the SQL helpers the libraries' storages share, their OpenTelemetry setup, Langfuse's span filters and the LiteLLM model; `logging_left_alone`, which puts the root logger back as the application configured it; and the REST routers' refusal schema ([lattice ADR-0018](https://lattice.alexnodeland.com/adr/0018-lattice-core-what-the-libraries-share/) and [ADR-0021](https://lattice.alexnodeland.com/adr/0021-the-refusal-schema-needs-no-extra/)). Its distribution is `lattice-core-ai`, since the name `lattice-core` on PyPI is an unrelated project, and it is imported as `lattice_core`.

Only infrastructure that is the same in two or more packages belongs here, never a package's domain. See [lattice-core's documentation](https://lattice.alexnodeland.com/lattice-core/).
