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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: roman-4.1.tar.gz
  • Upload date:
  • Size: 7.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.15

File hashes

Hashes for roman-4.1.tar.gz
Algorithm Hash digest
SHA256 4da8a200529a730822a27f1704b3ac70bc907141d3bc558115fb8e36af13b412
MD5 6bc937a03245abdfb5a71b67050425f9
BLAKE2b-256 320c10c242792e9c857d5d8df19780abec0f241c8a3d9631cccbce16d0f1c769

See more details on using hashes here.

File details

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

File metadata

  • Download URL: roman-4.1-py3-none-any.whl
  • Upload date:
  • Size: 5.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.15

File hashes

Hashes for roman-4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f131fd5eee3510f6173b825404eb97875a6c1925f73a2d7d48cfc67823a67c3c
MD5 309f20e43439e16e6adef935c2937df9
BLAKE2b-256 b3e7533d5082852a3e0001392b421172d1659a8dc81dad9c41d378adf891d689

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