{"id":2755,"library":"roman-numerals-py","title":"roman-numerals-py","description":"This package provides utilities for manipulating well-formed Roman numerals. It is currently at version 4.1.0 and is explicitly deprecated. Users are advised to switch to the `roman-numerals` package instead. The project seems to follow the release cadence of the main `roman-numerals` library.","status":"deprecated","version":"4.1.0","language":"en","source_language":"en","source_url":"https://github.com/AA-Turner/roman-numerals/","tags":["roman numerals","conversion","deprecated","utility"],"install":[{"cmd":"pip install roman-numerals-py","lang":"bash","label":"Install deprecated package"},{"cmd":"pip install roman-numerals","lang":"bash","label":"Install recommended replacement"}],"dependencies":[{"reason":"As of version 4.0.0, `roman-numerals-py` is a meta-package that depends on `roman-numerals` and installs no modules itself. The core functionality is provided by `roman-numerals`.","package":"roman-numerals","optional":false}],"imports":[{"note":"The underlying library is named `roman-numerals`, which is the correct import path even for versions of `roman-numerals-py` prior to it becoming a meta-package. As of v4.0.0, `roman-numerals-py` is a meta-package for `roman-numerals`.","wrong":"from roman_numerals_py import RomanNumeral","symbol":"RomanNumeral","correct":"from roman_numerals import RomanNumeral"},{"note":"Exceptions are also imported from the `roman_numerals` package.","symbol":"InvalidRomanNumeralError","correct":"from roman_numerals import InvalidRomanNumeralError"},{"note":"Exceptions are also imported from the `roman_numerals` package.","symbol":"OutOfRangeError","correct":"from roman_numerals import OutOfRangeError"}],"quickstart":{"code":"from roman_numerals import RomanNumeral, InvalidRomanNumeralError, OutOfRangeError\n\n# Create a RomanNumeral from an integer\nnum_from_int = RomanNumeral(16)\nprint(f\"Integer 16 as Roman: {num_from_int}\") # Expected: XVI\n\n# Create a RomanNumeral from a string\nnum_from_string = RomanNumeral.from_string(\"XVI\")\nprint(f\"Roman 'XVI' as Integer: {int(num_from_string)}\") # Expected: 16\n\n# Convert to uppercase/lowercase\nprint(f\"'XVI' uppercase: {num_from_string.to_uppercase()}\")\nprint(f\"'XVI' lowercase: {num_from_string.to_lowercase()}\")\n\n# Handle invalid input\ntry:\n    RomanNumeral.from_string(\"Spam!\")\nexcept InvalidRomanNumeralError as e:\n    print(f\"Caught expected error for 'Spam!': {e}\")\n\ntry:\n    RomanNumeral(0)\nexcept OutOfRangeError as e:\n    print(f\"Caught expected error for 0: {e}\")","lang":"python","description":"This quickstart demonstrates basic conversion from integers to Roman numerals and vice-versa, as well as handling invalid input. It uses the `RomanNumeral` class from the `roman_numerals` package, which is the underlying library for `roman-numerals-py`."},"warnings":[{"fix":"Uninstall `roman-numerals-py` and install `roman-numerals`: `pip uninstall roman-numerals-py && pip install roman-numerals`. Update any existing import statements from `roman_numerals_py` (if they were used in older versions) to `from roman_numerals import RomanNumeral`.","message":"This package (`roman-numerals-py`) is deprecated. As of version 4.0.0, it functions solely as a meta-package that depends on `roman-numerals` and installs no modules itself. Direct usage should be migrated to `roman-numerals` to avoid future issues and leverage active development.","severity":"breaking","affected_versions":">=4.0.0"},{"fix":"Ensure your Python environment is version 3.10 or newer. The recommended `roman-numerals` package also supports Python 3.10+.","message":"Version 4.0.0 dropped support for Python 3.9. Users on Python 3.9 or older will encounter compatibility issues.","severity":"breaking","affected_versions":">=4.0.0"},{"fix":"Always prefer `pip install roman-numerals` and `from roman_numerals import RomanNumeral` for current and future projects.","message":"There is a common confusion between the PyPI package names `roman-numerals-py` and `roman-numerals`. While `roman-numerals-py` is deprecated and acts as a wrapper, `roman-numerals` is the active, standalone library providing the actual Roman numeral manipulation functionality.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-10T00:00:00.000Z","next_check":"2026-07-09T00:00:00.000Z"}