Skip to main content

PyILInt

Description

PyILInt is a pure Python implementation of the InterlockLedger ILInt integer encoding standard.

This implementation is based on the reference implementation shipped with the official definition of the standard and the rust-il2-ilint.

Requirements

This program was developed for Python 3.6 or higher. No external dependencies are required.

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 pyilint

How to use it

A simple example program is:

import random
from pyilint import MAX_UINT64, ilint_encode, ilint_decode

v = random.randrange(0, MAX_UINT64)
buff = bytearray()
size = ilint_encode(v, buff)
print(f'{v} was encoded to {buff} in {size} bytes...')
dec, dec_size = ilint_decode(buff)
print(f'...and was decoded to {dec} using {dec_size} bytes.')

The documentation of 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.2.2:
    • Tested on multiple versions of python with tox;
  • 0.2.1:
    • Unit-tests removed from the distribution package;
  • 0.2.0:
    • Replacing bitwise operations by int.to_bytes() and int.from_bytes();
    • Exposing the low level function ilint_decode_multibyte_core();
  • 0.1.1:
    • Initial public release;

Metadata

Release files for pyilint 0.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyilint 0.2.2
File Size Uploaded
pyilint-0.2.2.tar.gz 4.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyilint 0.2.2
File Interpreter ABI Platform
pyilint-0.2.2-py3-none-any.whl Python 3 none any Details

Total release size: 10.4 kB

Release files / pyilint-0.2.2.tar.gz

Download URL pyilint-0.2.2.tar.gz
Size 4.8 kB
Tags Source
SHA-256 checksum
How to use checksums
2338f19af0dae10f9ff1f9fb41859d1cf99c19a272654669fa51acbdf75f6358
BLAKE2b-256 checksum
How to use checksums
ec6a1cbb1f32fea789f73d24df604d9ab70a1c56b1de45223675c830e87a92e8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.8.10

Release files / pyilint-0.2.2-py3-none-any.whl

Download URL pyilint-0.2.2-py3-none-any.whl
Size 5.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4709198c668566523806264f2cfb9ea0d3986f70e6da78e4d2a835541a510275
BLAKE2b-256 checksum
How to use checksums
f19405e23032a96d6afac192c7313ee070e1955a61fbcd07800eb3cc5973531f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.8.10

Release history Release notifications | RSS feed

This release

0.2.2 This release

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page