Skip to main content

Convert integers into long-form -illion notation (million, billion, ...)

Project description

pyillion

PyPI Python License Wheel Status

Convert integers into long-form -illion notation
(million, billion, trillion, …) with high precision and simplicity.


✨ Features

  • 🔢 Convert large integers to human-readable illion format
  • ⚡ Lightweight, zero dependencies
  • 🧮 Custom decimal precision
  • 🧠 Simple and explicit API
  • 📦 Clean src-layout, PyPI-ready

📦 Installation

pip install pyillion

🚀 Quick Start

from pyillion import illionify

print(illionify(1234567890))
# 1.234 billion

With custom precision:

print(illionify(1234567890, r=4))
# 1.2345 billion

🧩 API Reference

illionify(n: int, r: int = 3) -> str

Turn a number into long-form -illion notation.

illionify(9876543210)
# '9.876 billion'

il(n: int, bl: bool = False)

Return the -illion name corresponding to n.

il(7)
# 'sextillion'

il(7, bl=True)
# 1000 ** 7

e(n: int)

Return 1000 ** n.

e(4)
# 1000000000000

d(a, b, r: int = 3)

Safe division with fixed decimal precision.

d(215, 11, 4)
# 19.5454

📁 Project Structure

pyillion/
├─ src/
│  └─ pyillion/
│     ├─ __init__.py
│     └─ illionifyer.py
├─ pyproject.toml
├─ README.md
└─ LICENSE

🧪 Supported Python Versions

  • Python 3.8+
  • Tested on 3.13 / 3.14

📜 License

This project is licensed under the MIT License.
See LICENSE for details.


🌐 Links


⭐ Why pyillion?

If you need:

  • deterministic formatting
  • full control over -illion logic
  • no hidden heuristics like humanize

pyillion is for you.

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

pyillion-1.1.0.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

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

pyillion-1.1.0-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file pyillion-1.1.0.tar.gz.

File metadata

  • Download URL: pyillion-1.1.0.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for pyillion-1.1.0.tar.gz
Algorithm Hash digest
SHA256 3d0626d0759a14b56fc1a711b5f5041dbc9deadc3779eeccf145aec166ce8e60
MD5 e8fa1a07470c59ea1597434b96555b79
BLAKE2b-256 5b1a31a3725d93cd9c0945b57ebe0a5d2fddb0f0664b58582aa8fb65d12c6a5b

See more details on using hashes here.

File details

Details for the file pyillion-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: pyillion-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for pyillion-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2db912b835c530747f410a4dcb7aa652c804ccf3abb3673d8dcc92a32f757fb4
MD5 4d0eff2a72c36fba24550fd76e7b33a3
BLAKE2b-256 b66eb1e7799dd8ef274f6c04fba4a4082ec315460a4430ecb297c6efa1051ba8

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