Skip to main content
Join the official 2020 Python Developers SurveyStart the survey!

Integer to Roman numerals converter

Project description

https://travis-ci.org/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 conver Roman numerals
~$ roman -r CMLXXII
972
# case insensitive
~$ roman -r cMlxxii
972

Change log

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.

Files for roman, version 3.3
Filename, size File type Python version Upload date Hashes
Filename, size roman-3.3-py2.py3-none-any.whl (3.9 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size roman-3.3.tar.gz (7.6 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page