Socket
Socket
Sign inDemoInstall

prettynum

Package Overview
Dependencies
0
Maintainers
1
Alerts
File Explorer

Install Socket

Protect your apps from supply chain attacks

Install

prettynum

Simple number formatting for python

    0.1.0

Maintainers
1

Readme

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'

Keywords

FAQs


Did you know?

Socket installs a GitHub app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc