catbuffer parser
The catbuffer library defines the protocol to serialize and deserialize Symbol entities. Code generators from the catbuffer-generators project can then produce the leanest code necessary to serialize and deserialize those entities.
Using catbuffer-generators, developers can generate builder classes for a given set of programming languages. For example, the Symbol SDKs use the generated code to interact with the entities in binary form before announcing them to the network.
The schemas folder contains definitions for each entity's data structure. These definitions are always kept up to date and in sync with the catapult server code.
Requirements
- Python >= 3.6
Installation
- Clone the
catbuffer-parserrepository:
git clone https://github.com/nemtech/catbuffer-parser
- (optional) Install lint requirements:
pip3 install -r lint_requirements.txt
Usage
python3 -m catbuffer_parser [OPTIONS]
| Option | Description | Default |
|---|---|---|
| -s, --schema TEXT | Input CATS file | |
| -o, --output TEXT | Output directory | _generated |
| -i, --include TEXT | Schema root directory | ./schemas |
| -g, --generator TEXT | Generator to use to produce output files (see the available generators). | |
| -c, --copyright TEXT | File containing copyright data to use with output files. | ../HEADER.inc |
Examples
In order to produce any output file, the catbuffer-generators project is needed. Please see this project's usage examples.
However, catbuffer-parser can still be used on its own to parse input files and check their validity:
git clone --depth 1 --branch v1.0.0 https://github.com/nemtech/catbuffer-schemas.git
python3 -m catbuffer_parser --schema catbuffer-schemas/schemas/transfer/transfer.cats --include catbuffer-schemas/schemas
Metadata
Release files for catbuffer-parser 1.0.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 | |
|---|---|---|---|
| catbuffer-parser-1.0.1.tar.gz | 2.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| catbuffer_parser-1.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 5.8 kB
Release files / catbuffer-parser-1.0.1.tar.gz
| Download URL | catbuffer-parser-1.0.1.tar.gz |
|---|---|
| Size | 2.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
76e7b723b9c155471abc1384fdf2af9d74ab785bc8df2fd99eff961141690563
|
|
BLAKE2b-256 checksum How to use checksums |
b9c9addc79a3a45e91c1bcaed555741e571cfb5a5e31105dd9d309a37eff92e6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.6.7
|
Release files / catbuffer_parser-1.0.1-py3-none-any.whl
| Download URL | catbuffer_parser-1.0.1-py3-none-any.whl |
|---|---|
| Size | 3.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6de80167c27d8452a62f43677443e3e3b9b04edc4fd28be9df700b89e9c042ac
|
|
BLAKE2b-256 checksum How to use checksums |
22af273d8ee63e07b50733ffd8d339d818d4ad476251a015d588d9e918b04a5d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.6.7
|