Skip to main content

A lightweight Python library for encoding and decoding numbers between base10 and base36.

Project description

base36py

base36py is a lightweight Python library for encoding and decoding numbers between base10 and base36. It provides functions to convert both integer and floating-point numbers to base36 strings and vice versa, supporting precise fractional conversions.

Features

  • Convert integers to base36 strings.
  • Convert floating-point numbers to base36 strings with adjustable precision.
  • Decode base36 strings back to integers or floating-point numbers.
  • Easy to use and integrate into existing projects.

Installation

You can install base36py via pip:

pip install base36py

Usage

from base36py import encode, decode

encoded = encode(1234.5678, precision=8)
print("Encoded:", encoded)
decoded = decode(encoded, precision=8)
print("Decoded:", decoded)

Project details


Download files

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

Source Distribution

base36py-0.2.0.tar.gz (3.1 kB view details)

Uploaded Source

File details

Details for the file base36py-0.2.0.tar.gz.

File metadata

  • Download URL: base36py-0.2.0.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.11.8

File hashes

Hashes for base36py-0.2.0.tar.gz
Algorithm Hash digest
SHA256 28129fc6b886ced5e6b88c634e703238e79d1975baca25b3cd3f4cd238c32c4e
MD5 921d108cf9fcfd494c859025551c22f4
BLAKE2b-256 0e00fbd6989ab2f62d0c37fd32efb45c1efd680ba48707c3996a6dd2032a3af6

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page