prison
Rison encoder/decoder
Decision gist · record as of 2026-08-14
Yes. The package is stable, has no known vulnerabilities, low install friction, and fills a specific niche: passing structured data through URIs compactly. Install it if you need to embed nested objects or arrays in query parameters without the verbosity of JSON or form encoding. Active repository maintenance supports continued reliability.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low install friction with a single runtime dependency (six).
- Actively maintained as of the last commit in 2026, though the latest release is from 2021.
License · maintenance · safety
MIT (permissive) — MIT license permits commercial and private use with minimal restrictions; suitable for most projects.
last release 2021-08-26 (1814 days) · last repo commit 2026-05-02 · 24 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 10,090,260 downloads/mo, #1,481 on PyPI
Alternatives
Verify before relying
pip install prison
import prison
prison.dumps({'foo': 'bar'})
# Returns: '(foo:bar)'
prison.loads('(foo:bar)')
# Returns: {'foo': 'bar'}- Whether the 2021 release date reflects active development or if the repository is maintained without frequent releases
- Performance characteristics when encoding or decoding deeply nested structures
What it is and what it does
This package provides a Python encoder and decoder for a data serialization format designed specifically for embedding structured data in URIs while remaining human-readable and compact. The format uses URI-safe syntax: parentheses for objects, exclamation-mark-prefixed arrays, single quotes for strings, and special tokens for literals. It expresses the same data model as JSON but produces strings that survive URI encoding with minimal bloat.
The package supports three output formats: full format with outer delimiters, object format with outer parentheses omitted, and array format with outer array markers omitted. A command-line tool converts between this format and JSON. Optional Pygments lexer support is available via an extra dependency.
Use it for
- Encode nested query parameters in URLs without excessive percent-encoding bloat
- Pass structured configuration or filter data through URI query strings in web applications
- Convert between this format and JSON in command-line pipelines
- Syntax-highlight data in documentation or code editors via Pygments lexers
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
The package is stable, has no known vulnerabilities, low install friction, and fills a specific niche: passing structured data through URIs compactly. Install it if you need to embed nested objects or arrays in query parameters without the verbosity of JSON or form encoding. Active repository maintenance supports continued reliability.
Install
prison on PyPI
Before you install
Low install friction with a single runtime dependency (six). Actively maintained as of the last commit in 2026, though the latest release is from 2021.
License in practice
MIT license permits commercial and private use with minimal restrictions; suitable for most projects.
Quickstart
pip install prison
import prison
prison.dumps({'foo': 'bar'})
# Returns: '(foo:bar)'
prison.loads('(foo:bar)')
# Returns: {'foo': 'bar'}
Verify before relying
- Whether the 2021 release date reflects active development or if the repository is maintained without frequent releases
- Performance characteristics when encoding or decoding deeply nested structures
Package facts
| License | MIT permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagesix |
| Maintenance | Actively maintained 1,814 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 10,090,260 / month, #1,481 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | License :: OSI Approved :: MIT LicenseProgramming Language :: PythonProgramming Language :: Python :: 2.6Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.3Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPy |
Evidence: prison-0.2.1-py2.py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “compact uri serialization”
- prisonEncodes and decodes a compact URI-friendly data serialization format…
- risonEncodes and decodes data to and from Rison, a URI-optimized…
- curiesConverts between URIs and compact URIs (CURIEs) using customizable…
Give your agent the search over MCP, or paste the wish link into any chat.
More WWW/HTTP packages
urllib3 is an HTTP client library that provides thread-safe connection pooling, SSL/TLS verification, multipart file uploads, request retries, compression support, and proxy handling for Python applications.
Requests is a Python HTTP library that simplifies sending HTTP/1.1 requests with automatic handling of headers, authentication, cookies, and response parsing.
h11 is a pure-Python HTTP/1.1 protocol implementation that handles parsing and serializing HTTP messages without any built-in I/O, letting you integrate it with any network layer you choose.
HTTPX is a fully featured HTTP client library for Python that provides both sync and async APIs, with support for HTTP/1.1 and HTTP/2, plus an integrated command-line client.
Install it if you are building new projects or modernizing existing ones that rely on HTTP.
A minimal low-level HTTP client library that sends HTTP requests with thread-safe and task-safe connection pooling, supporting HTTP/1.1, HTTP/2, proxies, and both sync and async interfaces.
aiohttp is an async HTTP client and server framework built on asyncio, supporting both WebSockets and middleware-based routing for building concurrent web applications.
Install it if you need async HTTP client or server capabilities in asyncio-based applications.
See also rison · python-datauri · cbor · prefixcommons · py-ubjson · curies · yarl · nestedtext · canonicaljson · lazr.uri