nano-roman
World’s tiniest Roman ↔ Decimal number converter — ~1 KB, zero deps. Single-file, CLI included. Perfect for code-golf, minimal containers, or just for fun.
✨ Features
- ✅
int → ROMANandROMAN → int(case-insensitive) - ✅ Standard subtractive forms:
IV, IX, XL, XC, CD, CM - ✅ Classic 1–3999 supported; >3999 continues with repeated
M - ✅ Zero dependencies, single tiny file
- ✅ CLI:
nano-roman
🚀 Usage
# Local (from repo)
python app_min.py 3999 # MMMCMXCIX
python app_min.py XL # 40
After installing:
# CLI
pip install nano-roman
nano-roman 1984 # -> MCMLXXXIV
nano-roman XLII # -> 42
nano-roman mmxxv # -> 2025
🤓 Why so small?
- Minimal token table (S and V) + greedy subtractive matching
- No heavy parsing/regex trees, no dependencies
- Single module + tiny CLI wrapper
🎉 Fun Ideas
- Convert the current year
(Get-Date -Format yyyy) | % { nano-roman $_ } # 2025 -> MMXXV
date +%Y | xargs nano-roman # 2025 -> MMXXV
- “Roman clock” (hour only)
(Get-Date -Format HH) | % { nano-roman $_ } # 14 -> XIV
date +%I | xargs nano-roman # 07 -> VII
- Git tag in Roman
git tag "v$(nano-roman 2025)" && git push origin "v$(nano-roman 2025)"
- Batch convert a list
printf "4\n9\n42\n1999\n" | while read n; do nano-roman "$n"; done
# IV, IX, XLII, MCMXCIX
- Quick Windows alias
Set-Alias r nano-roman
r 3999 # -> MMMCMXCIX
Note: Classical Roman numerals have no zero and no negative values.
📜 License
MIT © 2025
Metadata
Release files for nano-roman 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| nano_roman-0.1.1.tar.gz | 3.4 kB | Without provenance | Details for nano_roman-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nano_roman-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for nano_roman-0.1.1-py3-none-any.whl |
Total release size: 7.2 kB
Release files / nano_roman-0.1.1.tar.gz
| Download URL | nano_roman-0.1.1.tar.gz |
|---|---|
| Size | 3.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
144fe8070b98f9a828c53c6c955496b0b48069ce4004c7bc81636d9cb3e03993
|
|
BLAKE2b-256 checksum How to use checksums |
9238c1fe45cee409cb10afddbc49a9a3979250b99a33eb66372bf41e94b25582
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.3
|
Release files / nano_roman-0.1.1-py3-none-any.whl
| Download URL | nano_roman-0.1.1-py3-none-any.whl |
|---|---|
| Size | 3.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e5de8eafbf1583368a20419a6e9cd0d99f22c21e6fa3e623e3bec48e7e3840a0
|
|
BLAKE2b-256 checksum How to use checksums |
d8035eacc23113231213b1cf776c8d22b9fd439c37e43021fb981ee1938cb16e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.3
|
Security for nano-roman 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.