Skip to main content

Simple number formatting for python

Project description

prettynum

Simple number formatting for python inspired by the scales package in R. prettynum is lightweight and has not third party library dependencies.

Installation

pip install prettynum

Usage

>>> from prettynum import comma, dollar
>>> comma(1000)
'1,000'
>>> comma(1000, 3)
'1,000.000'
>>> comma(1000.89, 1)
'1,000.9'
>>> dollar(1000)
'$1,000'
>>> dollar(1000, 3)
'$1,000.000'
>>> dollar(1000.89, 1)
'$1,000.9'

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

prettynum-0.1.0.tar.gz (2.7 kB view details)

Uploaded Source

Built Distribution

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

prettynum-0.1.0-py3-none-any.whl (3.0 kB view details)

Uploaded Python 3

File details

Details for the file prettynum-0.1.0.tar.gz.

File metadata

  • Download URL: prettynum-0.1.0.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.9.1 Windows/10

File hashes

Hashes for prettynum-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a1f5def1d538c5dc5bc1dc75dece1f12530729fee60864772df7fe7e3f82c6ab
MD5 1c40c494d6b58df56fd4d5c91d050862
BLAKE2b-256 4e20cbd2678e6af3f31025725d430707c354a3a2ff148f558b6af0c647ca5e29

See more details on using hashes here.

File details

Details for the file prettynum-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: prettynum-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.9.1 Windows/10

File hashes

Hashes for prettynum-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0a0e1cf6981bddafb0a4884c232fe9d389d8b3cc95a9b1e35f244e000f8d09c7
MD5 c7bf302595cfcfbd947adb1fa2d4a6a2
BLAKE2b-256 058ba1b28618230c1001897e00b268d45e0da8d9d2dfd6dc0f8192a61ca18e7b

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