Comments (5)
Hi @jrkerns ,
That's an excellent point, we should be able to change the timeout of a RemoteModality
. I think it would be better if the Orthanc
class had a timeout
parameter, so every call made with the client instance would use the timeout. I actually plan to add all the httpx.Client
parameters in the Orthanc.__init__()
for the next release (hopefully next week). Then, this would work:
orthanc = Orthanc('url', 'username', 'password', timeout=300)
modality = RemoteModality(orthanc, 'mymodality')
# Now all orthanc and modality calls should have the 300 s timeout
For now, this should do the trick since Orthanc
inherited from httpx.Client
:
orthanc = Orthanc('url', 'username', 'password')
orthanc.timeout = 300
modality = RemoteModality(orthanc, 'mymodality')
from pyorthanc.
Hi @Kiechlus,
PR #26 is ongoing, I hope to release the new pyorthanc version this week. In the meantime, this should work
orthanc = Orthanc('url', 'username', 'password')
orthanc.timeout = 300 # Set the timeout
# now use orthanc as you would ordinary
orthanc.get_patients()
...
Thank you for your interest to make pyorthanc better!
from pyorthanc.
Thanks, that's definitely easy. I ended up overriding .post
:
class MyOrthanc(Orthanc):
def post(*args, **kwargs):
return super().post(*args, **kwargs, timeout=300)
but I like your solution more.
from pyorthanc.
I have the same problem, need to set the httpx timout because the default is much too short. Hope this will be released soon. Thanks a lot!
from pyorthanc.
timeout
added in #26
from pyorthanc.
Related Issues (20)
- {Feature request} Ability to edit Orthanc config file HOT 2
- Better documentation HOT 1
- Allow to modify tags directly from Patient/Study/Series/Instance objects HOT 1
- Missing useful attribute in pyorthanc.Study HOT 1
- Question: The behavior of find function HOT 1
- Orthanc unable to connect with username HOT 1
- Patient.__repr__() fails when patient has no PatientID HOT 1
- Processing "large" DICOM datasets - ReadTimeout: timed out error HOT 4
- Raw_response option HOT 3
- import pydicom throwing "TypeError" HOT 2
- `orthanc_sdk` does not always provide autocomplete HOT 1
- Hash DICOM identifiers to Orthanc identifiers HOT 1
- Update the `pyotrthanc.orthanc_sdk` to the new Python Plugin 4.1 HOT 1
- shared-tags in series HOT 2
- Add easier access to parent resources HOT 1
- Series description not accessible from series.description attribute HOT 1
- Change test Dockerfile base image from osimis/orthanc to orthancteam/orthanc HOT 1
- Add `.get_main_tags()` or `.get_main_dicom_tags()` alias for `.get_main_information()` methods HOT 2
- Few resource properties should always query the Orthanc server? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyorthanc.