numconv

numconv is a library that converts strings to numbers and numbers to strings using default or user supplied encoding alphabets, written by Gustavo Picón and licensed under the Apache License 2.0.

Installation

numconv has been tested in Python 2.4, 2.5, 2.6, 2.7, 3.0, 3.1, 3.2, PyPy 1.4 and Jython 2.5. Other versions may work but are not supported.

You have several ways to install numconv. If you’re not sure, just use pip

pip (or easy_install)

You can install the release versions from numconv’s PyPI page using pip:

pip install numconv

or if for some reason you can’t use pip, you can try easy_install:

easy_install --always-unzip numconv

setup.py

Download a release from the numconv download page and unpack it, then run:

python setup.py install

API

numconv.BASE85

Alphabet defined in section 4 of RFC 1924. Supposed to be a joke (it is an April’s fools RFC after all), but is quite useful because it can be used as a base for the most common numeric conversions.

numconv.BASE16
numconv.BASE32
numconv.BASE32HEX
numconv.BASE64
numconv.BASE64URL

Alphabets defined in RFC 4648. Not really for common numeric conversion use.

numconv.BASE62

Useful for URL shorteners.

Indices and tables