Skip to main content

A Python class for handling integers in arbitrary bases.

Project description

baseint

BaseInt is a small Python library for converting numbers in arbitrary bases.

Features

  • Create BaseInt instances from integers, strings, lists and tuples.
  • Convert between bases easily.
  • Supports custom character maps.

Example

from baseint import BaseInt

b = BaseInt("1111", 2)
print(b.toDecimal())        # 15
print(f"{b.sconvert(8)!r}") # BI:8:17

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

baseint-0.0.1.tar.gz (2.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

baseint-0.0.1-py3-none-any.whl (2.5 kB view details)

Uploaded Python 3

File details

Details for the file baseint-0.0.1.tar.gz.

File metadata

  • Download URL: baseint-0.0.1.tar.gz
  • Upload date:
  • Size: 2.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.2

File hashes

Hashes for baseint-0.0.1.tar.gz
Algorithm Hash digest
SHA256 6693d3c007541f1ff766b750b9d47f69c93120ea2aba80dc1ab5bd491e02d779
MD5 4cc28727ba813c187e293fc51311cc05
BLAKE2b-256 1be9b0e9cedc81645ed312a819b440238a43835081b040f998ba88450776831d

See more details on using hashes here.

File details

Details for the file baseint-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: baseint-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 2.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.2

File hashes

Hashes for baseint-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 95fdce0e0a34bba9621ff6ea88373e4c720d46610838c77dcd708f1fde775b4f
MD5 1da4e0b06d46b50a94891784d39afadb
BLAKE2b-256 5d49e5e5d7c0e55db709d3cf3317bf18d8dd727c2755b1f3b7a31ccf7cce1014

See more details on using hashes here.

Supported by

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