Compact binary serialization format
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file microbin-1.0.1.tar.gz.
File metadata
- Download URL: microbin-1.0.1.tar.gz
- Upload date:
- Size: 8.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.0b1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a1f87b4de99eff0567cabdf2639a51fc24b2f85bcac600149743e0f9dc99f428
|
|
| MD5 |
548fbe9ba48bc48cd969cc5b35afb353
|
|
| BLAKE2b-256 |
525b3de740dd6ba8043937064664ff3848d5a8e9165d10b51b6ab962f56d079b
|
File details
Details for the file microbin-1.0.1-py3-none-any.whl.
File metadata
- Download URL: microbin-1.0.1-py3-none-any.whl
- Upload date:
- Size: 9.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.0b1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
515a138a28e7964994d85c2cb18709409e862ed83603ee15565c812f304a08b6
|
|
| MD5 |
c883037c6dcd51a1dcf6a66c9f80c62c
|
|
| BLAKE2b-256 |
5ffe426788f2db03b08443dc64a07ef1bd9f291de9f3fc2a92adf7d96efa9714
|