dgc-sdk
Python facade over a managed dgc serve process. Protocol v14 / CLI 0.41.5. Frozen 0.5.2.
python3 -m pip install dgc-sdk
That installs this package (import dgc_sdk). It is not PyPI dgc (an unrelated clustering library). Until the index has this release, use the GitHub wheel:
python3 -m pip install \
"https://github.com/OpenPeach-ai/dgc/releases/download/sdk-v0.5.2/dgc_sdk-0.5.2-py3-none-any.whl"
from pathlib import Path
from dgc_sdk import DGC, QuestionAnswer, define_tool
with DGC(state_dir=Path("/tmp/dgc-sdk-state"), model="demo-model",
base_url="http://127.0.0.1:11434/v1") as dgc:
session = dgc.session(
cwd=".",
permissions={"mode": "default", "unhandled": "deny"},
on_permission=lambda req: "deny",
on_question=lambda req: {req.questions[0].id: QuestionAnswer(selected=(0,))}
if req.questions else "dismiss",
)
result = session.run("Summarize this repository. Do not edit files.")
print(result.status, result.final_text)
session.close()
restored = dgc.resume(latest=True, cwd=".", permissions={"mode": "default", "unhandled": "deny"})
print(restored.session_id, restored.history().get("items") and "history ok")
From a clone: pip install -e sdk/python. The wheel still needs a DGC runtime (python -m dgc serve, CLI 0.41.5). Set inherit_user_state=False in production.
Metadata
Release files for dgc-sdk 0.5.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| dgc_sdk-0.5.2.tar.gz | 51.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dgc_sdk-0.5.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 108.9 kB
Release files / dgc_sdk-0.5.2.tar.gz
| Download URL | dgc_sdk-0.5.2.tar.gz |
|---|---|
| Size | 51.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e3a97e793f6ca31514d0e6ced51e29813dc185cdf7abc52964efc690da3c05f7
|
|
BLAKE2b-256 checksum How to use checksums |
c04931da6fec8699f3e7d181b6f702520cc7952a0f5ca5c57c5648024ff31fc8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 18, 2026.
Transparency logRelease files / dgc_sdk-0.5.2-py3-none-any.whl
| Download URL | dgc_sdk-0.5.2-py3-none-any.whl |
|---|---|
| Size | 57.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
07abcbbf934d574e70af7e817e08179ad0cbc9d1429d59b7457d5d2d30770daa
|
|
BLAKE2b-256 checksum How to use checksums |
bd40d8668c50f19ccebae3009cc4c2b5dfeadd35fabc6785e1cfb5cfb8eef017
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 18, 2026.
Transparency log