A simple Python package for converting numbers to words (letters).
Project description
num2ltr
num2ltr is a simple Python package for converting numbers to words (letters).
It uses Spanish standard nomenclature, which means that most Spanish grammar rules are applied.
This package is still under testing, so you may experience inconsistencies.
This is also a personal project to improve my programming skills.
Installation
Use the package manager pip to install num2ltr.
pip install num2ltr
Or you can use the test package
pip install -i https://test.pypi.org/simple/ num2ltr
Usage
import num2ltr
# returns 'treinta y tres'
num2ltr.number_to_letters('33') # input must be a numeric string
Or you can use
from num2ltr import number_to_letters
# returns 'treinta y tres'
number_to_letters('33') # input must be a numeric string
Features
- Converts numeric strings to Spanish words
- Supports numbers up to 15 digits (for now)
Limitations
- No decimal support yet
- No negative numbers
- No scientific notation
Roadmap
- Decimal number support
- Negative numbers
- Support for larger numbers (up to 50 digits)
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to add or change.
Please make sure to update tests as appropriate.
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file num2ltr-1.0.tar.gz.
File metadata
- Download URL: num2ltr-1.0.tar.gz
- Upload date:
- Size: 8.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
42eaacce05edc299494541c70ca2e22d918bf63eb78f08c73bf5ab565e6ec141
|
|
| MD5 |
c53f03577faf082ae47894da2da2a3b3
|
|
| BLAKE2b-256 |
a21a767aef8bb64d1f9b2217d8ea70f58772c2cbb8eede6432608c2d10aad6d9
|
File details
Details for the file num2ltr-1.0-py3-none-any.whl.
File metadata
- Download URL: num2ltr-1.0-py3-none-any.whl
- Upload date:
- Size: 5.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
20ba38214a9852fe4f931d796ff4e96a459f3ea6f3b40b6269e8affc67e5d627
|
|
| MD5 |
17757801170edb7383a470ea228f4c68
|
|
| BLAKE2b-256 |
5bbcbfc0e025427295d8bf9489a7f90ea824e739b9c2b405004170557d4b574a
|