Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Third Party Python Libs - on PyPI (how to know what is ok to install)
-
Sorry, this is a dumb question. But I don't know the answer to it. Using stash or other ways , is it possible to install Libs from PyPI that should not be used on Pythonista, because they are not pure Python or another reason?
I installed ijson with stash (Pythonista v2.0). all appeared to install ok. And I can import the the lib as per the examples.But I had a lot of crashing with it I know this is not a place to get support for third party Libs. But I think it would be great and helpful if there was a section in the help about installing 3rd party Libs. If there are more trusted sources than others. If there is some rating system somewhere you can look up to find how well the code is written etc. I assume these sources exist, but I expect they are fragment in their locations.
But it would be nice if there was a tool or some indicator that let Pythonista users know if a lib is suitable for use with pythonistia. Even if the tool is run after installing the lib.
I think I incorrectly assumed that if a lib can be imported into a file its working. -
In theory, any pure python packages should be alright to use in Pythonista. From a brief reading, it seems ijson by default uses a pure Python backend, i.e.
import ijson
should work. But all other backends are not usable. Soimport ijson.backends.yajl2_cffi as ijson
won't work.Essentially what stash pip does is to find out the source folder and move it to site-packages. It does not actively check whether a package is pure or not. Though it displays a warning message if
ext_modules
(i.e. requiring C compilation) presents in setup call, it is far from enough. In short, it is possible to install an unusable/non-pure python package with stash pip. -
@ywangd , thanks. Hmmm, yeah, I also read about the backend stuff. It seemed like plug in modules with no dependencies unless you called them. Well, with my limited understanding. I have other ideas why I maybe be crashing, the .json file I am using. But it still should be better behaved than that.
Just so much to learn, gets overwhelming sometimes