Skip to main content

preppy - a Preprocessor for Python

Project description

Preppy is ReportLab’s templating system. It has been in continuous production use since 2000.

It was released as open source code but never evangelized. We are putting it out on PyPI now because many of our solutions depend on it, and this makes it a lot easier to install (e.g. with a pip requirements file).

Preppy is a single Python module which should be placed directly on the path (i.e. you access it with ‘import preppy’). The setup script does this, but it’s just as effective to grab it from the repo and drop it into your project.

Preppy aims to be absolutely minimal. You embed Python expressions and control structures in your template. It compiles the template into a .pyc file. A preppy template is exactly equivalent to a Python function which accepts parameters and returns text output. We don’t both with include functions, block nesting, filters or any other fancy stuff, because we already have a perfectly good language to do that in.

Preppy is just Python, so you get proper Python tracebacks, with the original line number in the .prep file; you can happily debug through calls to python, preppy, python and more preppy.

Currently the docs and tests are rather old-fashioned, because this dates back to before the unittest module, Sphinx and so on. We’re working on this. It also has ‘more than one way to do things’, which we will be simplifying and deprecating soon before making it available on Python 3.x.

BSD license. See LICENSE.txt for details

  • Andy Robinson, ReportLab, March 2015

Project details


Download files

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

Source Distribution

preppy-2.4.1.tar.gz (181.1 kB view details)

Uploaded Source

Built Distribution

preppy-2.4.1-py2.py3-none-any.whl (15.9 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file preppy-2.4.1.tar.gz.

File metadata

  • Download URL: preppy-2.4.1.tar.gz
  • Upload date:
  • Size: 181.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for preppy-2.4.1.tar.gz
Algorithm Hash digest
SHA256 aafa855d317260740332b8b8f88edc1424c21db27e096588b4b89cc299ed7fff
MD5 f0a44ebbd482f90703627e9c02d89196
BLAKE2b-256 ffe4dcf0977bd6c421be9144774a8f63b5d8e69fa30c234dfe4453bff78fbfa1

See more details on using hashes here.

File details

Details for the file preppy-2.4.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for preppy-2.4.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 680a424ab0e81587e712962581f416c1389ce7bc694cfc7e28a153b9bfca0b95
MD5 2b8069ea75abbb26036c63e76d470673
BLAKE2b-256 1071eefc59661064222e19207e3c5a6d252d1427e7fac0c8a8d99a7ab7474f00

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page