Registry / serialization / preppy

preppy

JSON →
library5.2.1pypypi✓ verified 87d ago

preppy is a Python preprocessor for generating text output from templates. It compiles template files into Python modules for fast execution. Current version 5.1.0, maintained by ReportLab, with irregular release cadence.

pip install preppy
INSTALL
IMPORT
SIG · PREPPY
P
preppy
serializationpythonv5.2.1
Install
1.7s avg
Import
151ms
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v5.2.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.156s · 17.9MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.7s · import 0.146s · 18MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

preppy
import preppy
from preppy import preppy
preppy is a module; the correct import is just 'import preppy'.
getModule
preppy.getModule('template.prep')
preppy.getModule(name='template')
getModule takes a filename string, not keyword arguments.

Compile and run a template file named 'template.prep' with a variable 'name'.

import preppy template = preppy.getModule('template.prep', source_extension='.prep') result = template.getOutput({'name': 'World'}) print(result)
Debug
Known issues
breakingVersion 3.x dropped Python 2 support. Templates compiled with older versions may not be compatible.
fix
Recompile templates with preppy 5.x.
affects: <4.0.0
breakingIn version 5.x, the module caching behavior changed: getModule now caches compiled modules by default. Use noCaching parameter to disable.
fix
Add noCaching=True if you need fresh compilation each time.
affects: >=5.0.0
gotchaTemplate files must have a .prep extension by default, or specify source_extension in getModule.
fix
Use preppy.getModule('file.prep') or preppy.getModule('file', source_extension='.prep').
affects: all
gotchagetOutput does not accept keyword arguments for variables; pass a dictionary as first argument.
fix
Use template.getOutput({'var': value}) instead of template.getOutput(var=value).
affects: all
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'preppy'
preppy is not installed.
fix
Run 'pip install preppy'.
AttributeError: module 'preppy' has no attribute 'getModule'
Wrong import (e.g., 'from preppy import preppy').
fix
Use 'import preppy' and call preppy.getModule().
preppy.PreppyError: Could not find template file
Filename or path is incorrect, or extension missing.
fix
Ensure filename includes .prep extension or use source_extension parameter.
Upgrade
Version history
5.2.1latest on PyPI · released May 8, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
12 hits · last 30 days
node
12
Resources
preppy — pip install preppy · libregistry