Skip to main content

The Dbase32 encoding is a base32 variant designed for document-oriented databases, specifically for encoding document IDs.

It uses an alphabet whose symbols are in ASCII/UTF-8 sorted order:

3456789ABCDEFGHIJKLMNOPQRSTUVWXY

This means that unlike RFC-3548 Base32 encoding, the sort-order of the encoded data will match the sort-order of the binary data.

The dbase32 package provides a high-performance C implementation of the encoding, plus a pure-Python fallback.

Dbase32 is licensed LGPLv3+, requires Python 3.4 or newer, and fully supports Python 3.5.

Examples

Encoding and decoding:

>>> from dbase32 import db32enc, db32dec
>>> db32enc(b'binary foo')
'FCNPVRELI7J9FUUI'
>>> db32dec('FCNPVRELI7J9FUUI')
b'binary foo'

Validation:

>>> from dbase32 import isdb32, check_db32
>>> isdb32('../very/naughty/')
False
>>> check_db32('../very/naughty/')
Traceback (most recent call last):
  ...
ValueError: invalid Dbase32: '../very/naughty/'

Generating 120-bit Dbase32-encoded random IDs:

>>> from dbase32 import random_id
>>> random_id()
'FOLQCPOFDVADYMVGQDI49Y7F'
>>> random_id()
'IFL63RNSQ9NN5ANMUQD6BQSJ'

Dbase32 resources

A Novacut component

Dbase32 is being developed as part of the Novacut project. Packages are available for Ubuntu in the Novacut Stable Releases PPA and the Novacut Daily Builds PPA.

If you have questions or need help getting started with Dbase32, please stop by the #novacut IRC channel on freenode.

Release files for dbase32 1.7.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 dbase32 1.7.0
File Size Uploaded
dbase32-1.7.0.tar.gz 60.4 kB Details

Release files / dbase32-1.7.0.tar.gz

Download URL dbase32-1.7.0.tar.gz
Size 60.4 kB
Tags Source
SHA-256 checksum
How to use checksums
99db0122fdc5a5867111350cd4b452378a7fd1acb2faf142acd1029ed51b4efc
BLAKE2b-256 checksum
How to use checksums
ccd95d817ac8a03526680e36a5db4fba2612f0ecbfb7e859c060b11b42c4b91f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

1.7.0 This release

1 release file

1.6.1

1 release file

1.5.1

1 release file

1.4.0

1 release file

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