peppercorn
A library for converting a token stream into a data structure for use in web form posts
What it is and what it does
Peppercorn is a form-data parser that takes a stream of tokens and builds nested data structures—useful when you need to convert flat HTTP form submissions into hierarchical, strongly-typed objects. It was designed for WSGI applications and the Pylons web framework ecosystem. The library uses an iterative parser (as of version 0.5) to avoid denial-of-service vulnerabilities that recursive parsers can introduce.
The package has no external runtime dependencies, making it lightweight to install. However, it has been abandoned since 2018-08-24 and only declares support for Python versions up to 3.7, all of which are now end-of-life. It remains available and functional for legacy systems that already use it, but is not actively maintained or tested against modern Python versions.
Use it for:
- Parse complex HTML form submissions with nested fields into Python dictionaries or lists in WSGI applications
- Convert flat token streams from form data into hierarchical structures for legacy Pylons or Pyramid web projects
- Handle form elements with special operations like rename or ignore to support radio buttons and client-side scripting
- Maintain older web applications that depend on Peppercorn for form data handling
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Peppercorn converts token streams into nested data structures (sequences, mappings, scalars), primarily for parsing HTTP form post data into richer formats.
No, unless you are maintaining legacy code that already depends on it. The package is abandoned (last release 2018-08-24) and only supports Python versions through 3.7, all now end-of-life. No known vulnerabilities exist, but there is no active maintenance, security updates, or testing against modern Python. For new projects, use a maintained form-parsing library instead.
Install
peppercorn on PyPI
pip
pip install peppercornuv
uv add peppercornpoetry
poetry add peppercornInstalling peppercorn
Before you install
Installation is frictionless with no runtime dependencies. However, the package is abandoned—last release was 2018-08-24. It targets Python versions up to 3.7, which are now end-of-life. Use only if you are maintaining legacy code that already depends on it.
License in practice
Licensed under a BSD-derived license (permissive), so commercial and private use are unrestricted. No copyleft obligations apply.
Quickstart
import peppercorn
# Convert a token stream (list of tuples) into structured data
tokens = [('name', 'value'), ('__end__', None)]
result = peppercorn.parse(tokens)
print(result)
Verify before relying
- Whether the package works reliably with Python 3.8+ despite classifiers only declaring support through 3.7
- Current status of the Pylons project repository and whether maintenance has resumed
Package facts
| License | BSD-derived (http://www.repoze.org/LICENSE.txt) (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | abandoned — 2,912 days since the last release |
| First released | |
| Downloads | 671,302/month — #5,405 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: peppercorn-0.6-py3-none-any.whl
Keywords: web, wsgi, form, generation, library
Tags
More Dynamic Content packages
MarkupSafe provides a text object that escapes…
permissive · top 100 on PyPI
Jinja2Jinja2 is a templating engine that renders…
permissive · top 100 on PyPI
soupsieveSoupsieve is a CSS selector library designed to…
permissive · top 100 on PyPI
WerkzeugWerkzeug is a WSGI utility library providing…
permissive · top 1,000 on PyPI
FlaskFlask is a lightweight WSGI web application…
permissive · top 1,000 on PyPI
MakoMako compiles Python-embedded templates into…
permissive · top 1,000 on PyPI
WebObWebOb provides request and response objects…
permissive · top 5,000 on PyPI
colanderColander deserializes and validates data…
permissive · top 15,000 on PyPI
pyramidPyramid is a Python web framework for building…
permissive · top 5,000 on PyPI
HypercornHypercorn is an ASGI and WSGI web server…
permissive · top 5,000 on PyPI
PasteDeployPasteDeploy loads and configures WSGI…
permissive · top 5,000 on PyPI
zope.datetimeParses and formats date/time strings in common…
unclear · top 15,000 on PyPI
sparkaidProvides utilities for working with Spark…
copyleft · top 15,000 on PyPI
plaster-pastedeployA plaster plugin that loads and parses INI…
permissive · top 5,000 on PyPI
pyramid-retrypyramid_retry wraps Pyramid requests with…
permissive · top 15,000 on PyPI