Skip to main content

Bubble Babble Binary Data Encoding

Project description

# bubblepy
Bubble Babble Binary Data Encoding - Python library

See for details.

Original Copyright 2011 BohwaZ -
Copyleft 2015 europa -
Copyright 2016 zefciu -

Based on :
- Bubble Babble spec:
- Nitrxgen PHP script:
- Bubble Babble encoder for Go:
- Bubble Babble class for PHP:


>>> from bubblepy import BubbleBabble
>>> # Encoding simple ASCII strings
>>> bb = BubbleBabble()
>>> bb.encode('Pineapple')
>>> bb.decode('xigak-nyryk-humil-bosek-sonax')
>>> # To encode non-ASCI data you must encode to bytestring
>>> bb.encode('Pchnąć w tę łódź jeża lub ośm skrzyń fig')
Traceback (most recent call last):
ValueError: Non-ASCII character found. Encode your data
>>> bb.encode('Pchnąć w tę łódź jeża lub ośm skrzyń fig'.encode('utf-8'))
>>> bb.decode('xikik-cocor-subur-fucam-dycem-lymyk-lecyn-nacen-riras-gycud-bepak-cicur-pocym-gyxex').decode('utf-8')
'Zażółć gęślą jaźń'
>>> # You can use Bubble Babble to encode e.g. uuids
>>> import uuid
>>> u1 = uuid.uuid4()
>>> bb.encode(u1.bytes)
>>> u2 = uuid.UUID(bytes=bb.decode('xezeg-tetor-pybyt-vuboc-gapop-boceg-todup-banyk-voxux'))
>>> u1 == u2
>>> # The default alphabet can be overridden
>>> # Consonants should be 17-letter long and vowels 6-letter long
>>> bb2 = BubbleBabble(consonants=u'бгджзклмнпрстфхцч', vowels=u'аиоуыэ')
>>> bb2.encode(b'0123456789')

Project details

Release history Release notifications

This version
History Node


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
bubblepy-1.0-py3-none-any.whl (5.4 kB) Copy SHA256 hash SHA256 Wheel py3
bubblepy-1.0.tar.bz2 (3.9 kB) Copy SHA256 hash SHA256 Source None (7.1 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page