Skip to main content

Integer to Roman numerals converter

Project description

https://github.com/zopefoundation/roman/actions/workflows/tests.yml/badge.svg https://coveralls.io/repos/github/zopefoundation/roman/badge.svg?branch=master Current version on PyPI Supported Python versions

roman

Small helper library to convert arabic to roman numerals.

There are two ways to use this library.

  1. Importing it into your application

import roman

# to roman
number = int(input('> ')) # 10
print(roman.toRoman(number))

# from roman
number = input('> ') # X
print(roman.fromRoman(number))
  1. roman CLI command

~$ roman 972
CMLXXII
# use the -r/--reverse to convert Roman numerals
~$ roman -r CMLXXII
972
# case insensitive
~$ roman -r cMlxxii
972

Change log

5.0 (2025-01-15)

  • Drop support for Python 3.7, 3.8.

  • Add support for lower case roman numerals. (#22)

4.2 (2024-04-25)

  • Remove overlooked mentions of the Python 2.1.1 license (#17)

  • Add support for Python 3.12 and 3.13.

4.1 (2023-05-26)

  • Change license to the Zope Public License (ZPL) version 2.1 (#15)

4.0 (2023-02-28)

  • Add support for Python 3.10, 3.11.

  • Drop support for Python 2.7, 3.5, 3.6.

3.3 (2020-07-12)

  • added support for Python 3.9

  • added CLI command roman with -r/--reverse to convert back from Roman

  • added simple usage instructions

3.2 (2019-04-14)

3.1 (2018-10-24)

  • Added support for Python 3.7.

3.0 (2018-05-28)

  • Added support for Python 3.5, 3.6 and PyPy3.

  • Dropped support for Python 2.6 and 3.3.

2.0.0 (2013-02-25)

  • Added Python 3.3 and PyPy support.

  • Added tests.

1.4.0 (2009-07-23)

  • Initial PyPI release.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

roman-5.0.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

roman-5.0-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file roman-5.0.tar.gz.

File metadata

  • Download URL: roman-5.0.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.11

File hashes

Hashes for roman-5.0.tar.gz
Algorithm Hash digest
SHA256 cb35293c1c4046105fd899194f4f2985f78c955a8b05937f7ab93f3be1660697
MD5 7318d82e5764e4818d2d8f060d44f0a2
BLAKE2b-256 8549b01cf3c88006005613234cfc78b2e371adc3b55fe125641679bca46963f9

See more details on using hashes here.

File details

Details for the file roman-5.0-py3-none-any.whl.

File metadata

  • Download URL: roman-5.0-py3-none-any.whl
  • Upload date:
  • Size: 5.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.11

File hashes

Hashes for roman-5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6e1246c0aa9338aa5603e8bf4960f76d5047be1878d8d1ceb0d2c452b5b890e2
MD5 9683e717c89c3b1bdbe981ff150ade59
BLAKE2b-256 a2c034a98c0bdf3e5846ed5fea15c0a20fae0ad95478013f7582e807da0f7cb5

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page