Skip to main content

Bitslice

Verilog-like bitslicing for Python.

Installation

Install the library from PyPI:

pip install bitslice

Quickstart

Bitslice is designed to behave as an integer value as much as possible. All operators defined on int should be supported.

Bitslice adds the ability to extract or set one or more bits of the value:

from bitslice import Bitslice
value = Bitslice(5, size=4)
value[3:1] - 1

Advanced features: slice aliasing

value = Bitslice(5, size=4)
value.add_alias('lower', start=0, end=1)
value.add_alias('upper', start=2, end=3)

value['lower'] == value[1:0]

See bitslice.py for more examples.

Metadata

Release files for bitslice 0.3.0

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

Source distribution (sdist)

Source distribution for bitslice 0.3.0
File Size Uploaded Provenance Actions
bitslice-0.3.0.tar.gz 4.4 kB Without provenance Details for bitslice-0.3.0.tar.gz

Built distribution (wheel)

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

Total release size: 9.1 kB

Release files / bitslice-0.3.0.tar.gz

Download URL bitslice-0.3.0.tar.gz
Size 4.4 kB
Tags Source
SHA-256 checksum
How to use checksums
57918d8828a673561013dff32c5dacb7619b33b6db543007088141d964817bfb
BLAKE2b-256 checksum
How to use checksums
b3f12bfd48d1247f7fd19647d9a1af59e41f533cc02f69bc8a3f50bff644b991
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.5 CPython/3.8.5 Linux/5.8.0-48-generic

Release files / bitslice-0.3.0-py3-none-any.whl

Download URL bitslice-0.3.0-py3-none-any.whl
Size 4.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
092a898746020be9b349110ec1507677bb0f489867020bffd9a858065e5b217a
BLAKE2b-256 checksum
How to use checksums
c0f97ab9937e208c66ea185ca0e59826c845901851f09989ac6207236c47d504
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.5 CPython/3.8.5 Linux/5.8.0-48-generic

Security for bitslice 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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