Symbol Catbuffer Parser
Project description
catbuffer
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/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
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
File details
Details for the file catbuffer-parser-1.0.0a4.tar.gz
.
File metadata
- Download URL: catbuffer-parser-1.0.0a4.tar.gz
- Upload date:
- Size: 17.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.6.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1c2dfc77b4c3fabe004c420b1d15aeb0f4103d6fc34cdc6466bcc0fe7ede09f4 |
|
MD5 | a066162b2e688d5466c11d939c68ef00 |
|
BLAKE2b-256 | 575f04859cea3da5d0d9979b5233b59cf0957660d0c8274102be69e16b0baefd |
File details
Details for the file catbuffer_parser-1.0.0a4-py3-none-any.whl
.
File metadata
- Download URL: catbuffer_parser-1.0.0a4-py3-none-any.whl
- Upload date:
- Size: 12.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.6.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 084d7e375aa6e9be5efe125c5a5413c342d2a518c3320b60f47ea5f1d2411648 |
|
MD5 | 63c7b72d2711eb87a302665c90f94cad |
|
BLAKE2b-256 | 01e58aef7d79eccf7d46e3b507b11b029f1e023fd96193a0498886b895cab57a |