Skip to main content

A Python bit manipulation library written in Rust.

Project description

tibs

A streamlined Python bit manipulation library written in Rust.

PyPI - Version CI badge PyPI - License


[!NOTE] This library is currently pre-alpha. This documentation is part reality and part planning.

Why is it called tibs?

Well it's 'bits' backwards (more or less) and the name was available!

The basics

from tibs import Tibs, Mutibs

The Tibs class is an immutable container of binary data. You can create a Tibs from binary or hex strings, byte data, format strings etc. A number of creation methods are provided, all of which start with from_:

>> > a = Tibs.from_string('0b110')
>> > b = Tibs.from_zeros(16)
>> > c = Tibs.from_bytes(b'some_bytes')
>> > d = Tibs.from_joined([a, b, c])
>> > e = Tibs.from_random(1000)
>> > f = Tibs.from_joined([a, b, c, d, e])

The __init__ method redirects to from_string, so above you could also say a = Tibs('0b110'), which is often more convenient. The string can be formatted to do more than just binary, for example:

>> > g = Tibs('u14=78')  # A 14-bit unsigned int with value 78
>> > h = Tibs('f16=-0.25')  # A 16-bit IEEE float
>> > j = Tibs('0o777')  # 9 bits from octal

The Mutibs class (pronounced 'mew-tibs') is a mutable version of Tibs.

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

