pysof

SkillDatabases & data

Work on pysof Python bindings for SQL-on-FHIR. Use for PyO3, maturin, Python package setup, pysof tests, Python APIs, PyPI publishing concerns, and any files under crates/pysof.

Use pysof in Claude, ChatGPT or Ahel Desktop

Free. Sign in, add pysof and connect your AI. About a minute.

Also: Claude Code · Cursor · Codex

Then ask your AI: use the pysof skill

Details

Instructions available. Your AI can read the instructions. Execution depends on the setup they require.

Add Ahel to your AI once: Claude, ChatGPT, Cursor, Claude Code or Codex. Then ask it to use this.

What this skill tells your AI

The instructions your AI receives, as published by heliossoftware/hfs in .agents/skills/work-with-pysof/SKILL.md and read by Ahel’s review.

Use this when working in crates/pysof or changing Python bindings for SQL-on-FHIR.

pysof is excluded from default workspace builds. Root cargo build does not build it.

Installation

pip install pysof

Development Setup

cd crates/pysof
uv venv --python 3.11
uv sync --group dev
uv run maturin develop --release

# Verify
uv run python -c "import pysof; print(pysof.get_version()); print(pysof.get_supported_fhir_versions())"

Testing

cd crates/pysof
uv run pytest python-tests/ -v
cargo test

The Python suite has historically had 58 tests, and the Rust pysof suite has historically had 17 tests. Recheck counts from the current tree instead of relying on those numbers when reporting results.

Key API

import pysof

# Basic transformation
result = pysof.run_view_definition(view_definition, bundle, "csv")

# With options
result = pysof.run_view_definition_with_options(view, bundle, "json", limit=10, fhir_version="R4")

# Streaming large NDJSON files
for chunk in pysof.ChunkedProcessor(view, "patients.ndjson", chunk_size=500):
    process(chunk["rows"])

# File-to-file, most memory efficient
stats = pysof.process_ndjson_to_file(view, "input.ndjson", "output.csv", "csv")

Signals

GitHub stars
53
Forks
21
Last commit
Oct 2026

Ahel review

  • K1binfo
    installs-packages

Automated review, not a security audit. Ruleset v1+k2.

Advanced
Item type
skill
Key
work-with-pysof
Source
github.com/heliossoftware/hfs