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

Uploaded Source

Built Distribution

roman-4.0-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: roman-4.0.tar.gz
  • Upload date:
  • Size: 9.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for roman-4.0.tar.gz
Algorithm Hash digest
SHA256 6caab7ba51b83c46b5bf8839e5d782769a6b08fdea8abdfa62a4197c041fd513
MD5 031b8ebc970ca5502fb43722e19c0f3f
BLAKE2b-256 b0b3dc50a14f2d06e19340dcee6eabbc95904b6d4014f8f2d22c6338c1b5d31c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: roman-4.0-py3-none-any.whl
  • Upload date:
  • Size: 7.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for roman-4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8b8eefb6dedfdfebd789547e49a1274c12aae5a32b43911994f22e276a7b8c8b
MD5 cad76065f0a434abb630a5af26fa0057
BLAKE2b-256 22d1b5857875bef234df693d3ca2f2f1df455ed20692845d0f09b4e8b9515c24

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