Historical chronology tools (indiction, calendar systems, etc.)
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file computus-1.1.0.tar.gz.
File metadata
- Download URL: computus-1.1.0.tar.gz
- Upload date:
- Size: 11.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4b73b8a445324e345ddf6f9ef88138f7e954c5c93e619934bd6ff9ea2e0f9a73
|
|
| MD5 |
af45885821727b4dc41e11f3bd88a31e
|
|
| BLAKE2b-256 |
05e5bab1a7e45eda161f20561eb61d200e644cefce56201dee4c272e4beb5f31
|
Provenance
The following attestation bundles were made for computus-1.1.0.tar.gz:
Publisher:
publish.yml on ivandebono/computus
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
computus-1.1.0.tar.gz -
Subject digest:
4b73b8a445324e345ddf6f9ef88138f7e954c5c93e619934bd6ff9ea2e0f9a73 - Sigstore transparency entry: 1623526507
- Sigstore integration time:
-
Permalink:
ivandebono/computus@c383359b4db73ca45a80ded3a530ff6e81822622 -
Branch / Tag:
refs/tags/v1.1.0 - Owner: https://github.com/ivandebono
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c383359b4db73ca45a80ded3a530ff6e81822622 -
Trigger Event:
push
-
Statement type:
File details
Details for the file computus-1.1.0-py3-none-any.whl.
File metadata
- Download URL: computus-1.1.0-py3-none-any.whl
- Upload date:
- Size: 11.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5e8417691ad9c8b1d784b06a0ac64f8a62fc97412bad7678b33933e6162638ea
|
|
| MD5 |
233f61cfd52e865d595062f957f6a2aa
|
|
| BLAKE2b-256 |
c70f36ff72efea8334c63a5cbd6654716ea87f1c291ce7c4a4364d223a0b9c74
|
Provenance
The following attestation bundles were made for computus-1.1.0-py3-none-any.whl:
Publisher:
publish.yml on ivandebono/computus
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
computus-1.1.0-py3-none-any.whl -
Subject digest:
5e8417691ad9c8b1d784b06a0ac64f8a62fc97412bad7678b33933e6162638ea - Sigstore transparency entry: 1623526798
- Sigstore integration time:
-
Permalink:
ivandebono/computus@c383359b4db73ca45a80ded3a530ff6e81822622 -
Branch / Tag:
refs/tags/v1.1.0 - Owner: https://github.com/ivandebono
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c383359b4db73ca45a80ded3a530ff6e81822622 -
Trigger Event:
push
-
Statement type: