diff Sphinx/source/plugins/python.rst @ 852:450f0efebe4f

FilterIncomingCStoreInstance python sample
author Alain Mazy <am@osimis.io>
date Mon, 30 May 2022 17:16:15 +0200
parents c29ac12e3160
children 3e8a3a900e9e
line wrap: on
line diff
--- a/Sphinx/source/plugins/python.rst	Mon May 30 11:07:58 2022 +0200
+++ b/Sphinx/source/plugins/python.rst	Mon May 30 17:16:15 2022 +0200
@@ -784,6 +784,19 @@
                     :language: python
 
 
+Filtering incoming C-Store instances (new in 4.0)
+.................................................
+
+Starting with release 4.0 of the Python plugin, it is possible to
+filter instances received from C-Store and return a specific error
+code to the sending modality.
+
+This can be used, e.g, to implement a quota per modality or return 
+an ``out-of-resources`` status if the Orthanc storage is almost full.
+
+.. literalinclude:: python/incoming-cstore-filter.py
+                    :language: python
+
 
 Performance and concurrency
 ---------------------------