跳转到正文

secrets API ​

完整接口目录 · 配置与密钥用法 · 工具包下载

模块说明 ​

text
Private installation secret references; trusted plugins are not a sandbox.

SecretError ​

python
class SecretError(ValueError)

SDK 说明:

text
Intentionally contains no secret value or filesystem details.

另继承外部类型 ValueError;其通用方法不在本 SDK 目录中重复展开。

Secrets ​

python
class Secrets

Secrets.__init__ ​

python
def __init__(self, data_dir: Path)

Secrets.get ​

python
def get(self, reference: str) -> str

SDK 说明:

text
Read a UTF-8 secret on demand. Never log the returned value.

Rotations affect subsequent reads; callers caching credentials must reload.
The private directory is not isolation from other code under the same UID.

Neomega · 使用、开发与参考文档