Skip to main content

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

Project description

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.

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

framesdkpy-0.3.0.tar.gz (78.2 kB view details)

Uploaded Source

Built Distribution

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

framesdkpy-0.3.0-py3-none-any.whl (37.5 kB view details)

Uploaded Python 3

File details

Details for the file framesdkpy-0.3.0.tar.gz.

File metadata

  • Download URL: framesdkpy-0.3.0.tar.gz
  • Upload date:
  • Size: 78.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.4

File hashes

Hashes for framesdkpy-0.3.0.tar.gz
Algorithm Hash digest
SHA256 5205788e976eb0b4432e80493a93f6c2a7c9c6f6d520a608b010ac84881a2a42
MD5 306b83e51e52da4ccf13bec3f1996007
BLAKE2b-256 40fd09802f77836557f15c1f6aa69e8f861e158c3f81cb56a3425254a7a91c89

See more details on using hashes here.

File details

Details for the file framesdkpy-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: framesdkpy-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 37.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.4

File hashes

Hashes for framesdkpy-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 47d0ccf5748b2189ab58094098f34b43330418b2fb675e9782060e36611dcabd
MD5 04dd54b48693119e2ee7de04d927487c
BLAKE2b-256 9948adbfa623618fdf9c2bf9be9a2771c100a0859daf8b119d0607657b3b5eaa

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