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
Metadata
Release files for nemtus-catparser 3.2.0.post1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| nemtus_catparser-3.2.0.post1.tar.gz | 15.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| nemtus_catparser-3.2.0.post1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 33.5 kB
Release files / nemtus_catparser-3.2.0.post1.tar.gz
| Download URL | nemtus_catparser-3.2.0.post1.tar.gz |
|---|---|
| Size | 15.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d4d99d2a4832fe23f0fb53eb37f9d1aa3e94bf0a1ba4d978b1d1e86b089cc570
|
|
BLAKE2b-256 checksum How to use checksums |
8e2afd35f25f674aedc74ae0c8d5561db0ba755274e2356902bef3b069236b2c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 27, 2026.
Transparency logRelease files / nemtus_catparser-3.2.0.post1-py3-none-any.whl
| Download URL | nemtus_catparser-3.2.0.post1-py3-none-any.whl |
|---|---|
| Size | 18.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fec85151c99ad15296634cefbf786f93b898255749734f5ceeb397651718df5f
|
|
BLAKE2b-256 checksum How to use checksums |
b452682276f9025856a22ae7720a6c0ba8cf6ccf1c2bc5a90f9d4a8ca5cb4e85
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 27, 2026.
Transparency log