Package: wsgid
A backgrounding front-end over cherrypy (builtin), twisted.web, circuits,
spawning, fapws3, and werkzeug, With server-independent support for code
reloading and pid file management.ExamplesRun a server in the foreground after importingmywebapp.appas the application
instance:wsgid --application mywebapp.appRun a server in the foreground after importing and callingmywebapp.create_appas the application factory:wsgid --application_factory mywebapp.create_appRun a server using the pidfilemypid.pidafter importing and
callingmywebapp.create_appas the application factory:wsgid --application_factory mywebapp.create_app --pidfile mypid.pidStop a server using the pidfilemypid.pid:wsgid --pidfile mypid.pid --stopUse twisted.web’s server to display builtin hello-world:wsgid --server=twistedwebAll these options have short versions, and can override defaults in config
files or the environment.Using config filesIni-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_appAnd then:wsgid -c myserver.iniIs 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 environmentAdditionally any config variable can be overriden using the environment
variables. The variable name is uppercased, and prefixed withWSGID_to avoid
collisions with other apps for common names. For example:export WSGID_PIDFILE=mypid.pidIs equivalent to passing the–pidfileon the command line.Using the Werkzeug DebuggerPassing the option -d/–debug will wrap your WSGI application in the Werkzeug
debugger. It is not recommended to do this in production:wsgid --application mywebapp.app --foreground --debugUsing SSLThe default CherryPy backend supports SSL, and this is enabled using the two
options –ssl_certificate/-C with –ssl_private_key/-K, To generate these as
an example:openssl genrsa 1024 > host.key
openssl req -new -x509 -nodes -sha1 -days 365 -key host.key > host.certThen you can run your server like:wsgid --application mywebapp.app --foreground --ssl_certificate=host.cert --ssl_private_key=host.keyComplete optionsUsage: wsgid [options]Options:-h,--helpshow this help message and exit-cCONFIG_FILE,--config_file=CONFIG_FILEThe configuration file-pPIDFILE,--pidfile=PIDFILEThe PID file-s,--stopStop the server.-aAPPLICATION,--application=APPLICATIONThe WSGI Applciation instance to import-AAPPLICATION_FACTORY,--application_factory=APPLICATION_FACTORYThe WSGI Applciation factory to import-d,--debugRun in the werkzeug debugger.-PPORT,--port=PORTThe port to listen on.-HHOST,--host=HOSTThe host to listen on.-N,--no_reloaderDo not use the reloader.-LLOGDIR,--logdir=LOGDIRThe directory for logs.-wWORKDIR,--workdir=WORKDIRThe working directory for the daemon.-nSERVERNAME,--servername=SERVERNAMEThe server name-CSSL_CERTIFICATE,--ssl_certificate=SSL_CERTIFICATEThe ssl certificate-KSSL_PRIVATE_KEY,--ssl_private_key=SSL_PRIVATE_KEYThe ssl private key-eVIRTUALENV,--virtualenv=VIRTUALENVPath to a virtualenv to use-v,--verboseVerbose logging-T,--no_log_stdoutDo not log on stdout-OSERVER,--server=SERVERServer type to use, can be:cherrypy (default)
twistedweb
circuitsweb
fapws3
spawningweb
wz-X,--dumbRun a dumb server. Does not handle pidfiles/logs/etc.Developer InformationRepository/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