선적 서류 비치

Python SDK overview

Use the governed Python SDK in Relpin FastAPI apps.

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

The Python SDK supports governed FastAPI apps in Relpin. It gives the app database access through a platform-controlled transport and exposes the preview readiness signal.

Install surface

Relpin templates include the SDK. In generated apps, import from relpin_sdk.

from relpin_sdk import RelpinDb, RelpinReadinessMiddleware

Database access

RelpinDb sends queries over the governed runtime transport. In preview, that transport points at the sidecar. In published Workers, the generated shim uses the runtime DB service binding.

The app does not read DATABASE_URL.

Readiness

FastAPI apps should add RelpinReadinessMiddleware. The preview sidecar uses /__relpin/ready to know when the app imported and can serve the current revision.