Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

roman

Package Overview
Dependencies
Maintainers
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

roman

Integer to Roman numerals converter

  • 4.2
  • PyPI
  • Socket score

Maintainers
12

.. image:: https://travis-ci.com/zopefoundation/roman.svg?branch=master :target: https://travis-ci.com/zopefoundation/roman

.. 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

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)

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.

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc