
Security News
Node.js Moves Toward Stable TypeScript Support with Amaro 1.0
Amaro 1.0 lays the groundwork for stable TypeScript support in Node.js, bringing official .ts loading closer to reality.
A light-weight utility library for formatting numbers, currencies, dates, units, and more.
NumT is a powerful Python utility library for formatting numbers, currencies, dates, units, and more. It provides a simple and consistent interface for handling various numerical formatting needs.
NumT is available on PyPI and can be installed using pip:
pip install numt
Or using Poetry:
poetry add numt
from numt import format_currency
# Western format (default)
print(format_currency(1234567.89)) # $1,234,567.89
# Indian format
print(format_currency(1234567.89, format_type="indian")) # ₹12,34,567.89
# Continental format
print(format_currency(1234567.89, format_type="continental")) # €1.234.567,89
# Swiss format
print(format_currency(1234567.89, format_type="swiss")) # CHF 1'234'567.89
from numt import convert_si, Length, Mass, Time
# Length conversions
length = Length(1500, "m")
print(length.format()) # 1.50 km
# Mass conversions
mass = Mass(0.5, "kg")
print(mass.format()) # 500.00 g
# Time conversions
time = Time(3660, "s")
print(time.format()) # 1.02 h
# Direct conversion
result = convert_si(1000, "m", "km", "length")
print(result) # 1.0
from numt import to_words
# Short format
print(to_words(1234567)) # 1.23 M
print(to_words(1234567, format_type="long")) # 1.23 million
# With precision
print(to_words(1234567, precision=1)) # 1.2 M
# Strip zero cents
print(to_words(1000.00, strip_zero_cents=True)) # 1 K
git clone https://github.com/yourusername/numt.git
cd numt
poetry install
poetry run pre-commit install
poetry run pytest
poetry build
We welcome contributions! Please see our Contributing Guidelines for details on how to submit pull requests, report issues, and suggest improvements.
Please read our Code of Conduct to keep our community approachable and respectable.
This project is licensed under the terms of the LICENSE file.
See the CHANGELOG.md file for a list of changes between versions.
FAQs
A light-weight utility library for formatting numbers, currencies, dates, units, and more.
We found that numt demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Amaro 1.0 lays the groundwork for stable TypeScript support in Node.js, bringing official .ts loading closer to reality.
Research
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.
Product
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.