Skip to main content

docmesh-config

DocMesh 애플리케이션을 위한 환경변수 설정 로딩, 실행 전 진단, runtime plan 메타데이터 라이브러리다. 외부 서비스 client 생성, 연결, 상태 확인 및 runtime 실행은 담당하지 않는다.

설정 정의, 서비스 선택, 요구사항 및 진단은 ConfigurationManifest에서 하나의 선언적 계약으로 관리한다. 기본 제공 설정을 상속한 애플리케이션 전용 설정은 기본 manifest를 변경하지 않고 파생 manifest에 등록할 수 있다.

주요 API

  • RuntimePlan, Service, HealthcheckPolicy: 선언적 서비스 선택과 startup 정책 메타데이터
  • ConfigurationManifest, ConfigDefinition, ConfigRegistry: 설정 정의·선택·요구사항을 묶는 manifest API
  • ConfigurationEvaluation, EnvironmentSnapshot: 한 환경에 대한 typed 설정과 secret-safe 평가 결과
  • LoadedConfigurations: manifest 평가에서 로딩된 설정에 대한 이름 기반 typed 접근
  • build_runtime_plan_metadata(): plan과 환경 진단을 결합한 secret-safe 메타데이터 생성
  • diagnose_services(): 설정 상태, 필수·대안 조합 및 production 보안 위험 진단
  • ConfigError, ConfigIssue, EnvironmentDiagnosis: 구조화된 secret-safe 오류와 진단 결과
from docmesh_config import RuntimePlan, Service, diagnose_services

plan = RuntimePlan(
    services=(Service.POSTGRES.required(), Service.SQLITE.optional()),
    one_of=((Service.POSTGRES, Service.SQLITE),),
)
diagnosis = diagnose_services(plan=plan)

if not diagnosis.ok:
    for issue in diagnosis.issues:
        print(issue.env_key, issue.reason, issue.remediation)

확장 설정은 애플리케이션 소유의 파생 manifest에 등록한다.

from docmesh_config import (
    ConfigDefinition,
    ConfigurationManifest,
    KeycloakConfig,
)


class AppKeycloakConfig(KeycloakConfig):
    admin_api_url: str


manifest = (
    ConfigurationManifest.standard().extend(
        ConfigDefinition(
            name="app_keycloak",
            settings_type=AppKeycloakConfig,
            env_prefix="APP_KEYCLOAK_",
        )
    )
    .select("app_keycloak")
    .require("app_keycloak")
)
evaluation = manifest.evaluate()
config = evaluation.configs.require("app_keycloak", AppKeycloakConfig)

manifest.evaluate()는 외부 연결 없이 설정 로딩, 진단 및 요구사항 충족 여부를 한 번에 계산한다. diagnose_services()build_runtime_plan_metadata()는 이 manifest 코어를 사용하는 편의 함수다.

개발

pytest

제품 요구사항은 docs/prd.md, 소프트웨어 요구사항은 docs/srs.md를 참고한다.

Download files

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

Source Distribution

docmesh_config-0.2.0.tar.gz (19.9 kB view details)

Uploaded Source

Built Distribution

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

docmesh_config-0.2.0-py3-none-any.whl (22.9 kB view details)

Uploaded Python 3

File details

Details for the file docmesh_config-0.2.0.tar.gz.

File metadata

  • Download URL: docmesh_config-0.2.0.tar.gz
  • Upload date:
  • Size: 19.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for docmesh_config-0.2.0.tar.gz
Algorithm Hash digest
SHA256 54157c77806aabee7b9e5ffe2a47c98a308a703e1aa23361bf202209bca88f3f
MD5 2c590218bf1f853420439bb1e89e8a45
BLAKE2b-256 beccb3c90a14b37ace4bbe9483cd812aee5bd66046a0b199953c09d4435de220

See more details on using hashes here.

Provenance

The following attestation bundles were made for docmesh_config-0.2.0.tar.gz:

Publisher: python-publish.yml on kyundae-kim/docmesh-config

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file docmesh_config-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: docmesh_config-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 22.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for docmesh_config-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c7e38fac93c75673b92caf0aa1f38bfa3679ba49b5d35bf376827b6418db5415
MD5 938c9a8ab97b77183c125d353f9816cf
BLAKE2b-256 f61d11b3a2fbdcb29a8239ddd6cf863e2592172729ee958b8c9bd3ae50fdeeed

See more details on using hashes here.

Provenance

The following attestation bundles were made for docmesh_config-0.2.0-py3-none-any.whl:

Publisher: python-publish.yml on kyundae-kim/docmesh-config

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.2.0 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