I'm very comfortable with Swift, Obj-C, and Javascript but for a new project I need to use a library that is only available in Python. How do I integrate python or python scripts into an OSX project?

There is the option of going PyObjc or pyapp to build the entire application but that seems extravagant given that I only need Python for a small portion of that program.

It seems the preferable route would be to push Python to the cloud. Is there a pre bundled solution for doing this or would it require me to set up my own environment?


2 Answers 2


If the amount of data that needs to be passed is small, then for an OS X application, one can run some Python code via a system() shell command from Swift or Objective C code.

For iOS, unless you want to build a Python interpreter into your app, it may be best to push running the Python library and scripts to a server "in the cloud".

  • That's exactly what I was thinking. I'm just not sure the tool kit to do that. I often write cloud code in js, just not Python. Any stack suggestions? Jun 12, 2016 at 15:39

For ways to embed Python code, see:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.