Is their anyway to access the orthanc python package from pycharm intellisense ?
When I write a script in pycharm, it does not recognise import orthanc command and hence is not suggesting the available methods, variables etc
Have tried searching for the package in pypi index, but nothing shows up their.
I have tested the sample scripts in orthanc book and they work fine, so ofc my system has the package installed, but how do i import it in my pycharm project ?
The “orthanc” module is a module that actually only exists when your code runs inside Orthanc (it contains a set of methods that are wrapped into C++ methods from the python plugin). It does not exist on your computer.
To my knowledge, it is not possible to have intellisense for it in PyCharm or any other IDE. If you find a solution, please let us know, I would appreciate it as well
We can create a python type stub file (https://mypy.readthedocs.io/en/stable/stubs.html) that includes all the information required for PyCharm/MyPy/VSCode and other tools to provide autocompletion, linting and type checking.