Symbol Catbuffer Parser
Project description
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-parser
repository:
git clone https://github.com/symbol/catbuffer-parser
- (optional) Install lint requirements:
pip3 install -r lint_requirements.txt
Usage
python3 -m catparser [OPTIONS]
Option | Description |
---|---|
-s, --schema TEXT | Input CATS file |
-i, --include TEXT | Schema root directory |
-o, --output TEXT | YAML output file (optional) |
Examples
catparser
can be used on its own to parse input files, check their validity and optionally output a YAML file containing the parsed type descriptors:
git clone --depth 1 --branch v2.0.0a https://github.com/symbol/catbuffer-schemas.git
# parse but don't output anything
python3 -m catparser --schema ../catbuffer-schemas/symbol/transfer/transfer.cats --include ../catbuffer-schemas/symbol
# parse and output a YAML file
python3 -m catparser --schema ../catbuffer-schemas/symbol/transfer/transfer.cats --include ../catbuffer-schemas/symbol --output ../catbuffer-schemas/all.yaml
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
Hashes for catparser-2.0.1a230-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 878ed36bcac4d462bc12d143037ba1f17a55be11360834ee1eeb3797f2be73c7 |
|
MD5 | 0137ae3432928f072c4ba4d95d770c79 |
|
BLAKE2b-256 | 42cd9ecc2bd007bba84465dd6bcdcdaf1427e950dfa3b024ea11d7e5309d4fb7 |