Mercurial > hg > orthanc-book
comparison Sphinx/source/plugins/python.rst @ 353:0122c668f4ec
python licensing
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Sat, 28 Mar 2020 14:46:03 +0100 |
parents | 6258b2c14e56 |
children | 1ba75bac55fd |
comparison
equal
deleted
inserted
replaced
352:6258b2c14e56 | 353:0122c668f4ec |
---|---|
15 in C | 15 in C |
16 <https://hg.orthanc-server.com/orthanc/file/Orthanc-1.5.7/Plugins/Include/orthanc/OrthancCPlugin.h>`__ | 16 <https://hg.orthanc-server.com/orthanc/file/Orthanc-1.5.7/Plugins/Include/orthanc/OrthancCPlugin.h>`__ |
17 using the `Clang <https://en.wikipedia.org/wiki/Clang>`__ compiler | 17 using the `Clang <https://en.wikipedia.org/wiki/Clang>`__ compiler |
18 front-end. The coverage of the C SDK is about 75% (105 functions are | 18 front-end. The coverage of the C SDK is about 75% (105 functions are |
19 automatically wrapped in Python out of a total of 139 functions in C). | 19 automatically wrapped in Python out of a total of 139 functions in C). |
20 | |
21 Licensing | |
22 --------- | |
23 | |
24 Pay attention to the fact that this plugin is licensed under the terms | |
25 of the `AGPL license | |
26 <https://en.wikipedia.org/wiki/GNU_Affero_General_Public_License>`__. | |
27 | |
28 This has an important consequence: If you distribute Orthanc to | |
29 clients together with one Python script, or if you make an Orthanc | |
30 server equiped with one Python script available on a Web portal, you | |
31 **must** disclose the source code of your Python script to the Orthanc | |
32 community under the terms of the AGPL license. We suggest you to put | |
33 your code on the `dedicated "OrthancContributed" repository on GitHub | |
34 <https://github.com/jodogne/OrthancContributed/tree/master/Plugins>`__. | |
35 | |
36 Check out the :ref:`FAQ about licensing <licensing>` for more context. | |
37 | |
20 | 38 |
21 | 39 |
22 Samples | 40 Samples |
23 ------- | 41 ------- |
24 | 42 |
256 <https://en.wikipedia.org/wiki/CPython>`__ actually) is built on the | 274 <https://en.wikipedia.org/wiki/CPython>`__ actually) is built on the |
257 top of a so-called `Global Interpreter Lock (GIL) | 275 top of a so-called `Global Interpreter Lock (GIL) |
258 <https://en.wikipedia.org/wiki/Global_interpreter_lock>`__. The GIL is | 276 <https://en.wikipedia.org/wiki/Global_interpreter_lock>`__. The GIL is |
259 basically a mutex that protects all the calls to the Python | 277 basically a mutex that protects all the calls to the Python |
260 interpreter. If multiple C++ threads from Orthanc call a Python | 278 interpreter. If multiple C++ threads from Orthanc call a Python |
261 callback, only one can proceed at any given time. | 279 callback, only one can proceed at any given time. Note however that |
280 the GIL only applies to the Python script: The baseline REST API of | |
281 Orthanc is not affected by the GIL. | |
262 | 282 |
263 .. highlight:: python | 283 .. highlight:: python |
264 | 284 |
265 The solution is to use the `multiprocessing primitives | 285 The solution is to use the `multiprocessing primitives |
266 <https://docs.python.org/3/library/multiprocessing.html>`__ of Python. | 286 <https://docs.python.org/3/library/multiprocessing.html>`__ of Python. |