Computus
A small Python library and command line tool for historical chronology.
Author
Ivan Debono
Features
- Indiction calculation for Anno Domini/Common Era and Byzantine Anno Mundi years
- Roman numeral conversion in both directions
- Julian and Gregorian calendar conversion
- Gregorian, Julian, and Orthodox Easter calculation
- Era conversion between AD/CE, BC/BCE, Byzantine AM, and AUC
- Simple historical date parsing
Installation
Using pip
pip install computus
Using uv
uv add computus
Or:
uv pip install computus
Usage (Python)
from computus import (
arabic_to_roman,
convert_era,
easter,
indiction,
julian_to_gregorian,
parse_historical_date,
roman_to_arabic,
)
i = indiction(525)
print(i) # 3
print(arabic_to_roman(i)) # III
print(indiction(6033, "AM")) # 3
print(convert_era(525, "AD", "AM")) # 6033
print(julian_to_gregorian(1582, 10, 4)) # (1582, 10, 14)
print(easter(2024, "orthodox")) # (2024, 5, 5)
print(roman_to_arabic("XLII")) # 42
print(parse_historical_date("15 March 44 BC"))
Command Line Usage
The original short form still calculates an AD indiction:
computus 525
Example output:
Indiction: 3 (III)
Subcommands expose the full toolset:
computus indiction 6033 --calendar AM
computus roman XLII
computus roman 42
computus easter 2024 --calendar orthodox
computus convert 525 --from AD --to AM
computus calendar 1582 10 4 --from julian --to gregorian
computus parse "15 March 44 BC"
Historical Notes
calendar="AD" and calendar="CE" treat the input year as an Anno Domini/Common Era year. calendar="AM" treats the input year as a Byzantine Anno Mundi year directly. To convert an AD year to Byzantine AM first, use convert_era(year, "AD", "AM").
The library uses traditional historical year numbering: there is no year 0. Use BC/BCE era conversion for years before AD 1.
Development
python -m pip install -e ".[dev]"
pytest
License
PolyForm Noncommercial License 1.0.0
Copyright (c) 2026 Ivan Debono
Metadata
Release files for computus 1.1.0
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 |
|---|---|---|---|---|
| computus-1.1.0.tar.gz | 11.5 kB | With provenance | Details for computus-1.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| computus-1.1.0-py3-none-any.whl | Python 3 | none | any | Details for computus-1.1.0-py3-none-any.whl |
Total release size: 22.9 kB
Release files / computus-1.1.0.tar.gz
| Download URL | computus-1.1.0.tar.gz |
|---|---|
| Size | 11.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4b73b8a445324e345ddf6f9ef88138f7e954c5c93e619934bd6ff9ea2e0f9a73
|
|
BLAKE2b-256 checksum How to use checksums |
05e5bab1a7e45eda161f20561eb61d200e644cefce56201dee4c272e4beb5f31
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 24, 2026.
Transparency logRelease files / computus-1.1.0-py3-none-any.whl
| Download URL | computus-1.1.0-py3-none-any.whl |
|---|---|
| Size | 11.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5e8417691ad9c8b1d784b06a0ac64f8a62fc97412bad7678b33933e6162638ea
|
|
BLAKE2b-256 checksum How to use checksums |
c70f36ff72efea8334c63a5cbd6654716ea87f1c291ce7c4a4364d223a0b9c74
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 24, 2026.
Transparency logSecurity for computus 1.1.0
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for computus-1.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 24, 2026.
Transparency logA 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.