/rom

Roman numeral conversion in Python

Primary LanguagePythonApache License 2.0Apache-2.0

rom

PyPI

This is a basic Roman numeral manipulation library written in Python.

It is capable of parsing Arabic numerals into Roman numerals, as well as generating Roman numerals from Arabic numerals.

Installation

pip3 install gnboorse-rom

Usage

>>> from rom import rom
>>> rom(12)
XII
>>> int(rom(12))
12
>>> int(rom('xlvi'))
46
>>> rom('XLVI', caps=False)
xlvi