skillfed

rison

Rison encoder/decoder

rison v2.0.1 431.4K downloads/30d#6,716 on PyPI24
Permissive license MIT Active released

What it is and what it does

Rison is a data serialization format designed specifically for embedding nested structures in URIs and query strings. This Python package provides encode and decode functions that convert between Python dictionaries/lists and Rison's compact syntax, which uses parentheses and exclamation marks instead of JSON's braces and brackets. The format avoids most URI-encoding overhead by using only URI-safe characters for its syntax.

The package supports three output formats: full Rison (with outer delimiters), O-RISON (omitting outer parentheses for objects), and A-RISON (omitting outer array markers). It has no runtime dependencies and installs as a pure Python wheel. An optional Pygments extra registers lexers for syntax highlighting of Rison code in three variants.

Use it for:

  • Compress complex filter or state parameters in HTTP GET requests to stay within URI length limits.
  • Store application state in browser URLs while keeping them human-readable and cacheable.
  • Pass nested configuration or query structures through command-line tools without shell escaping overhead.
  • Encode form data with nested dictionaries and lists in a more compact format than form-encoded alternatives.
  • Generate shareable links with complex parameters that remain legible when displayed or emailed.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Encodes and decodes data to and from Rison, a URI-optimized serialization format that compresses nested structures more efficiently than JSON while remaining human-readable in URLs.

Yes. Rison solves a real problem—passing nested data through URIs compactly and readably—that JSON handles poorly. The package is lightweight, actively maintained, has no dependencies, supports current Python versions, carries no known vulnerabilities, and uses a permissive license. Install it if you need to encode complex structures into query strings or URLs.

Install

rison on PyPI

pip

pip install rison

uv

uv add rison

poetry

poetry add rison

Installing rison

Before you install

Low friction: pure Python wheel with no runtime dependencies. Active maintenance with recent releases; repository shows steady activity.

License in practice

MIT license permits commercial and private use with minimal restrictions; suitable for most projects.

Quickstart

pip install rison

import rison
rison.dumps({'foo': 'bar'})  # returns '(foo:bar)'
rison.loads('(foo:bar)')  # returns {'foo': 'bar'}

Requires Python 3.10 or later.

Verify before relying

  • Performance characteristics compared to JSON encoding for large nested structures.
  • Compatibility with existing Rison implementations in other languages beyond basic round-trip encoding.

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance actively maintained — 110 days since the last release
Last repo commit
First released
Downloads 431,377/month — #6,716 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: rison-2.0.1-py3-none-any.whl

Programming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPy

Tags

rison encoder decodercompact uri serializationjson alternative for urlsnested data in query stringsuri-safe data formatrison python librarycompact query parameters
serializationuri-encodingdata-format

More Internet packages