This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description
James WSGI Server
=================

[James][1] provides a very simple multi-threaded [WSGI][2] server
implementation based on the HTTPServer from Python's standard library.

You can host multiple applications on one host as well as static files.

**Important** - James is is a simple server for use in testing or
debugging WSGI applications. It hasn't been reviewed for security
issues. Don't use it for production use.

Use it for demo and debugging purposes.


Basic Example
-------------
You can add a James call using the `__name__` hook on the bottom of
your application file:

if __name__ == '__main__':
from james import WSGIServer
WSGIServer(applications={'/': my_application}).run()

This example assumes that your application is named `my_application`.
Your application will be mounted on `/`. Using the `applications`
parameter you can install more than one application on the same james
server.


Serving Static Files
--------------------
James can also handle static files. For this purpose it takes a
parameter `files`:

if __name__ == '__main__':
from os import path
from james import WSGIServer
base = path.dirname(__file__) + '/static'

WSGIServer(
applications={
'/': my_application
},
files={
'/favicon.ico': base + '/favicon.ico',
'/css': base + '/css',
'/img': base + '/img'
}
).run()


Defining Hostname and Port
--------------------------
Per default James listens on [localhost][3] Port 8080.

To change this behavior you can use the parameters `hostname` and
`port`:

if __name__ == '__main__':
from james import WSGIServer
WSGIServer(hostname='mycomputername', port=80,
applications={'/': myapplication}).run()

Autoreloading Code
------------------
Per default James is persistent which means imported module get only
reloaded when you restart the server. Because James is meant as an
developement server you can enable automatically code reloading with
the `autoreload` parameter:

if __name__ == '__main__':
from james import WSGIServer
WSGIServer(applications={'/': myapplication},
autoreload=True).run()

Testing James
-------------
You can get this page if you call `james.test()`.


[1]: http://wsgiarea.pocoo.org/james/
[2]: http://www.python.org/peps/pep-0333.html
[3]: http://localhost:8080/
Release History

Release History

0.7.1

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.7

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting