skillfed

peppercorn

A library for converting a token stream into a data structure for use in web form posts

peppercorn v0.6 671.3K downloads/30d#5,405 on PyPI
Permissive license BSD-derived (http://www.repoze.org/LICENSE.txt) Abandoned released

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 peppercorn

uv

uv add peppercorn

poetry

poetry add peppercorn

Installing 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

Intended Audience :: DevelopersProgramming Language :: PythonProgramming Language :: Python :: 2Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Internet :: WWW/HTTP :: Dynamic ContentTopic :: Internet :: WWW/HTTP :: WSGI :: Application

Tags

http form parsingtoken stream to data structureform post data conversionwsgi form handlingnested data structure parsing
legacyform-parsingwsgi

More Dynamic Content packages