Skip to main content

manchester-code

Code style: black CI Pipeline Status Last Release Compatible Python Versions DOI

Python library to encode & decode data as Manchester code

Setup

$ pip3 install --user --upgrade manchester-code

Usage

0-bits translate to low-high, 1-bits to high-low (G. E. Thomas convention).

import manchester-code

manchester_code = encode([0b00001111, 0b01101001])
print(''.join(['{:08b}'.format(m) for m in manchester_code]))
# 01010101101010100110100110010110

encode(b'msg')
# b'i\xa6jZij'

decode([0b01010101, 0b10101010, 0b01101001, 0b10010110])
# 0000111101101001

decode(b'ieiVjeiV')
# b'data'

Metadata

Release files for manchester-code 1.1.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 manchester-code 1.1.0
File Size Uploaded Provenance Actions
manchester-code-1.1.0.tar.gz 27.5 kB Without provenance Details for manchester-code-1.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for manchester-code 1.1.0
File Interpreter ABI Platform Actions
manchester_code-1.1.0-py3-none-any.whl Python 3 none any Details for manchester_code-1.1.0-py3-none-any.whl

Total release size: 43.3 kB

Release files / manchester-code-1.1.0.tar.gz

Download URL manchester-code-1.1.0.tar.gz
Size 27.5 kB
Tags Source
SHA-256 checksum
How to use checksums
e8b09dd45785233359de02cc1baf2747af7993a6335099ca3c6784d21f184e54
BLAKE2b-256 checksum
How to use checksums
ba6c7e8d4e9113e10fb931d0cfa28edc878cbd634d40129465d75dd7edbfe0d4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.5

Release files / manchester_code-1.1.0-py3-none-any.whl

Download URL manchester_code-1.1.0-py3-none-any.whl
Size 15.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
23251eed4c91f42b8f05dd7e1cc4c97b895d9f7ad8dadaa0162b75680e282d37
BLAKE2b-256 checksum
How to use checksums
0102c9601fa2e9b87ea76de751838c5fd09cac61deee014c7256b9592a1cc7c2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.5

Security for manchester-code 1.1.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