Skip to main content

MicroBIN python library

MicroBIN is a compact binary serialization format.

More info about MicroBIN format

Installing

# Linux
pip install microbin

# Windows
py -3 -m pip install microbin

Usage

Use as library

MicroBIN library provides json-like interface with load(s) and dump(s) functions.

Command line utilities

Note. For windows use py -3 -m ... instead of python -m ... .

mbstat

$ python -m microbin.mbstat -h
usage: microbin.mbstart [-h] [-V] [-s {count,size,bpo}] file

Analyze MicroBIN file

positional arguments:
  file                  MicroBIN file to analyze

options:
  -h, --help            show this help message and exit
  -V, --version         show program's version number and exit
  -s {count,size,bpo}, --sort {count,size,bpo}
                        set field to sort (default: size)

(c) NekoNekoNyan <me@neko-dev.ru>, 2023

mb2json

$ python -m microbin.mb2json -h
usage: microbin.mb2json [-h] [-V] [-o OUTPUT] [-m MAGIC] [-c] [-a] file

Convert MicroBIN file to json

positional arguments:
  file                  MicroBIN file to convert

options:
  -h, --help            show this help message and exit
  -V, --version         show program's version number and exit
  -o OUTPUT, --output OUTPUT
                        set output json file (default: standart output)
  -m MAGIC, --magic MAGIC
                        set application magic (default: 0000)
  -c, --compact         create compact json
  -a, --ascii           create json without any non-ascii characters

(c) NekoNekoNyan <me@neko-dev.ru>, 2023

json2mb

$ python -m microbin.json2mb -h
usage: microbin.json2mb [-h] [-V] [-i INPUT] [-m MAGIC] [-f {16,32,64}] file

Convert json to MicroBIN file

positional arguments:
  file                  output MicroBIN file

options:
  -h, --help            show this help message and exit
  -V, --version         show program's version number and exit
  -i INPUT, --input INPUT
                        set input json file (default: standart input)
  -m MAGIC, --magic MAGIC
                        set application magic (default: 0000)
  -f {16,32,64}, --float-size {16,32,64}
                        set size of float numbers (in bits; default: 64)

(c) NekoNekoNyan <me@neko-dev.ru>, 2023

License

MIT License. See here for more info

Metadata

Release files for microbin 1.0.1

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

Source distribution (sdist)

Source distribution for microbin 1.0.1
File Size Uploaded
microbin-1.0.1.tar.gz 8.5 kB Details

Built distribution (wheel)

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

Total release size: 18.3 kB

Release files / microbin-1.0.1.tar.gz

Download URL microbin-1.0.1.tar.gz
Size 8.5 kB
Tags Source
SHA-256 checksum
How to use checksums
a1f87b4de99eff0567cabdf2639a51fc24b2f85bcac600149743e0f9dc99f428
BLAKE2b-256 checksum
How to use checksums
525b3de740dd6ba8043937064664ff3848d5a8e9165d10b51b6ab962f56d079b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.12.0b1

Release files / microbin-1.0.1-py3-none-any.whl

Download URL microbin-1.0.1-py3-none-any.whl
Size 9.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
515a138a28e7964994d85c2cb18709409e862ed83603ee15565c812f304a08b6
BLAKE2b-256 checksum
How to use checksums
5ffe426788f2db03b08443dc64a07ef1bd9f291de9f3fc2a92adf7d96efa9714
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.12.0b1

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0.0

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