Skip to content

type safety #95

@vuthanhtung2412

Description

@vuthanhtung2412

Hi team,
Is there anyway to enforce type safety to the Rest API response ? Below is my use cases

from pyorthanc import Orthanc
from pyorthanc import Modality

client = Orthanc("http://localhost:8042", username="demo", password="demo")

# Create modality connection
modality = Modality(client, "PACS_SERVER")

# Test connection with C-ECHO
if modality.echo():
    print("Successfully connected to PACS")

# Query studies with C-FIND
response = modality.find({"Level": "Study", "Query": {}})

print(response["answers"]) # I want type safety for this part

BTW, is this the most appropriate place to drop this kind of question ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions