Papyrus Documentation

Papyrus provides geospatial extensions for the Pyramid web framework.

Papyrus includes an implementation of the MapFish Protocol. The MapFish Protocol defines a HTTP interface for creating, reading, updating, and deleting (CRUD) geographic objects (a.k.a. features).

Papyrus includes lower-level objects, like the GeoJSON renderer, that may come in handy for your apps even if you don’t need or want MapFish views.


Papyrus can be installed with easy_install or pip:

$ pip install papyrus

(Installing Papyrus in an isolated virtualenv is recommended.)

You may want to install simplejson as well. This dependency is not required but it provides more functionnalities than the json module from the standard library like the possibility to parse float numbers as Decimal. papyrus can use such options if simplejson is present.

Most of the time you’ll want to make Papyrus a dependency of your Pyramid application. For that add papyrus to the install_requires list defined in the Pyramid application Example:

install_requires = [


Papyrus is on GitHub: Fork away. Pull requests are welcome!

Running the tests

Papyrus includes unit tests. Most of the time patches should include new tests.

To run the Papyrus tests, in addition to Papyrus and its dependencies the following packages need to be installed: nose, mock, psycopg2, simplejson, pyramid_handlers, coverage, and WebTest.

For these packages to install correctly, you have to have header files for PostgreSQL, Python, and GEOS. On Debian-based systems install the following system packages: libpq-dev, python-dev, libgeos-c1.

Use pip and the dev_requirements.txt file to install these packages in the virtual environment:

$ pip install -r dev_requirements.txt

To run the tests:

$ nosetests

Indices and tables