bouskdav / python-nistitl

A pure Python library for parsing and generating NIST-ITL binary files

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

nistitl

Documentation Status

CeCILL-C

Python 3.x

v?.?

Build Status (Travis CI)

Code Coverage Status (Codecov)

A pure Python library for parsing and generating NIST-ITL binary files.

Installation

nistitl is published on PyPI and can be installed from there:

pip install -U nistitl

Quick Start

To generate a NIST-ITL binary message:

msg = nistitl.Message()
msg.TOT = 'MY_TOT'

r2 = nistitl.AsciiRecord(2)
r2 += nistitl.Field(2,3,alias='TEST')
msg += r2

buffer = msg.NIST

To parse a NIST-ITL binary message:

msg = nistitl.Message()
msg.parse(buffer)
print("The TOT is ",msg.TOT)
for record in msg.iter(2):
    print("Field 2.003 is ",record._3)

See the full documentation for more details.

About

A pure Python library for parsing and generating NIST-ITL binary files

License:Other


Languages

Language:Python 99.8%Language:Shell 0.2%