Skip to main content

UNKNOWN

Project description

A backgrounding front-end over cherrypy (and potentially other web servers).

Examples

Run a server in the foreground after importing mywebapp.app as the application instance:

wsgid --application mywebapp.app --foreground

Run a server in the foreground after importing and calling mywebapp.create_app as the application factory:

wsgid --application_factory mywebapp.create_app -f

Run a daemonized server using the pidfile mypid.pid after importing and calling mywebapp.create_app as the application factory:

wsgid --application_factory mywebapp.create_app --pidfile mypid.pid

Stop a daemonized server using the pidfile mypid.pid:

wsgid --pidfile mypid.pid --stop

All these options have short versions, and can override defaults in config files or the environment.

Using config files

Ini-style config files can be used to provide any of the options available. For example, myserver.ini:

[ config ]

pidfile = mypid.pid
application_factory = mywebapp.crate_app

And then:

wsgid -c myserver.ini

Is equivalent to the above examples. Note that the actual section titles in the config file are ignored, and the file is essentially flattened.

Using the environment

Additionally any config variable can be overriden using the environment variables. The variable name is uppercased, and prefixed with ‘WSGID’ to avoid collisions with other apps for common names. For example:

export WSGID_PIDFILE=mypid.pid

Is equivalent to passing the –pidfile on the command line.

Complete options

Usage: wsgid [options]

Options:
-h, --help

show this help message and exit

-c CONFIG_FILE, --config_file=CONFIG_FILE

The configuration file

-p PIDFILE, --pidfile=PIDFILE

The PID file

-f, --foreground

Run the server in the foreground

-s, --stop

Stop the server.

-a APPLICATION, --application=APPLICATION

The WSGI Applciation instance to import

-A APPLICATION_FACTORY, --application_factory=APPLICATION_FACTORY

The WSGI Applciation factory to import

-d, --debug

Run in debug mode.

-P PORT, --port=PORT

The port to listen on.

-H HOST, --host=HOST

The host to listen on.

-L LOGDIR, --logdir=LOGDIR

The directory for logs.

-R STDREDIRECT, --stdredirect=STDREDIRECT

The file to redirect stdio to.

-w WORKDIR, --workdir=WORKDIR

The working directory for the daemon.

-U UMASK, --umask=UMASK

The umask for the spawned child.

-n SERVERNAME, --servername=SERVERNAME

The server name

Developer Information

Repository/tracker/wiki/etc at:

http://bitbucket.org/aafshar/wsgid-main/

Latest tip package:

http://bitbucket.org/aafshar/wsgid-main/get/tip.zip#egg=wsgid-dev

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wsgid-0.2.tar.gz (27.7 kB view details)

Uploaded Source

File details

Details for the file wsgid-0.2.tar.gz.

File metadata

  • Download URL: wsgid-0.2.tar.gz
  • Upload date:
  • Size: 27.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for wsgid-0.2.tar.gz
Algorithm Hash digest
SHA256 7d7ec386d57af044d1152ded2d42a1bc6307e1281f5450168068d4e4a1ae618c
MD5 ef8bce3bd87ef8e9ca97201910602aee
BLAKE2b-256 bb1ae2be832ba88649c371a0dfd92bb56ffd129d1e1f64e46cb8d4882c873a4a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page