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.
Hug on pypy, can be used with Pythonista ?
Guys, I can't quite figure out if hug can be used in Pythonista or not. I have tried installing it with pip but I think it stops when it's trying to install a cms line app. It says also that it uses falcon from pypy, it's not clear to me if both are pure python Libs or not. Falcon says it supports CPython, but I assume that does not mean it's not a prure Python Lib it's self. Well, I am not sure really.
Anyway, just interested to play with it in Pythonista, just seems very interesting.
ccc last edited by
Pythonista is clearly CPython and does not have support for either Cython or Pypy. Both packages look to be fairly pure Python so this might work. The Falcon setup.py file try's to figure out the environment and do the right thing between the three. Perhaps that logic is getting messed up on Pythonista.
Given, that, I would think that the right approach is to install Falcon first and make sure that is working before progressing with hug.
You might open up an iOS support request issue on the falcon repo or on the hug reop. Their knowledge of their code will accelerate your efforts.
@ccc , thanks. I will try harder to get it working. I just didn't want to waste time if there was something glaring that I could not see that made it clear it was not going to be possible. Not sure what you think but looks pretty nice and easy way to make a web data provider/service rather than using flask or bottle. The versioning is a nice touch
dgelessus last edited by
Cython is a Python-like language with some C elements mixed in, it allows writing extension modules with Python-like syntax. It's certainly not something you can use on Pythonista.
PyPy is technically pure Python, but its main feature is the JIT compilation, which is of course not usable in Pythonista (or on iOS in general).
As far as I can tell, neither of the two are required by hug or Falcon though. Falcon's setup.py has some special cases for Jython and PyPy, and also has parts optionally implemented in Cython for performance. None of those are necessary though, you should be able to use the module as-is. Maybe I'm missing something though.
Thanks guys. I tried installing falcon, let's say it sort of worked. Sometimes with these types of projects it's hard to know if it's in real working shape or not. I could import falcon into a file though. But the test code I tried to run seemed to have problems. Hmmm, more than likely just me. I did as @ccc suggested and opened up an iOS support request item on Github. Hmmm, embarrassing as it was written in my true amateur style ;) hopefully it was enough for them to understand what the hell I was asking for. Fingers crossed, but thanks for your help. Will write back here if I get a solution
If you are interested in this lib, you may want to give my request some back up technical info. I am not sure I will be taken seriously. The request is here in the hug repo