Symbol Catbuffer Parser
Project description
Note (nemtus mirror): This package is a content mirror of the catbuffer parser from
symbol/symbol(catbuffer/parser, upstream PyPI namecatparser). nemtus republishes it on PyPI asnemtus-catparser; the only change from upstream is the published distribution name. The import module name is unchanged — you stillimport catparser. For the canonical project, see symbol/symbol.
catbuffer-parser
This project is the reference parser implementation for the CATS (Compact Affinitized Transfer Schema) DSL that is used by the Symbol blockchain. The parser converts a CATS file or files into an AST that can be used by a generator to produce serialization and deserialization code for defined objects.
- A reference to the DSL format can be found here.
- For a sampling of real world schemas, those used by the Symbol blockchain can be found here.
Requirements
- Python >= 3.7
Installation
git clone https://github.com/symbol/catbuffer-parser
pip3 install -r requirements.txt
pip3 install -r lint_requirements.txt # optional
Usage
usage: python -m catparser [-h] -s SCHEMA -i INCLUDE [-o OUTPUT]
CATS code generator
optional arguments:
-h, --help show this help message and exit
-s SCHEMA, --schema SCHEMA
input CATS file
-i INCLUDE, --include INCLUDE
schema root directory
-o OUTPUT, --output OUTPUT
yaml output file
-g GENERATOR, --generator GENERATOR
generator class to use to produce output files (defaults to YAML output)
-q, --quiet do not print type descriptors to console
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:
# parse but don't output anything
python3 -m catparser --schema ../schemas/symbol/transfer/transfer.cats --include ../schemas/symbol --quiet
# parse and output the AST
python3 -m catparser --schema ../schemas/symbol/transfer/transfer.cats --include ../schemas/symbol
# parse and generate code using the specified generator (`generator.Generator`)
python3 -m catparser --schema ../schemas/symbol/transfer/transfer.cats --include ../schemas/symbol --generator generator.Generator
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 nemtus_catparser-3.2.0.post1.tar.gz.
File metadata
- Download URL: nemtus_catparser-3.2.0.post1.tar.gz
- Upload date:
- Size: 15.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d4d99d2a4832fe23f0fb53eb37f9d1aa3e94bf0a1ba4d978b1d1e86b089cc570
|
|
| MD5 |
5c900bc73c59e95e34922d9bbc970839
|
|
| BLAKE2b-256 |
8e2afd35f25f674aedc74ae0c8d5561db0ba755274e2356902bef3b069236b2c
|
Provenance
The following attestation bundles were made for nemtus_catparser-3.2.0.post1.tar.gz:
Publisher:
pypi-catparser-publish.yml on nemtus/symbol
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nemtus_catparser-3.2.0.post1.tar.gz -
Subject digest:
d4d99d2a4832fe23f0fb53eb37f9d1aa3e94bf0a1ba4d978b1d1e86b089cc570 - Sigstore transparency entry: 1983400460
- Sigstore integration time:
-
Permalink:
nemtus/symbol@8420ceae0d6c201a29642e539c26a77431ca7b18 -
Branch / Tag:
refs/heads/dev - Owner: https://github.com/nemtus
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-catparser-publish.yml@8420ceae0d6c201a29642e539c26a77431ca7b18 -
Trigger Event:
push
-
Statement type:
File details
Details for the file nemtus_catparser-3.2.0.post1-py3-none-any.whl.
File metadata
- Download URL: nemtus_catparser-3.2.0.post1-py3-none-any.whl
- Upload date:
- Size: 18.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fec85151c99ad15296634cefbf786f93b898255749734f5ceeb397651718df5f
|
|
| MD5 |
4a028d49f073a1187c734c912555a462
|
|
| BLAKE2b-256 |
b452682276f9025856a22ae7720a6c0ba8cf6ccf1c2bc5a90f9d4a8ca5cb4e85
|
Provenance
The following attestation bundles were made for nemtus_catparser-3.2.0.post1-py3-none-any.whl:
Publisher:
pypi-catparser-publish.yml on nemtus/symbol
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nemtus_catparser-3.2.0.post1-py3-none-any.whl -
Subject digest:
fec85151c99ad15296634cefbf786f93b898255749734f5ceeb397651718df5f - Sigstore transparency entry: 1983400642
- Sigstore integration time:
-
Permalink:
nemtus/symbol@8420ceae0d6c201a29642e539c26a77431ca7b18 -
Branch / Tag:
refs/heads/dev - Owner: https://github.com/nemtus
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-catparser-publish.yml@8420ceae0d6c201a29642e539c26a77431ca7b18 -
Trigger Event:
push
-
Statement type: