Skip to main content

numtofi - Convert numbers to Finnish textual representation

numtofi is a Python module that offers functionality to convert integers into their Finnish textual representation. This module also comes with a command-line interface (CLI) tool to quickly get the Finnish representation for any number from the command line.

Installation

pip install numtofi

Usage

As a Python Module

from numtofi import number_to_text

print(number_to_text(45))  # Outputs "neljäkymmentäviisi"

Command-Line Interface (CLI)

After installation, you can use the numtofi command directly from your terminal:

$ numtofi 45
neljäkymmentäviisi

$ numtofi 5000000
viisi miljoonaa

$ numtofi 5000000 --nospaces
viisimiljoonaa

$ numtofi 5000000 --length
15

Parameters

  • number_to_text(n, spaces=False):

    • n (int): The number to convert.
    • spaces (bool): If False, removes spaces between words. Default is True.
  • number_to_text_length(n, spaces=False):

    • n (int): The number to the length of the textual representation.
    • spaces (bool): If False, removes spaces between words. Default is True.

Testing

Tests are provided in the tests directory. To run the tests:

  1. Navigate to the project root directory.
  2. Run:
python -m unittest discover tests

Update PYPI package

python setup.py sdist bdist_wheel
python -m twine upload dist/*

Contributing

Contributions are welcome! Please make sure to update tests as appropriate when proposing changes.

License

MIT

Metadata

Release files for numtofi 0.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for numtofi 0.8
File Size Uploaded Provenance
numtofi-0.8.tar.gz 6.7 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for numtofi 0.8
File Interpreter ABI Platform
numtofi-0.8-py3-none-any.whl Python 3 none any Details

Total release size: 14.5 kB

Release files / numtofi-0.8.tar.gz

Download URL numtofi-0.8.tar.gz
Size 6.7 kB
Tags Source
SHA-256 checksum
How to use checksums
f3ee6ca35ddf8e54bccd285e5fcc5bb9d1bef43d7e1513c03458f0d4f0cf2e49
BLAKE2b-256 checksum
How to use checksums
402aa4d4608d51a018e24e9ae67fe0214ffd5f928fe5e0a8d8600975d9d2bb08
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.11

Release files / numtofi-0.8-py3-none-any.whl

Download URL numtofi-0.8-py3-none-any.whl
Size 7.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e6594d49ff87e1e16bf6d2b49d6f639086482147dbb274c6f4c647d506e6ed91
BLAKE2b-256 checksum
How to use checksums
1b5eb04df279fdd212b47c935b8bb2583d7cdf27b645bb9a82b0ea3e44d68949
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.11

Security for numtofi 0.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page