Skip to main content

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.

Source Distribution

roman-3.3.tar.gz (7.6 kB view details)

Uploaded Source

Built Distribution

roman-3.3-py2.py3-none-any.whl (3.9 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: roman-3.3.tar.gz
  • Upload date:
  • Size: 7.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.5

File hashes

Hashes for roman-3.3.tar.gz
Algorithm Hash digest
SHA256 2c46ac8db827d34e4fa9ccc0577e7f0b0d84f16ffe112351bd4f1ec2eb12d73f
MD5 649afac3424097676a56235d0de13e44
BLAKE2b-256 49bc98ff27d555e8315fc572fb84cb72219322a4ea562ab776687c6fd45335c1

See more details on using hashes here.

File details

Details for the file roman-3.3-py2.py3-none-any.whl.

File metadata

  • Download URL: roman-3.3-py2.py3-none-any.whl
  • Upload date:
  • Size: 3.9 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.5

File hashes

Hashes for roman-3.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 c2a1f14ab47373aecc141edbcdd66595949c9d0ed932fe76bd547df1b55f7278
MD5 292a3f500fec356655da370cd1ed851d
BLAKE2b-256 c39e47df0bf47ccd7e9bbbf0a539ac86e45ded37c34dba544a0a2e5d01ce5f88

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