Skip to main content

summa-propisyu

Money amounts in words for invoices, contracts and receipts, in five languages: Russian, Ukrainian, Lithuanian, English and French. No dependencies.

pip install summa-propisyu
from summa_propisyu import amount_in_words

amount_in_words(1521.40, "RUB", lang="ru")
# 'Одна тысяча пятьсот двадцать один рубль 40 копеек'

amount_in_words(22.02, "UAH", lang="uk")
# 'Двадцять дві гривні 02 копійки'

amount_in_words(21.21, "KZT", lang="ru")
# 'Двадцать один тенге 21 тиын'

amount_in_words(12.11, "EUR", lang="lt")
# 'Dvylika eurų 11 centų'

amount_in_words(1000000, "EUR", lang="fr")
# "Un million d'euros et 00 centimes"

Why another one

Spelling out a number is the easy part. The hard part in an invoice is the currency name next to it, because it has to agree with the number:

Amount Russian Ukrainian Lithuanian
1 один рубль, одна гривна одна гривня, одне євро vienas euras, viena grivina
2 два рубля, две гривны дві гривні, два євро du eurai, dvi grivinos
5 пять рублей, пять гривен п'ять гривень penki eurai
11 одиннадцать рублей одинадцять гривень vienuolika eurų
21 двадцать один рубль двадцять одна гривня dvidešimt vienas euras

Gender changes the number itself (один / одна, du / dvi), and there are three plural forms, not two. Tenge and euro do not change in Russian at all. French needs "un million **d'**euros" but "un million deux euros", and "quatre-vingts euros" but "quatre-vingt-un euros". All of this is handled.

Currencies

EUR, USD, GBP, PLN, UAH, RUB, BYN, KZT in every language.

Options

amount_in_words(amount, currency="RUB", lang="ru",
                minor="digits",    # "digits": 40 копеек, "words": сорок копеек, "none": whole units only
                capitalize=True)   # first letter in upper case

amount can be int, float, str or Decimal. It is rounded half up to two decimals, so "99.995" becomes 100.00.

Numbers without currency:

from summa_propisyu import number_in_words

number_in_words(2, "ru", gender="f")   # 'две'
number_in_words(2000, "uk")            # 'дві тисячі'
number_in_words(91, "fr")              # 'quatre-vingt-onze'

Range: up to 999 999 999 999 999 in both directions.

Checked against num2words

Plain number words in all five languages match num2words on 8 000 values (0 to 3 000 and 5 000 random numbers up to 10^14). Lithuanian uses the document style "vienas šimtas", "vienas tūkstantis", as num2words does.

Online version

An online converter with the same languages and currencies is at utilixi.com:

Language Converter
Русский Сумма прописью онлайн
Українська Сума прописом онлайн
Lietuvių Suma žodžiais
English Number to words
Français Nombre en lettres

License

MIT

Metadata

Release files for summa-propisyu 0.1.0

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

Source distribution (sdist)

Source distribution for summa-propisyu 0.1.0
File Size Uploaded Provenance Actions
summa_propisyu-0.1.0.tar.gz 8.9 kB Without provenance Details for summa_propisyu-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for summa-propisyu 0.1.0
File Interpreter ABI Platform Actions
summa_propisyu-0.1.0-py3-none-any.whl Python 3 none any Details for summa_propisyu-0.1.0-py3-none-any.whl

Total release size: 19.4 kB

Release files / summa_propisyu-0.1.0.tar.gz

Download URL summa_propisyu-0.1.0.tar.gz
Size 8.9 kB
Tags Source
SHA-256 checksum
How to use checksums
9a28b92d782141b9857c5f9bc6763d099ca65e16b6b4da1fafd54d9312c19ac3
BLAKE2b-256 checksum
How to use checksums
cb12ae860541cb1e0ee1ecc9019a3f4d586140ca15a4a78e86450e053159ed78
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Release files / summa_propisyu-0.1.0-py3-none-any.whl

Download URL summa_propisyu-0.1.0-py3-none-any.whl
Size 10.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
47f73234ba8fc8c8ef0270a394f039c550989b44a84a57c13fb2051a0cdd3301
BLAKE2b-256 checksum
How to use checksums
02f086ac6598d05ce36010bf2bcadabc9e159fa51811106cfbcf4a08d5b623c8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Security for summa-propisyu 0.1.0

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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