Skip to main content

Integer to Roman numerals converter

Project description

https://travis-ci.com/zopefoundation/roman.svg?branch=master 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

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-4.2.tar.gz (7.3 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: roman-4.2.tar.gz
  • Upload date:
  • Size: 7.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.7

File hashes

Hashes for roman-4.2.tar.gz
Algorithm Hash digest
SHA256 05f335a1b2b0824f827ed42fff84b35909aab9013799145ed4508bdd4fa3b385
MD5 10b78af7bc8205b103d9463a6e918f69
BLAKE2b-256 2dbe4fa4fbe13def6194e76270bd213d8924346e0a30be8e006d898359db1a00

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for roman-4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 dc3564330fba3cd06b108edc694500609830169e3479706eb1ee7f0c197e4b6c
MD5 7fb69b8d1fd01adde76f3b983b9c0927
BLAKE2b-256 87e79206aa493875e116272aa71d152c6ea1570cad7395a904fea11050a47fbd

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 Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page