Skip to main content

Paster command to use uwsgi as server for local development

Project description


pasteuwsgi is a simple python paste ( plugin which adds a command that serve the application for using uWSGI ( integrated HTTP server. It can monitor python files and automatically reload uWSGI on file change. It’s focused for local development to easily test uWSGI specific features.


First, to use pasteuwsgi you need uWSGI installed, both sistem wide or in the virtualenv. Check the uWSGI documentation on how to install uWSGI ( The simplest way is to install uwsgi in the virtualenv, using pip:

# pip install uwsgi

Then, you can install pasteuwsgi via pypi:

# pip install pasteuwsgi

Or, if you want the last unstable version, directly from bitbucket (again, using pip):

# pip install -e hg+

Or you can clone the hg repo and then install:

# hg clone
# pip install -e ./


Once installed, simply add this line to of your paste app:

uwsgi = pasteuwsgi.serve:ServeCommand

in the “[paste.paster_command]” section of the entry_point argument.

i.e. for a pylons-1.0 application:

main = aybu.cms.config.middleware:make_app

main = pylons.util:PylonsInstaller

uwsgi = pasteuwsgi.serve:ServeCommand

You may need to re-run setuptools egg_info after adding the new entry_point:

# cd my-project
# python egg_info



Override the http server listening address.


Override the http server listening port.


Setup a monitor (using pyinotify) to watch application code to reload on changes. It also monitors code installed in the virtualenv.


Pass additional options to uWSGI directly. Remember that you neeed to wrap uWSGI options with quotes.


Load uWSGI plugins (for uWSGI >= 0.9.7)


To simply run it as you did with paster serve:

paster uwsgi development.ini --reload

You can add uwsgi options using the -w switch

# run with 2 workers with two threads each
paster uwsgi development.ini --reload -w "-workers 2 --threads 2"

You can even add common options (such the threads or the process one, or others) to a [uwsgi] section inside the paste ini (development.ini in the above example):

threads = 2
workers = 2

This works as pasteuwsgi passes –ini option to uwsgi with the same ini it uses.

Download files

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

Source Distribution

pasteuwsgi-0.1.8.tar.gz (5.6 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page