--- id: rison version: "2.0.1" license: MIT license_treatment: permissive maintenance: active --- # rison — Rison encoder/decoder License: permissive · Maintenance: active · Downloads: 431.4K/mo ## 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 above — 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 pip install rison uv add rison 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_current - Install friction: low - Maintenance: active - Downloads: 431.4K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags rison encoder decoder, compact uri serialization, json alternative for urls, nested data in query strings, uri-safe data format, rison python library, compact query parameters, serialization, uri-encoding, data-format [View on SkillFed](https://skillfed.io/packages/rison) · [View on PyPI](https://pypi.org/project/rison/)