Metadata-Version: 2.4
Name: roman
Version: 5.2
Summary: Integer to Roman numerals converter
Home-page: https://github.com/zopefoundation/roman
Author: Mark Pilgrim
Maintainer: Zope Foundation and Contributors
Maintainer-email: zope-dev@zope.dev
License: ZPL-2.1
Keywords: roman
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: License :: OSI Approved :: Zope Public License
Classifier: Programming Language :: Python
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Requires-Python: >=3.10
Description-Content-Type: text/x-rst
License-File: LICENSE.txt
Dynamic: author
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: license
Dynamic: license-file
Dynamic: maintainer
Dynamic: maintainer-email
Dynamic: requires-python
Dynamic: summary

.. image:: https://github.com/zopefoundation/roman/actions/workflows/tests.yml/badge.svg
    :target: https://github.com/zopefoundation/roman/actions/workflows/tests.yml

.. image:: https://coveralls.io/repos/github/zopefoundation/roman/badge.svg?branch=master
    :target: https://coveralls.io/github/zopefoundation/roman?branch=master

.. image:: https://img.shields.io/pypi/v/roman.svg
    :target: https://pypi.org/project/roman/
    :alt: Current version on PyPI

.. image:: https://img.shields.io/pypi/pyversions/roman.svg
    :target: https://pypi.org/project/roman/
    :alt: 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

.. code-block:: python

    import roman

    # to roman
    number = int(input('> ')) # 10
    print(roman.toRoman(number))

    # from roman
    number = input('> ') # X
    print(roman.fromRoman(number))


2. ``roman`` CLI command

.. code-block:: bash

    ~$ roman 972
    CMLXXII
    # use the -r/--reverse to convert Roman numerals
    ~$ roman -r CMLXXII
    972
    # case insensitive
    ~$ roman -r cMlxxii
    972



Change log
==========

5.2 (2025-11-11)
----------------

- Add support for Python 3.14.

- Drop support for Python 3.9.

5.1 (2025-07-18)
----------------

- Hide undocumented special behavior for ``N`` behind method parameter.
  (`#30 <https://github.com/zopefoundation/roman/issues/30>`_)


5.0 (2025-01-15)
----------------

- Drop support for Python 3.7, 3.8.

- Add support for lower case roman numerals.
  (`#22 <https://github.com/zopefoundation/roman/pull/22>`_)


4.2 (2024-04-25)
----------------

- Remove overlooked mentions of the Python 2.1.1 license
  (`#17 <https://github.com/zopefoundation/roman/issues/17>`_)

- Add support for Python 3.12 and 3.13.


4.1 (2023-05-26)
----------------

- Change license to the Zope Public License (ZPL) version 2.1
  (`#15 <https://github.com/zopefoundation/roman/issues/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)
----------------

- expanded test coverage

- Added support for 0 -> N
  (see https://en.wikipedia.org/wiki/Roman_numerals#Zero)

- Added support for Python 3.8


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.
