changeset 1115:40429876c729

orthanc python module
author Alain Mazy <am@orthanc.team>
date Fri, 22 Nov 2024 15:03:13 +0100 (4 months ago)
parents 3ba00e52b267
children 00e75c824421
files Sphinx/source/plugins/python.rst
diffstat 1 files changed, 12 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/Sphinx/source/plugins/python.rst	Tue Nov 05 13:24:16 2024 +0100
+++ b/Sphinx/source/plugins/python.rst	Fri Nov 22 15:03:13 2024 +0100
@@ -15,6 +15,18 @@
 <https://en.wikipedia.org/wiki/Python_(programming_language)>`__
 instead of the more complex C/C++ programming languages.
 
+The Orthanc plugins interfaces are exposed in an ``orthanc`` module that you 
+should include in your script through ``import orthanc``.  This
+module is only available when the script is running inside Orthanc.
+It is therefore not possible to execute your script outside of Orthanc.
+If you need to develop a complex plugin, it is advised to split it in
+2
+
+* One part that is independent from the ``orthanc`` module that you can develop
+  and test locally.
+* One small part that is using the ``orthanc`` module and that acts as glue-code
+  between Orthanc and your business logic.
+
 Python plugins have access to more features and a more consistent SDK
 than :ref:`Lua scripts <lua>`. The largest part of the Python API is
 automatically generated from the `Orthanc plugin SDK in C
@@ -292,7 +304,6 @@
 with Visual Studio Code and PyCharm.
 
 
-
 Samples
 -------