Packaging uwsgi flask app for non-programmers?

Israel Brewster israel at ravnalaska.net
Wed Feb 7 12:08:44 EST 2018


On Feb 6, 2018, at 12:12 PM, Israel Brewster <israel at ravnalaska.net> wrote:
> 
> I have been working on writing an Alexa skill which, as part of it, requires a local web server on the end users machine - the Alexa skill sends commands to this server, which runs them on the local machine. I wrote this local server in Flask, and run it using uwsgi, using a command like: "uwsgi serverconfig.ini".
> 
> The problem is that in order for this to work, the end user must:
> 
> 1) Install python 3.6 (or thereabouts)
> 2) Install a number of python modules, and
> 3) run a command line (from the appropriate directory)
> 
> Not terribly difficult, but when I think of my target audience (Alexa users), I could easily see even these steps being "too complicated". I was looking at pyinstaller to create a simple double-click application, but it appears that pyinstaller needs a python script as the "base" for the application, whereas my "base" is uwsgi. Also, I do need to leave a config file accessible for the end user to be able to edit. Is there a way to use pyinstaller in this scenario, or perhaps some other option that might work better to package things up?

A related question, should a way to create a full package not be available, would be Is there a way to do a "local" (as in, in the same directory) install of Python3.6, and to do it in such a way as I could script it from the shell (or python, whatever)? The idea would then be to basically set up a fully self-contained virtualenv on the users machine, such that they just have to run a "setup.sh" script or the like.

BTW, this would be on a Mac - my local skill server works using AppleScript, so it's not actually portable to other OS's :-P

> 
> -----------------------------------------------
> Israel Brewster
> Systems Analyst II
> Ravn Alaska
> 5245 Airport Industrial Rd
> Fairbanks, AK 99709
> (907) 450-7293
> -----------------------------------------------
> 
> 
> 
> 
> -- 
> https://mail.python.org/mailman/listinfo/python-list




More information about the Python-list mailing list