datasdr/shared/: datasdr-dsg-core-client-0.0.1 metadata and description

Simple index Newer version available

Async Python client for DSG Core service

description_content_type text/markdown
requires_dist
  • httpx>=0.24
  • pydantic<3,>=2.0
  • datasdr-base-api-client<1,>=0.2.0
requires_python >=3.11

Because this project isn't in the mirror_whitelist, no releases from root/pypi are included.

File Tox results History
datasdr_dsg_core_client-0.0.1-py3-none-any.whl
Size
13 KB
Type
Python Wheel
Python
3
datasdr_dsg_core_client-0.0.1.tar.gz
Size
11 KB
Type
Source

datasdr-dsg-core-client

Typed async Python client for DSG Core.

Install (local repository)

pip install .

Build

python -m build

This produces wheel and sdist artifacts in dist/.

Usage

from dsg_core_client import DSGCoreClient
from dsg_core_client.schemas import QueryRequest
from uuid import UUID

client = DSGCoreClient(base_url="https://dsg-core.example.org", token="<token>")

tasks = await client.tasks.list_tasks(limit=50)
item_type_id = await client.catalog.map_item_type_id("namespace/collection/item-type")
request = QueryRequest(item_type_id=UUID("00000000-0000-0000-0000-000000000000"))
job = await client.reports.start_report_generation(request)
report_file = await client.reports.download_report(job.job_id)

Notes