선적 서류 비치

Python table helpers

Read governed tenant tables with validated identifiers and parameterized filters.

베타 업데이트됨 2026-06-11 원시 마크다운
문서 내용은 현재 영어로 게시되어 있습니다. 번역이 준비되는 동안 한국어 문서 경로를 탐색할 수 있습니다.
문서 트리

The Python table helpers cover common read paths without hand-writing every select and count.

Read rows

from relpin_sdk import RelpinDb, fetch_table_rows

async def list_open_orders() -> dict[str, object]:
    with RelpinDb() as db:
        rows = await fetch_table_rows(
            db,
            "orders",
            columns=["id", "name", "status"],
            where={"status": "open"},
            order_by=[("created_at", "desc"), "id"],
            limit=50,
        )
    return {"orders": rows}

Count rows

from relpin_sdk import count_table_rows

total = await count_table_rows(db, "orders", where={"status": "open"})

Safety rules

Identifiers are validated and quoted. Values travel as bind parameters. Invalid identifiers, order directions, or negative paging fail before a query runs.

Use raw SQL on the same governed transport when you need joins, aggregates, or a shape the helpers do not cover.