Skip to main content

FrameSDK

The Python SDK for FRAME -- a typed project-context architecture for AI-assisted development.

When you switch coding agents, the project forgets itself. Not its code -- the code is fine. But the understanding. The rules you agreed on. The decisions you made and why. The checks that matter. Things previous agents touched or broke.

FRAME gives the project a typed shape that agents and tools read consistently. framesdkpy is how Python tools read that shape.

What it does

Takes a .haxaml/ directory with 5 YAML files and returns a typed FRAME object:

from framesdkpy import load_frame

frame = load_frame(".haxaml/")
frame.facts.profile.name          # "Pharmax"
frame.rules.governance_level      # "strict"
frame.map.entrypoints[0].path     # "Backend/main.py"
frame.expect.checks["backend_tests"].pass_condition  # "exit_code == 0"

Every downstream tool -- Haxaml, a CLI, a CI pipeline -- gets the same shaped answer. Cross-language SDKs return the same JSON shape.

Install

uv add framesdkpy
# or
pip install framesdkpy

Requires Python 3.11+. Three dependencies: PyYAML, jsonschema, referencing. That's it. No Pydantic, no heavy framework.

What's in the box

  • loaders -- load_frame() builds a typed FRAME from 5 YAML files. Strict single-directory discovery. Schema and character limit validation at load time.
  • models -- 27 typed dataclasses across 7 files. One import: from framesdkpy.models import FRAME.
  • validators -- Schema, character limits, cross-file consistency. Callable independently or through the loader.
  • translators -- YAML to JSON with full normalization. Handles yes/True, ~/None, on/off rejection.

Usage patterns

from framesdkpy import load_frame, translate_directory, validate_file

# Full pipeline -- load all 5 files, validate, assemble
frame = load_frame(".haxaml/")

# Translate YAML to clean dict (normalized, but no validation)
data = translate_directory(".haxaml/")

# Validate a single file without loading the full model
result = validate_file(".haxaml/facts.yaml")
print(result.summary())  # "valid" or "2 error(s), 1 warning(s)"

# Serialize for cross-language use
json_string = frame.to_json()

How it's built

Spec-first. Every module has a design doc (docs/models.md, docs/loaders.md, etc.) with locked decisions before any code was written. 106 tests cover construction, serialization, YAML normalization, schema enforcement, character limits, cross-file checks, and integration against a real Pharmax fixture.

No graph building, no cross-referencing, no governance. That's Haxaml's job. framesdkpy is pure ingestion -- load, validate, assemble, return.

Metadata

Release files for framesdkpy 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for framesdkpy 0.3.0
File Size Uploaded
framesdkpy-0.3.0.tar.gz 78.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for framesdkpy 0.3.0
File Interpreter ABI Platform
framesdkpy-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 115.8 kB

Release files / framesdkpy-0.3.0.tar.gz

Download URL framesdkpy-0.3.0.tar.gz
Size 78.2 kB
Tags Source
SHA-256 checksum
How to use checksums
5205788e976eb0b4432e80493a93f6c2a7c9c6f6d520a608b010ac84881a2a42
BLAKE2b-256 checksum
How to use checksums
40fd09802f77836557f15c1f6aa69e8f861e158c3f81cb56a3425254a7a91c89
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.4

Release files / framesdkpy-0.3.0-py3-none-any.whl

Download URL framesdkpy-0.3.0-py3-none-any.whl
Size 37.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
47d0ccf5748b2189ab58094098f34b43330418b2fb675e9782060e36611dcabd
BLAKE2b-256 checksum
How to use checksums
9948adbfa623618fdf9c2bf9be9a2771c100a0859daf8b119d0607657b3b5eaa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.4

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page