Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

A base32 encoding with a sorted-order alphabet

Project Description

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:


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.


Encoding and decoding:

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


>>> from dbase32 import isdb32, check_db32
>>> isdb32('../very/naughty/')
>>> 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()
>>> random_id()

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 History

This version
History Node


History Node


History Node


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
(60.4 kB) Copy SHA256 Hash SHA256
Source None May 28, 2016

Supported By

Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Google Google Cloud Servers DreamHost DreamHost Log Hosting