librelist archives

« back to archive

Command line arguments

Command line arguments

From:
Philip Goh
Date:
2013-05-24 @ 10:38
Hello list,

I'm currently passing a flags via command line to my Flask app. This works
fine when I'm running the app using the built in web server. Is there a way
of passing command line parameter to my app when running in a WSGI
container? I'd like to avoid loading the configuration from a file if
possible. I'm using uwsgi if that matters.

Thanks,
Philip

Re: [flask] Command line arguments

From:
Date:
2013-05-24 @ 10:54
Use '--env' option in uwsgi params and 'sys.environ' in application?

Kirill Klenov
web developer
______________________________________________________________________
horneds@gmail.com | http://klen.github.io
mobile: +7 906 7723620

On 24.05.2013, at 18:38, Philip Goh <philip.wj.goh@gmail.com> wrote:

> Hello list,
> 
> I'm currently passing a flags via command line to my Flask app. This 
works fine when I'm running the app using the built in web server. Is 
there a way of passing command line parameter to my app when running in a 
WSGI container? I'd like to avoid loading the configuration from a file if
possible. I'm using uwsgi if that matters.
> 
> Thanks, 
> Philip
>