tibs-0.1.1.tar.gz (3.3 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

tibs-0.1.1-cp314-cp314t-win_amd64.whl (295.1 kB view details)

Uploaded CPython 3.14tWindows x86-64

tibs-0.1.1-cp314-cp314t-win32.whl (274.7 kB view details)

Uploaded CPython 3.14tWindows x86

tibs-0.1.1-cp38-abi3-win_amd64.whl (309.8 kB view details)

Uploaded CPython 3.8+Windows x86-64

tibs-0.1.1-cp38-abi3-win32.whl (287.8 kB view details)

Uploaded CPython 3.8+Windows x86

tibs-0.1.1-cp38-abi3-musllinux_1_2_x86_64.whl (507.1 kB view details)

Uploaded CPython 3.8+musllinux: musl 1.2+ x86-64

tibs-0.1.1-cp38-abi3-musllinux_1_2_ppc64le.whl (493.7 kB view details)

Uploaded CPython 3.8+musllinux: musl 1.2+ ppc64le

tibs-0.1.1-cp38-abi3-musllinux_1_2_aarch64.whl (478.3 kB view details)

Uploaded CPython 3.8+musllinux: musl 1.2+ ARM64

tibs-0.1.1-cp38-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (425.4 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ x86-64

tibs-0.1.1-cp38-abi3-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl (451.8 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ ppc64le

tibs-0.1.1-cp38-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl (413.1 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ ARM64

tibs-0.1.1-cp38-abi3-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl (447.5 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ i686manylinux: glibc 2.5+ i686

tibs-0.1.1-cp38-abi3-macosx_11_0_arm64.whl (382.2 kB view details)

Uploaded CPython 3.8+macOS 11.0+ ARM64

tibs-0.1.1-cp38-abi3-macosx_10_12_x86_64.whl (414.7 kB view details)

Uploaded CPython 3.8+macOS 10.12+ x86-64

File details

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

File metadata

  • Download URL: tibs-0.1.1.tar.gz
  • Upload date:
  • Size: 3.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for tibs-0.1.1.tar.gz
Algorithm Hash digest
SHA256 f3ebe4c532f723708fbf9240df6bad418748ce7fc4183efb363a6b511fac3d2a
MD5 66e29958ddb50bbfca0075d9903e5b5d
BLAKE2b-256 f5903bc759bea9226e5a33ec0fd7e4d14e97af8b624c8f2058bf38491c8a2781

See more details on using hashes here.

File details

Details for the file tibs-0.1.1-cp314-cp314t-win_amd64.whl.

File metadata

  • Download URL: tibs-0.1.1-cp314-cp314t-win_amd64.whl
  • Upload date:
  • Size: 295.1 kB
  • Tags: CPython 3.14t, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for tibs-0.1.1-cp314-cp314t-win_amd64.whl
Algorithm Hash digest
SHA256 ec582399b0e2fff2b707c3084f5625dbedf16cb722166c733a01efb6e2084661
MD5 a14c46390bafb6edc0f91396e8e30861
BLAKE2b-256 2f7a0fe3c6a322bb9e2379aa1e9f67eebd1c445387e39a0dc297f912fe1d4fca

See more details on using hashes here.

File details

Details for the file tibs-0.1.1-cp314-cp314t-win32.whl.

File metadata

  • Download URL: tibs-0.1.1-cp314-cp314t-win32.whl
  • Upload date:
  • Size: 274.7 kB
  • Tags: CPython 3.14t, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for tibs-0.1.1-cp314-cp314t-win32.whl
Algorithm Hash digest
SHA256 a5d29b2d7aa3428e9a47bf1ea5b94b928a26d5c68e9995ffddc9edda400b52b3
MD5 2040ef9bb27ad399188575a9356a72af
BLAKE2b-256 c6ff2ef1f9c01f9a6c50e7301de617d53c4a2f5a3cc790bec343131a2a2718ee

See more details on using hashes here.

File details

Details for the file tibs-0.1.1-cp38-abi3-win_amd64.whl.

File metadata

  • Download URL: tibs-0.1.1-cp38-abi3-win_amd64.whl
  • Upload date:
  • Size: 309.8 kB
  • Tags: CPython 3.8+, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for tibs-0.1.1-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 85179aebcb38192d1fa616877970a0f78da6c2ba76ca6559a4b7643b6dab9e12
MD5 27db630bbb8a5fe57e5026f6112e43a6
BLAKE2b-256 66289f3ee137622bfec3a11e3ca0c28429f83d7c3ae1ad362eecf395bf859b13

See more details on using hashes here.

File details

Details for the file tibs-0.1.1-cp38-abi3-win32.whl.

File metadata

  • Download URL: tibs-0.1.1-cp38-abi3-win32.whl
  • Upload date:
  • Size: 287.8 kB
  • Tags: CPython 3.8+, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for tibs-0.1.1-cp38-abi3-win32.whl
Algorithm Hash digest
SHA256 9cd83190b56da2b01919e092f37694f988aa2cc77bf683b7ce9810cbef3a0b9d
MD5 2c97c620b77ac8b0ffc628a127b7e8fe
BLAKE2b-256 cbaef71658088bcea9db94ec97a6a4dbb8539f657db3e854a939ddf70366e4a4

See more details on using hashes here.

File details

Details for the file tibs-0.1.1-cp38-abi3-musllinux_1_2_x86_64.whl.

File metadata

  • Download URL: tibs-0.1.1-cp38-abi3-musllinux_1_2_x86_64.whl
  • Upload date:
  • Size: 507.1 kB
  • Tags: CPython 3.8+, musllinux: musl 1.2+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for tibs-0.1.1-cp38-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 e48ed6e6ac441664a8c1114a94e2d72db219230ddbc3ca97dbbe9e5b70ada709
MD5 f34e9725fb6438959cfed49d0b3be0fd
BLAKE2b-256 82f9c66ca8ead61f62959ea3505c591ad13ec1973c98f15344eefe9df179336a

See more details on using hashes here.

File details

Details for the file tibs-0.1.1-cp38-abi3-musllinux_1_2_ppc64le.whl.

File metadata

  • Download URL: tibs-0.1.1-cp38-abi3-musllinux_1_2_ppc64le.whl
  • Upload date:
  • Size: 493.7 kB
  • Tags: CPython 3.8+, musllinux: musl 1.2+ ppc64le
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for tibs-0.1.1-cp38-abi3-musllinux_1_2_ppc64le.whl
Algorithm Hash digest
SHA256 1cbc7b27c794c6f200aa31a08e03c62a0bec0c8038f66490667fcaa7331e9d6b
MD5 1f00393e4ba58725fde973a310bc08bc
BLAKE2b-256 d63f31cab14448ca4d2072f2f9c72cccbf5c800e7c01a08b7c5016e98cff2ec4

See more details on using hashes here.

File details

Details for the file tibs-0.1.1-cp38-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for tibs-0.1.1-cp38-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 01643b4148f54762d1b115c7f82f1bcacc4a05f61849b45f8e60e2cb97e9beda
MD5 60ef2139fc910df7a20fc715e5e8a067
BLAKE2b-256 ab9ca6c8c5fc19b0023e78f944cd3326992e155744ab31125f9cf418f6901f50

See more details on using hashes here.

File details

Details for the file tibs-0.1.1-cp38-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for tibs-0.1.1-cp38-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 f3c6ade7090934ff57621c08815ede3a8cf8ea49e8688aa8b8347071c136d0be
MD5 9394567405951d2497629f1a2c2464b0
BLAKE2b-256 1dd73582cae9ab250762bc896726d4c8f2191b89f6d9abda2afb60b7fd2ba334

See more details on using hashes here.

File details

Details for the file tibs-0.1.1-cp38-abi3-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl.

File metadata

File hashes

Hashes for tibs-0.1.1-cp38-abi3-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl
Algorithm Hash digest
SHA256 92165b4d06c5003cba2ea761aa9feb84c6c6958818afb567ae663f399f39dec5
MD5 22585633f617ba7d2e6c50bb40808801
BLAKE2b-256 4184be3e6ae1c7d5f69999ba3587f681b8b3fdb1c2ae8ebb714feabd10f77a1b

See more details on using hashes here.

File details

Details for the file tibs-0.1.1-cp38-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl.

File metadata

File hashes

Hashes for tibs-0.1.1-cp38-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 372952a08fead1e2067865b041eee6ab7b182bf19af2fa8d51b56d952d2f3085
MD5 1e95cb607842d451e0a2406cb9c002a6
BLAKE2b-256 f07f54e7b85ab1297d040d2d7239fec4a0559a92525c293d22b773bbf6d6ae1b

See more details on using hashes here.

File details

Details for the file tibs-0.1.1-cp38-abi3-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl.

File metadata

File hashes

Hashes for tibs-0.1.1-cp38-abi3-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl
Algorithm Hash digest
SHA256 5b352e3c90650cc4a4183fad349dc6e293eb03cc841b5bc8c0cb8113129e2184
MD5 071abf6e1d647c9321f43b2387b89c80
BLAKE2b-256 44c6669193eeb36d3062fa037acd67780ea7f214523c7c1a9c1ebb018b709e48

See more details on using hashes here.

File details

Details for the file tibs-0.1.1-cp38-abi3-macosx_11_0_arm64.whl.

File metadata

  • Download URL: tibs-0.1.1-cp38-abi3-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 382.2 kB
  • Tags: CPython 3.8+, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for tibs-0.1.1-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6165620088bbc4f7be2e261a103310e6723c22ef8b1eb0600d5e0c68c6bcf9b5
MD5 675963b70a6432ece8b96bd3c089567b
BLAKE2b-256 a6ba6ef1d059221282b04507325901dfc6d98f85b5680372f984af40b54e66d5

See more details on using hashes here.

File details

Details for the file tibs-0.1.1-cp38-abi3-macosx_10_12_x86_64.whl.

File metadata

  • Download URL: tibs-0.1.1-cp38-abi3-macosx_10_12_x86_64.whl
  • Upload date:
  • Size: 414.7 kB
  • Tags: CPython 3.8+, macOS 10.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for tibs-0.1.1-cp38-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 287e9b83e6eb673749ce8c1d3b3cda8423c6a06ea2998117218e6e588f33fd03
MD5 d060591afe58cd6f6c62bc63eb5cae3f
BLAKE2b-256 d82a17fc61dc36c67932a16190bd630edf544e0ef7c8779c560a14a7341cdb98

See more details on using hashes here.

Supported by

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