Skip to main content

YAJBE for Python

YAJBE is a compact binary data format built to be a drop-in replacement for JSON (JavaScript Object Notation).

Motivation for a new format

We have a lot of services exchanging or storing data using JSON, and most of them don't want to switch to a data format that requires a schema.

We wanted to remove the overhead of the JSON format (especially field names), but keeping the same data model flexibility (numbers, strings, arrays, maps/objects, and a few values such as false, true, and null).

See more at https://github.com/matteobertozzi/yajbe-data-format

Install the package

You can find the package at https://pypi.org/project/yajbe.
Python >=3.10 is required. To install or upgrade you can use:

$ pip install --upgrade yajbe

Usage

import yajbe

# encode and decode from bytes
enc = yajbe.encode_as_bytes({'a': 10, 'b': ['hello', 10]})
dec = yajbe.decode_bytes(enc)
print(dec)

# encode directly to a stream
with open('test.yajbe', 'wb') as fd:
  yajbe.encode_to_stream(fd, {'a': 10, 'b': ['hello', 10]})

# decode directly from a stream
with open('test.yajbe', 'rb') as fd:
  print(yajbe.decode_stream(fd)) # {'a': 10, 'b': ['hello', 10]}

Metadata

Release files for yajbe 0.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for yajbe 0.0.7
File Size Uploaded
yajbe-0.0.7.tar.gz 10.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for yajbe 0.0.7
File Interpreter ABI Platform
yajbe-0.0.7-py3-none-any.whl Python 3 none any Details

Total release size: 19.7 kB

Release files / yajbe-0.0.7.tar.gz

Download URL yajbe-0.0.7.tar.gz
Size 10.3 kB
Tags Source
SHA-256 checksum
How to use checksums
4fded04fbcaef413a8096fc6aba49a06bbbe58b3ea6afb183748affa5ce4ea35
BLAKE2b-256 checksum
How to use checksums
ad1b2f21b1e970eb939b19e29960ef0f9599f601b167181d6ac21c63c4c999a8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5

Release files / yajbe-0.0.7-py3-none-any.whl

Download URL yajbe-0.0.7-py3-none-any.whl
Size 9.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e519b77c6dae44e4f6e0a90b894a104571d592003f0c621ac98b4a7d1e4ad937
BLAKE2b-256 checksum
How to use checksums
4b4be251308fe38a6d9c9e9a9332f17ac6b9cb5d4b8ac25a988a98f1d9214414
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5

Release history Release notifications | RSS feed

This release

0.0.7 This release

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page