Skip to main content

Pure Python implementation of InterlockLedger ILTags standard

Project description

PyILTags

Description

PyILTags is a pure Python implementation of the InterlockLedger ILTags TLV encoding.

It implements all tags defined by the standard, each one with proper interfaces to manipulate their data. It can also handle any non standard tag as instances of ILRawTag.

Furthermore, the provided API allows the implementation of new tags from ground up or by reusing one of the existing standard tags with new IDs.

Requirements

This program was developed for Python 3.7 or higher.

It depends on PyILInt 0.2.2 or later to work properly.

Installation

To install this library, you may download the code from github and copy the contents of the directory src into your module's directory.

You can also use pip to install it by running the command:

$ pip install pyiltags

How to use it

This library can be used to create, serialize and deserialize values using the ILTags standard.

This is a very simple example about how to use this library to create, serialize and deserialize a tag:

from io import BytesIO
from pyiltags.standard import ILStandardTagFactory, ILUInt64Tag

# Serialize a tag
tag = ILUInt64Tag(123456)
writer = BytesIO()
tag.serialize(writer)
writer.seek(0)
serialized = writer.read()
print(f'Tag with id {tag.id} and value {tag.value} serialized.')

# Unserialize the tag
reader = BytesIO(serialized)
factory = ILStandardTagFactory()
deserialized_tag = factory.deserialize(reader)
print(
    f'Deserialized tag with id {deserialized_tag.id} and value {deserialized_tag.value}.')

Further information about this library can be found in the source code and in its unit-tests.

License

This program is licensed under the BSD 3-Clause License.

Changes

  • 0.1.1:
    • Tested on multiple versions of python with tox;
  • 0.1.0:
    • Initial public release with minimum functionality;

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyiltags-0.1.1.tar.gz (14.5 kB view details)

Uploaded Source

Built Distribution

pyiltags-0.1.1-py3-none-any.whl (18.1 kB view details)

Uploaded Python 3

File details

Details for the file pyiltags-0.1.1.tar.gz.

File metadata

  • Download URL: pyiltags-0.1.1.tar.gz
  • Upload date:
  • Size: 14.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.10

File hashes

Hashes for pyiltags-0.1.1.tar.gz
Algorithm Hash digest
SHA256 6a98cc68d9b00e0de7a3d49d914d5f50d9bda1d2cb0132b48b85c65b9d77aca9
MD5 6641681f6f252aa8224b65160fad4141
BLAKE2b-256 82059e67f53434e65500f188eb1bc095529918c18f4faf208ad370a2b5fdc587

See more details on using hashes here.

File details

Details for the file pyiltags-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: pyiltags-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 18.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.10

File hashes

Hashes for pyiltags-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4fcd0139ddee613946b56cdd0a8db4d75df78ed89b0af1307eefe2d202a94a34
MD5 08983b6541665308b3a2ad5277395635
BLAKE2b-256 e336865b46e8cd357220d9ca71b9b10bf18d774bca0ad819e495b0e3be3e71f6

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page