datasdr/shared/: datasdr-dsg-core-client-0.1.12 metadata and description
Async Python client for DSG Core service
| description_content_type | text/markdown |
| metadata_version | 2.4 |
| requires_dist |
|
| 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.1.12-py3-none-any.whl
|
|
|
datasdr_dsg_core_client-0.1.12.tar.gz
|
|
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
- The client facade exposes subclients:
tasks,queries,events,catalog,metadata,commands,reports. - Item type mapping cache is available via
client.item_type_cache.