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
manchester-code-1.1.0.tar.gz 27.5 kB Details

Built distribution (wheel)

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

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

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files

1.0.1

2 release files

1.0.0

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