Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

rb_schemas 사용 설명서

rb_schemas는 프로젝트 공통 Pydantic 스키마와 Flow Manager 연동 타입을 제공하는 패키지입니다.

1. 제공 구성

  • 기본 스키마 (base.py)
    • Response_ReturnValuePD
    • NJointfPD, NInputfPD, Vec3fPD 등 공용 모델
  • Flow Manager 연계 타입 (sdk.py)
    • FlowManagerArgs
  • 스키마 유틸 (utility.py)
    • Pick(base, *include)
    • Omit(base, *omit)
  • FBS 기반 자동 생성 모델
    • rb_schemas.fbs_models.*
    • 클래스명은 ...PD 접미사 규칙

2. FlowManagerArgs 용도

FlowManagerArgs는 SDK 함수에서 Flow Manager 실행 컨텍스트를 받을 때 사용합니다.

from rb_schemas.sdk import FlowManagerArgs

def my_step_handler(flow_manager_args: FlowManagerArgs | None = None):
    # step 로직 수행
    if flow_manager_args is not None:
        flow_manager_args.done()

3. Pick/Omit 사용 예제

from pydantic import BaseModel
from rb_schemas.utility import Omit, Pick

class UserPD(BaseModel):
    user_id: str
    email: str
    password: str

UserPublicPD = Omit(UserPD, "password")
UserOnlyIdPD = Pick(UserPD, "user_id")

4. FBS 모델 사용 예제

# 예: 자동 생성된 모델 import
from rb_schemas.fbs_models.nexus.v1.deploy_models import Response_Deploy_ProgressPD

payload = Response_Deploy_ProgressPD(
    sw_name="example",
    ip="127.0.0.1",
    mode="dev",
    tag="v1",
    percentage=80,
    service_name="manipulate",
    result="success",
)

5. 참고

  • FBS 기반 모델은 backend.flatc 실행 시 자동 재생성됩니다.
  • 생성 모델은 snake_case 필드와 alias(원본 CamelCase)를 함께 가질 수 있습니다.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rainbow_rb_schemas-0.0.73.dev4.tar.gz (49.1 kB view details)

Uploaded Source

Built Distribution

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

rainbow_rb_schemas-0.0.73.dev4-py3-none-any.whl (85.7 kB view details)

Uploaded Python 3

File details

Details for the file rainbow_rb_schemas-0.0.73.dev4.tar.gz.

File metadata

  • Download URL: rainbow_rb_schemas-0.0.73.dev4.tar.gz
  • Upload date:
  • Size: 49.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.5

File hashes

Hashes for rainbow_rb_schemas-0.0.73.dev4.tar.gz
Algorithm Hash digest
SHA256 001ef0a3c42b69be396b445a3f3cb54d9afa77da76ae7a688646f6a4d7d24d9b
MD5 ee3dcdcc5874345592dcfe14539ed39d
BLAKE2b-256 f7af59d5e87e1471af29265d5decc3e3c7c3a0086178209032c94e879b4b7dc8

See more details on using hashes here.

File details

Details for the file rainbow_rb_schemas-0.0.73.dev4-py3-none-any.whl.

File metadata

File hashes

Hashes for rainbow_rb_schemas-0.0.73.dev4-py3-none-any.whl
Algorithm Hash digest
SHA256 47f7723b9a22be2dd0420dcfffff25782e8f385014ce953cc74067f1a0c52229
MD5 3f1e3f2a08be8cd5f3efd5d886f79953
BLAKE2b-256 6ae63f1a7c04a38da21d56514cc3a98962a2c443113baeced41ae0bc3f6ad3a1

See more details on using hashes here.

Release history Release notifications | RSS feed

0.1.1

2 files

0.1.0

2 files

0.0.79

2 files

0.0.78

2 files

0.0.77

2 files

0.0.76

2 files

0.0.75

2 files

0.0.74

2 files

0.0.73

2 files

This release

0.0.73.dev4 This release

2 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