Metadata-Version: 2.1
Name: prettynum
Version: 0.1.0
Summary: Simple number formatting for python
Home-page: https://github.com/SamEdwardes/prettynum
License: MIT
Keywords: python,formatting
Author: SamEdwardes
Author-email: edwardes.s@gmail.com
Requires-Python: >=3.5,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Project-URL: Repository, https://github.com/SamEdwardes/prettynum
Description-Content-Type: text/markdown

# prettynum

Simple number formatting for python inspired by the [scales](https://scales.r-lib.org/index.html) package in R. `prettynum` is lightweight and has not third party library dependencies.

- GitHub: [https://github.com/SamEdwardes/prettynum](https://github.com/SamEdwardes/prettynum)
- PyPi:  [https://pypi.org/project/prettynum/](https://pypi.org/project/prettynum/)

## Installation

```bash
pip install prettynum
```

## Usage

```python
>>> 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'
```

