Hexagonal Python application scaffold for llmframe.
Project description
llmframe
Python hexagonal application scaffold for the llmframe repository.
Requirements
- Python 3.11+
uvfor environment and dependency management
Setup
Install the project and development dependencies:
uv sync --all-extras
Project layout
The repository follows a hexagonal architecture layout:
src/llmframe/
├── domain/ # Pure business logic and invariants
├── application/ # Use cases and port interfaces
│ └── ports/
└── adapters/ # Input/output adapters at the system boundary
├── input/
└── output/
tests/
├── unit/
└── integration/
LLM adapters
The repository now includes reusable LLM output adapters under llmframe.adapters.output.llm.
Key package areas:
llmframe.adapters.output.llm.llm_adapter- high-level structured JSON and text generation adapterllmframe.adapters.output.llm.openai_adapter- OpenAI client builder, transport, DTOs, and parsing helpersllmframe.adapters.output.llm.usage_tracker- aggregated token/cost tracking utilities
Example imports:
from llmframe.adapters.output.llm import LlmAdapter, OpenAIClientSettings, build_client
from llmframe.adapters.output.llm.usage_tracker import LlmUsageTrackerConfig, OpenAILlmUsageTracker
Quality checks
Run the local quality gate with uv:
uv run ruff format .
uv run ruff check .
uv run mypy .
uv run pytest
Release publishing
GitHub Actions publishes this package to PyPI using the workflow at
.github/workflows/ci_cd.yaml.
- Publishing is triggered by pushes to the
masterbranch or manual workflow dispatch. - The workflow uses Python Semantic Release to determine the next version from conventional commits, create the release commit and tag, and generate changelog updates.
- Package artifacts are built in CI and published to PyPI only.
- If no releasable commits are detected, the publish job is skipped.
- Publishing targets the
llmframeproject onpypi.org.
Before the workflow can publish successfully, configure a trusted publisher in the PyPI project settings for this GitHub repository and workflow file.
Also ensure the workflow has permission to use the repository GITHUB_TOKEN for
creating release commits and tags.
Example release flow:
git commit -m "feat: add new llm transport option"
git push origin master
Notes
- The import package name is
llmframe. - Keep business logic inside
domain/andapplication/. - Keep framework, transport, persistence, and integration concerns in
adapters/.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file llmframe-0.1.0.tar.gz.
File metadata
- Download URL: llmframe-0.1.0.tar.gz
- Upload date:
- Size: 130.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c7bbfb62a8cae70588eae95b7bcf1965a2ef88bed64b4046e004fdac06782491
|
|
| MD5 |
79b384e7939ce3c747584d48091de34d
|
|
| BLAKE2b-256 |
a2c5ec4489d746443d2e5403759c64b808e11c4cfda2ae55d5ba000218852f21
|
Provenance
The following attestation bundles were made for llmframe-0.1.0.tar.gz:
Publisher:
ci_cd.yaml on Nexus-Thread/py-llmframe
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
llmframe-0.1.0.tar.gz -
Subject digest:
c7bbfb62a8cae70588eae95b7bcf1965a2ef88bed64b4046e004fdac06782491 - Sigstore transparency entry: 1219631400
- Sigstore integration time:
-
Permalink:
Nexus-Thread/py-llmframe@fcdfb8ca481a99c2dab5119424cddb80a16e1181 -
Branch / Tag:
refs/heads/master - Owner: https://github.com/Nexus-Thread
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci_cd.yaml@fcdfb8ca481a99c2dab5119424cddb80a16e1181 -
Trigger Event:
push
-
Statement type:
File details
Details for the file llmframe-0.1.0-py3-none-any.whl.
File metadata
- Download URL: llmframe-0.1.0-py3-none-any.whl
- Upload date:
- Size: 26.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d33dcbbd46b7e2e68d6d91d8f9b82a058f2c0348a7f09a74fb213427a0922ec3
|
|
| MD5 |
ac475e975e0ff4a2f135de83d2b9e610
|
|
| BLAKE2b-256 |
354f279da2bb69970ce26c4674426ed17ff35f82f308ccf4b66291d4444ee0ec
|
Provenance
The following attestation bundles were made for llmframe-0.1.0-py3-none-any.whl:
Publisher:
ci_cd.yaml on Nexus-Thread/py-llmframe
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
llmframe-0.1.0-py3-none-any.whl -
Subject digest:
d33dcbbd46b7e2e68d6d91d8f9b82a058f2c0348a7f09a74fb213427a0922ec3 - Sigstore transparency entry: 1219631508
- Sigstore integration time:
-
Permalink:
Nexus-Thread/py-llmframe@fcdfb8ca481a99c2dab5119424cddb80a16e1181 -
Branch / Tag:
refs/heads/master - Owner: https://github.com/Nexus-Thread
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci_cd.yaml@fcdfb8ca481a99c2dab5119424cddb80a16e1181 -
Trigger Event:
push
-
Statement type: