This library implements a client for the REST API of the virtualskeleton framework which is used by the Sicasl Medical Image Repository (www.smir.ch). It supports authentication, general queries, and specific requests such as image upload/download, object linking and right management. Examples are provided in the examples directory. Please use 'demo.smir.ch' for testing purposes.
-http://sicasfoundation.github.io/vsdConnect/
git clone https://github.com/SICASFoundation/vsdConnect
pip install vsdConnect
or
python setup.py install
or, if you want to edit the source:
pip install --editable vsdConnect
This code connects to the demo server and retrieves an object
from vsdConnect import connect
from vsdConnect import models
## Connect to demo.smir.ch
api = connect.VSDConnecter()
# an available object id from the demo and define the selfurl
vsd_id = 38
selfUrl = 'https://demo.smir.ch/api/objects/{0}' . format(vsd_id)
# create the APIObject and get it from the server
obj = models.APIObject(selfUrl=selfUrl).get(api)
# display the object infos (json)
print(obj.show())
to download the object's file add this line
obj.download(api)