Python bindings for the libitc library
Project description
pyitc
Python bindings for the libitc library.
Table Of Contents
What Are Interval Tree Clocks?
Interval Tree Clocks (ITC) are a generalisation of the Vector Clock and Version Vector mechanisms, allowing for scalable and efficient management of a highly dynamic number of replicas/processes in a distributed system.
See the ITC research paper from Paulo Sérgio Almeida, Carlos Baquero and Victor Fonte for more information.
Features
- Provides easy-to-use, Pythonesque bindings for the underlying C library
- Provides
__str__
methods for easy visualisation of the ITC trees - Provides bindings for the C lib's "extended API"
- Uses 64-bit event counters
Getting Started
Prerequisites
Download and install the wheels/sdist from PyPI or GitHub.
Usage Examples
Here are some usage examples:
from pyitc import Stamp, StampComparisonResult
from pyitc.extended_api import Id, Event
stamp = Stamp()
stamp.event()
stamp2 = stamp.fork()
print(stamp) # {(0, 1); 1}
print(stamp.peek()) # {0, 1}
print(stamp2) # {(1, 0); 1}
if stamp == stamp2: # all comparision operators are supported
print("yay!")
else:
print("nay")
if stamp.compare_to(stamp2) == StampComparisonResult.EQUAL: # equivalent to stamp == stamp2
print("yay again!")
stamp2.event() # Make stamp2 concurrent with stamp
if stamp.compare_to(stamp2) == StampComparisonResult.CONCURRENT:
print("Oh no! What should we do now?")
stamp3 = stamp2.fork()
stamp2.join(stamp3)
if not stamp3.is_valid():
print("stamp3 was joined with stamp2 and is no longer valid!")
print(stamp.id_component) # (0, 1)
print(stamp.event_component) # 1
stamp.event_component = Event()
stamp.id_component = Id(seed=True)
print(stamp.serialise()) # b'\x01\t\x01\x02\x01\x00'
print(stamp.id_component.serialise()) # b'\x01\x02'
print(stamp.event_component.serialise()) # b'\x01\x00'
remote_stamp = Stamp.deserialise(b'...')
remote_event = Event.deserialise(b'...')
remote_id = Id.deserialise(b'...')
Contributing
See CONTRIBUTING.md.
Reporting Vulnerabilities
:warning: NEVER open public issues or pull requests to report or fix security vulnerabilities.
See the Security Policy.
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 Distributions
File details
Details for the file pyitc-1.0.0.tar.gz
.
File metadata
- Download URL: pyitc-1.0.0.tar.gz
- Upload date:
- Size: 145.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4a93d989f3bcabce285d26a01788bc06e43525529faee691d8dd8925b8d6e189 |
|
MD5 | 079ed105ca466ca5e40997699fc6b0e7 |
|
BLAKE2b-256 | 80ce799bc78b93df0fec063499ce9509330c602a5fe5d548e341d12c7099e3d8 |
File details
Details for the file pyitc-1.0.0-pp310-pypy310_pp73-win_amd64.whl
.
File metadata
- Download URL: pyitc-1.0.0-pp310-pypy310_pp73-win_amd64.whl
- Upload date:
- Size: 67.9 kB
- Tags: PyPy, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 561421ce9323bb5eedbea1acdd76b5382ac71dae40c709977a8668d63ddaae4f |
|
MD5 | 8934363921c7d7d6e666dae5bc55952b |
|
BLAKE2b-256 | f5a09d8551cc1176fda378698c48b89628fea3bc22a1317f5380ddfbba7aa777 |
File details
Details for the file pyitc-1.0.0-pp310-pypy310_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: pyitc-1.0.0-pp310-pypy310_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 59.2 kB
- Tags: PyPy, manylinux: glibc 2.17+ x86-64, manylinux: glibc 2.5+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 08dc1f94872ed60a9c402232197455fd2236f0ac1a69c68312e52d8c393c1037 |
|
MD5 | b571d1b77b515f62112cf3c07190630e |
|
BLAKE2b-256 | 14c390408b4d21c620aea7921c9e4a0e589c53ddd9931876565d086174858ec9 |
File details
Details for the file pyitc-1.0.0-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
.
File metadata
- Download URL: pyitc-1.0.0-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
- Upload date:
- Size: 61.4 kB
- Tags: PyPy, manylinux: glibc 2.17+ i686, manylinux: glibc 2.5+ i686
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fecf582e73322a5a767690f5ab7129882a553faae64398f79e0810576e8517fc |
|
MD5 | e1359cf23850718c89d74ae1a4ab1db9 |
|
BLAKE2b-256 | 7925ad91481e5c6acec71011b4afbceb831a947636174fa3f11b5e96eaeb546e |
File details
Details for the file pyitc-1.0.0-pp39-pypy39_pp73-win_amd64.whl
.
File metadata
- Download URL: pyitc-1.0.0-pp39-pypy39_pp73-win_amd64.whl
- Upload date:
- Size: 67.9 kB
- Tags: PyPy, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 515ed1a7dd306c9b94eca099b7a5422fd8d10f4a9dcc39ddb3336f58a02cef4e |
|
MD5 | b0768a94325f4fe6c246a7c47bb70904 |
|
BLAKE2b-256 | 731e0a1fa58dc9c6a4db5279be68b686f2451ebbf8cd97414935f9b085fdbf80 |
File details
Details for the file pyitc-1.0.0-pp39-pypy39_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: pyitc-1.0.0-pp39-pypy39_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 59.2 kB
- Tags: PyPy, manylinux: glibc 2.17+ x86-64, manylinux: glibc 2.5+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e14bad727e2aa03c9d5b1b05d6ec7f8a3b44e0232b68333f11d95dde7aede898 |
|
MD5 | 794f39cb7ff2c8be1c956bc633588343 |
|
BLAKE2b-256 | bfed28f470c0327e158e92814c0a65ab7005b081f634bc397e61bf0e2d31ebf9 |
File details
Details for the file pyitc-1.0.0-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
.
File metadata
- Download URL: pyitc-1.0.0-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
- Upload date:
- Size: 61.4 kB
- Tags: PyPy, manylinux: glibc 2.17+ i686, manylinux: glibc 2.5+ i686
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c8c89cca5cad72d4429103e5d08e97c4be4433901ee54568b619ef2b694b84c1 |
|
MD5 | 46675a645b89e286ab87b68131da0c6e |
|
BLAKE2b-256 | 36bec9eff5e4c8d8c690c546b0c108e2a7b77797192758760da890f9e11be5fc |
File details
Details for the file pyitc-1.0.0-pp39-pypy39_pp73-macosx_11_0_arm64.whl
.
File metadata
- Download URL: pyitc-1.0.0-pp39-pypy39_pp73-macosx_11_0_arm64.whl
- Upload date:
- Size: 53.9 kB
- Tags: PyPy, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ccc9d7ab50414f433a81cc9b68d37e88a830affacd67710eafd676e257c2d724 |
|
MD5 | 2ba6135940ecd7094980b21b420831f3 |
|
BLAKE2b-256 | b9c45fcb2f461e51e576d275510308ce15d86a2856bc8f714499de01c861e3b4 |
File details
Details for the file pyitc-1.0.0-pp39-pypy39_pp73-macosx_10_15_x86_64.whl
.
File metadata
- Download URL: pyitc-1.0.0-pp39-pypy39_pp73-macosx_10_15_x86_64.whl
- Upload date:
- Size: 54.9 kB
- Tags: PyPy, macOS 10.15+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e39ee6d6d89c4f8ff50b3f5145cc6520dfd734a5c6790d97e8f0c366bfea2576 |
|
MD5 | 1b5a5b0013efddfcacf21f4af01035e4 |
|
BLAKE2b-256 | c36765234f0de5ce1434eab74f6478ebc6fcbae7f1c891222e872539e5aca2c1 |
File details
Details for the file pyitc-1.0.0-pp38-pypy38_pp73-win_amd64.whl
.
File metadata
- Download URL: pyitc-1.0.0-pp38-pypy38_pp73-win_amd64.whl
- Upload date:
- Size: 67.9 kB
- Tags: PyPy, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2d42d4e6de7b39bc925133e30b3a04dcfe216e6a7a594a6edfbec88843c13096 |
|
MD5 | b4a11bd65e719532ae29da46d40ffcd4 |
|
BLAKE2b-256 | 1a951b47b33ac06bc63a8969a241b3205e92b9e24a7d9dc6e1d3627acd3760ba |
File details
Details for the file pyitc-1.0.0-pp38-pypy38_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: pyitc-1.0.0-pp38-pypy38_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 59.2 kB
- Tags: PyPy, manylinux: glibc 2.17+ x86-64, manylinux: glibc 2.5+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 44743871b904f2c860b4f2fdb6b3207c19a62c85ed16b093e71522f8aaa37f2c |
|
MD5 | 3ce63d79da3275bc66ee3c94d05b1888 |
|
BLAKE2b-256 | da0aef10f2c50454be92d0d2934e0d83cd7c8563dd359badfe187982c2dda9ce |
File details
Details for the file pyitc-1.0.0-pp38-pypy38_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
.
File metadata
- Download URL: pyitc-1.0.0-pp38-pypy38_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
- Upload date:
- Size: 61.4 kB
- Tags: PyPy, manylinux: glibc 2.17+ i686, manylinux: glibc 2.5+ i686
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | baebe2302519f99eb403800130aae448683df58bac9275eb3b2bf794db06c851 |
|
MD5 | 51d9423acf5d81759c1c1f10a634fe0c |
|
BLAKE2b-256 | 34a45068eaa3d57f951057c0547ffb46f5454f9ffd8c63e8825fabd50c0b53a5 |
File details
Details for the file pyitc-1.0.0-pp38-pypy38_pp73-macosx_11_0_arm64.whl
.
File metadata
- Download URL: pyitc-1.0.0-pp38-pypy38_pp73-macosx_11_0_arm64.whl
- Upload date:
- Size: 53.9 kB
- Tags: PyPy, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 85e9a5eb387e48fb21f5d7ee3650aa09971829575f58c1a7acd1b7ea15fc7c28 |
|
MD5 | 711d49c1f6eb635534dbc129d367f2cc |
|
BLAKE2b-256 | 7ee0632e3d246696f63ca5c26afc30bc1969f6304583ac6dad1b39aaca11baee |
File details
Details for the file pyitc-1.0.0-pp38-pypy38_pp73-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: pyitc-1.0.0-pp38-pypy38_pp73-macosx_10_9_x86_64.whl
- Upload date:
- Size: 54.5 kB
- Tags: PyPy, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 764d88958583f607970dc59b589622d2d2da2c788d9026607806bf0534413de5 |
|
MD5 | e7ff6cf8090e7c7ed2cdaff86e982ba7 |
|
BLAKE2b-256 | 3b2b82c255d94b72cb3a75f804fa34962a606784c81f535f259e8052a25046e4 |
File details
Details for the file pyitc-1.0.0-cp38-abi3-win_amd64.whl
.
File metadata
- Download URL: pyitc-1.0.0-cp38-abi3-win_amd64.whl
- Upload date:
- Size: 74.0 kB
- Tags: CPython 3.8+, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 760a55b4c815e651e63f65e8e311fb5b2019e369525112fce5332830cb8615cc |
|
MD5 | 9eaa78ee466862bd8f64fa36bc9cd46b |
|
BLAKE2b-256 | ea3d9a313e2cba824ae81feb69fcefc78fc23553614249d38077c51d6b51aedb |
File details
Details for the file pyitc-1.0.0-cp38-abi3-musllinux_1_2_x86_64.whl
.
File metadata
- Download URL: pyitc-1.0.0-cp38-abi3-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 66.4 kB
- Tags: CPython 3.8+, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b06d0949e20e94dd3b5100b8e994abb8efe0c76a5e447b81fb79f50eba595590 |
|
MD5 | 34f70d8b29cae111538b544839c3142c |
|
BLAKE2b-256 | 9486deaf995ad91a29793a088f01bc8bd81b4e085ff2f50f318f5612eaa911ec |
File details
Details for the file pyitc-1.0.0-cp38-abi3-musllinux_1_2_i686.whl
.
File metadata
- Download URL: pyitc-1.0.0-cp38-abi3-musllinux_1_2_i686.whl
- Upload date:
- Size: 67.8 kB
- Tags: CPython 3.8+, musllinux: musl 1.2+ i686
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | da10f5cd0a19de9ad4ac3c6e2ebdac6ba9e21ae2f82df77ed5b7ef9866e24397 |
|
MD5 | de827aaad0619f01ac2d62df6f49f0f1 |
|
BLAKE2b-256 | a5a37a32a81f3d7ca274dba459b2290110734af115d44e50b00c6ebaf4c33870 |
File details
Details for the file pyitc-1.0.0-cp38-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: pyitc-1.0.0-cp38-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 65.2 kB
- Tags: CPython 3.8+, manylinux: glibc 2.17+ x86-64, manylinux: glibc 2.5+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8d24e04c830cbfe4660f6349526e3d018d5b5358b1b108b195ec3fc05613f180 |
|
MD5 | 1cbb15f255e072942eef3fd61c4ccb35 |
|
BLAKE2b-256 | fbd397a66a9c57ac5b1a7911ee481446caa016e03eac06b1219b864e19da1b52 |
File details
Details for the file pyitc-1.0.0-cp38-abi3-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
.
File metadata
- Download URL: pyitc-1.0.0-cp38-abi3-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
- Upload date:
- Size: 66.3 kB
- Tags: CPython 3.8+, manylinux: glibc 2.17+ i686, manylinux: glibc 2.5+ i686
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d6f7d9e5c039296be0a948269813348f6f22872418fd13960b96d8aae7f42a10 |
|
MD5 | b7c715a0c6a2147b208a2858770a85c1 |
|
BLAKE2b-256 | 33ae2e7b5615e9a9f88f4d3fb6866744f8023bd2dcf5ed93588e0089941c0f24 |
File details
Details for the file pyitc-1.0.0-cp38-abi3-macosx_11_0_arm64.whl
.
File metadata
- Download URL: pyitc-1.0.0-cp38-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 59.2 kB
- Tags: CPython 3.8+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6703be84016e59565a10138c9b92cb1868669533f06c6501a67ac467f274f8ee |
|
MD5 | bea36b286ba4f3e58109de31500d1c35 |
|
BLAKE2b-256 | 611d71ccea94975ade61688c57975f4daa57e808fa2ab2e30d48112f1155345e |
File details
Details for the file pyitc-1.0.0-cp38-abi3-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: pyitc-1.0.0-cp38-abi3-macosx_10_9_x86_64.whl
- Upload date:
- Size: 60.5 kB
- Tags: CPython 3.8+, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 63cb3ad7da42519055938017c34ab6da2a7ba123932f96b112db02050ec885e3 |
|
MD5 | 69ea818c818f85555082c067462038e5 |
|
BLAKE2b-256 | 736aebf26e3af929f60256a4147207e5ad18ae5831325aed7cc4d1f4940ace00 |