Show HN: PyApp – runtime installer for Python applications

  • Are there any examples of PyApp using libraries that wrap other languages (Numpy, SpaCy, etc.)? In my experience, it has been extremely difficult to ship data/ml heavy applications built with Python as a binary.

  • This looks really awesome! I'll try it out on some of my projects that I never tried to share outside of the Python community because setting up Python and/or pipx always felt too much of a hassle for end users.

    Leave it to ofek to tackle one of the toughest problems in Python!

  • This looks really useful. I would love to see some more end-to-end examples though it's nice to see the animated one right away in the readme.

  • I don't fully understand the example in the GIF:

    - Why is it using Cargo if this is a Python tool?

    - How does it know that it should install "cowsay"? Is the only reference to cowsay that "export PYAPP_PROJECT_NAME=cowsay" line?

  • will go on my "to try" list where i already have cosmopolitan [2]. my last setup (windows) was shiv + wine + nsis (used that as pyinstaller had some issues)[2]

    [1] https://github.com/jart/cosmopolitan/issues/141#issuecomment... [2] https://github.com/delijati/docker-shiv#add-python-interpret...

  • This is really cool but I think the documentation could use a simple quickstart example, that takes actual Python code and shows how to turn it into an executable. Right now it feels a bit like reading a manpage, with tons of features and options but no clear way to get started.

    Definitely going to keep an eye on this, though. My company has been using pyInstaller to distribute Python tools and it's a bit of a PITA, so any alternative is welcome.

  • How does this compare to shiv? https://github.com/linkedin/shiv

  • Hi! It seems great!

    If I understood it well, does this allow to create an executable file for python file that, even if built on windows, can run on mac, linux, whatever.... right?

    in this way i can share my python code as an exe file that "not expert" can simply use by executing them on their machine, even if they don't have python installed... right?

    I'm wondering if this can work inside a docker container: at the moment I develop every project inside a docker container, each with its requirements.txt. file.

    Can I run this "pyapp" inside the docker (so Linux env) to create the exe file?

    Have I understood it well?

    Thanks very much!

  • Thanks, I look forward to this!

    For some possibly useful documentation feedback: I got confused.

    Normally I would install a tool, check out its `--help` content, then maybe try it out. I think based on my attempts to do this and read the docs, is that this is not currently possible for PyApp. Instead you must have a Python app you'd like to setup for compilation before you can install PyApp at all (at least when using the cargo installation method). Is that right? And then when installing the tool it will also go ahead and compile the currently configured Python package?

  • Looks promising—thanks for sharing! Is it possible to include non-Python binaries somehow? Similar to how it is done with PyInstaller with the --add-binary argument?

    P.S.: It has already been mentioned, but I also find the "cowsay" example more confusing than informative. "cowsay" isn't even written in Python, but in Perl, isn't it? Maybe a simple hello-world.py example would work better :)

  • Hopefully it’s a bit faster than ptinstallers first run experience. That was the main reason I didn’t use it.

  • This looks great, do I understand correctly that the full isolation option allows the binary to be fully self-contained and does not require any connectivity for the app to run?

    That would solve a big problem in air-gapped environments :-)

  • How does it differentiate from PyInstaller?