The uWSGI embedded module

The uWSGI server automagically add a "uwsgi" module to you python apps. This is useful for configure the uWSGI server, use its internal functions and get statistics.

This is a list of attributes and functions of the uwsgi embedded module

uwsgi.numproc

get the number of processes/workers currently running

uwsgi.buffer_size

get the configured buffer size

uwsgi.started_on

get the time (in unix way, seconds from the epoch) of the uWSGI startup

uwsgi.fastfuncs

this is the dictionary used to enable FastFuncs

uwsgi.applist

this is the list of applications configured

uwsgi.applications

used to define ApplicationsDict

uwsgi.message_manager_marshal

set the callable to run when the uWSGI server receive a marshalled message.

uwsgi.send_uwsgi_message()

send a generic uwsgi message

uwsgi.send_multi_uwsgi_message()

send a generic uwsgi message to multiple servers. See ClusteredExamples for more info.

uwsgi.reload()

Gracefully reload the uWSGI server

uwsgi.workers()

get statistics of all the workers (a dictionary is returned)

uwsgi.masterpid()

returns the pid of the uWSGI master process

uwsgi.total_requests()

returns the total number of requests managed by the pool of uWSGI workers

uwsgi.send_to_spooler()

send data to the Spooler

uwsgi.sharedarea_read()

read a string from SharedArea

uwsgi.sharedarea_write()

write a string to SharedArea

uwsgi.sharedarea_readbyte()

read a byte from SharedArea

uwsgi.sharedarea_writebyte()

write a byte to SharedArea

uwsgi.sharedarea_readlong()

read a long from SharedArea

uwsgi.sharedarea_writelong()

write a long to SharedArea

uwsgi.sharedarea_inclong()

atomically increment a long in SharedArea