About
This is a python implementation of jsonurl, an alternative text format which encodes the same data model in a way that is more suitable for use in URLs.
See https://jsonurl.org/ and especially https://github.com/jsonurl/specification/
The following optional features are supported:
The following optional features are not yet supported:
Installation
pip install jsonurl-py
The package name is jsonurl_py to avoid confusion with an unrelated jsonurl package on pypi which implements an unrelated syntax. In theory you can install and import both packages without having them interfere with each other.
The project name uses a dash in the name for consistency with the existing jsonurl-js and jsonurl-java implementations.
Usage
import jsonurl_py as jsonurl
assert jsonurl.loads('(a:1,b:c)') == {'a': 1, 'b': 'c'}
assert jsonurl.dumps(dict(a=[1,2])) == '(a:(1,2))'
Command Line Interface
The package includes a command line interface for converting between jsonurl and standard json:
$ echo "(a:b)" | jsonurl-py load
{"a": "b"}
$ echo '{"a":"b"}' | jsonurl-py dump
(a:b)
It is also possible to run the executable directly via pipx:
$ echo '(a:b)' | pipx run jsonurl-py load
{"a": "b"}
Documentation
Published on github pages.
Can be built locally using tox -e docs
Testing
Tests run via github actions.
Code coverage for main branch is published on github pages.
Metadata
Release files for jsonurl-py 0.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| jsonurl-py-0.3.1.tar.gz | 11.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| jsonurl_py-0.3.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 18.7 kB
Release files / jsonurl-py-0.3.1.tar.gz
| Download URL | jsonurl-py-0.3.1.tar.gz |
|---|---|
| Size | 11.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
adaa1d7c1343c41eeb228c67378c21ce5cd45d5d9e665a9e2ea86d7c1fed6d3b
|
|
BLAKE2b-256 checksum How to use checksums |
0d68355db34e4425e514d3e55627f23ba6ccdd7d3621e819ce186e0cec9d56a5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.27.1
|
Release files / jsonurl_py-0.3.1-py3-none-any.whl
| Download URL | jsonurl_py-0.3.1-py3-none-any.whl |
|---|---|
| Size | 6.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ea8757770e1d1fc474b53013eb1355cde6c2693d1d564f594722fb5cd4e62e87
|
|
BLAKE2b-256 checksum How to use checksums |
89486539b72243025ab4a443d245d23818310f73b741b70cf6fc395edf7f5aee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.27.1
|