docmesh-config
DocMesh 애플리케이션을 위한 환경변수 설정 로딩, 실행 전 진단, runtime plan 메타데이터 라이브러리다. 외부 서비스 client 생성, 연결, 상태 확인 및 runtime 실행은 담당하지 않는다.
설정 정의, 서비스 선택, 요구사항 및 진단은 ConfigurationManifest에서 하나의 선언적 계약으로 관리한다. 기본 제공 설정을 상속한 애플리케이션 전용 설정은 기본 manifest를 변경하지 않고 파생 manifest에 등록할 수 있다.
주요 API
RuntimePlan,Service,HealthcheckPolicy: 선언적 서비스 선택과 startup 정책 메타데이터ConfigurationManifest,ConfigDefinition,ConfigRegistry: 설정 정의·선택·요구사항을 묶는 manifest APIConfigurationEvaluation,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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
54157c77806aabee7b9e5ffe2a47c98a308a703e1aa23361bf202209bca88f3f
|
|
| MD5 |
2c590218bf1f853420439bb1e89e8a45
|
|
| BLAKE2b-256 |
beccb3c90a14b37ace4bbe9483cd812aee5bd66046a0b199953c09d4435de220
|
Provenance
The following attestation bundles were made for docmesh_config-0.2.0.tar.gz:
Publisher:
python-publish.yml on kyundae-kim/docmesh-config
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
docmesh_config-0.2.0.tar.gz -
Subject digest:
54157c77806aabee7b9e5ffe2a47c98a308a703e1aa23361bf202209bca88f3f - Sigstore transparency entry: 2380305779
- Sigstore integration time:
-
Permalink:
kyundae-kim/docmesh-config@9bee0a8626b458fe0695f45138e755d16505dd3c -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/kyundae-kim
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@9bee0a8626b458fe0695f45138e755d16505dd3c -
Trigger Event:
release
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c7e38fac93c75673b92caf0aa1f38bfa3679ba49b5d35bf376827b6418db5415
|
|
| MD5 |
938c9a8ab97b77183c125d353f9816cf
|
|
| BLAKE2b-256 |
f61d11b3a2fbdcb29a8239ddd6cf863e2592172729ee958b8c9bd3ae50fdeeed
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
docmesh_config-0.2.0-py3-none-any.whl -
Subject digest:
c7e38fac93c75673b92caf0aa1f38bfa3679ba49b5d35bf376827b6418db5415 - Sigstore transparency entry: 2380305867
- Sigstore integration time:
-
Permalink:
kyundae-kim/docmesh-config@9bee0a8626b458fe0695f45138e755d16505dd3c -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/kyundae-kim
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@9bee0a8626b458fe0695f45138e755d16505dd3c -
Trigger Event:
release
-
Statement type: