Liturgical Colour
This Python module will return the name, season, week number and liturgical colour for any day in the Gregorian calendar, according to the Anglican tradition of the Church of England.
This module's algorithm is a direct port to Python of
DateTime::Calendar::Liturgical::Christian,
which was originally written in Perl and loaded with the calendar of the Episcopal
Church of the USA. It has now been fed with data from the Church of England's
Calendar of saints
and substantially modified to suit the Anglican calendar.
The output of this module is compared against the Church of England Lectionary, which is taken to be the canonical source.
Background
Some churches use a special church calendar. Days and seasons within the year may be either "fasts" (solemn times) or "feasts" (joyful times). The year is structured around the greatest feast in the calendar, the festival of the Resurrection of Jesus, known as Easter, and the second greatest feast, the festival of the Nativity of Jesus, known as Christmas. Before Christmas and Easter there are solemn fast seasons known as Advent and Lent respectively. After Christmas comes the feast of Epiphany, and after Easter comes the feast of Pentecost. These days have the adjacent seasons named after them.
The church's new year falls on Advent Sunday, which occurs around the start of December. Then follows the four-week fast season of Advent, then comes the Christmas season, which lasts twelve days; then comes Epiphany, then the forty days of Lent. Then comes Easter, then the long season of Pentecost (which some churches call Trinity, after the feast which falls soon after Pentecost). Then the next year begins and we return to Advent again.
Along with all these, the church remembers the women and men who have made a positive difference in church history by designating feast days for them, usually on the anniversary of their death. For example, we remember St. Andrew on the 30th day of November in the Western churches. Every Sunday is the feast day of Jesus, and if it has no other name is numbered according to the season in which it falls. So, for example, the third Sunday in Pentecost season would be called Pentecost 3.
Seasons are traditionally assigned colours, which are used for clothing and other materials. The major feasts are coloured white or gold. Fasts are purple. Feasts for martyrs (people who died for their faith) are red. Other days are green.
Installation
pip install liturgical-colour
Usage, as a command
Once installed, this can be run at the command line. Currently it prints an object with various attributes. This portion of the module needs improvement, although it is probably more useful as a library.
Specify the date in YYYY-MM-DD format, or leave blank to return info for today.
# Get info for today
$ liturgical_colour
name :
prec : 1
season : Advent
weekno : 4
date : 2023-12-21
colour : purple
colourcode : #ad099a
# Get info for an arbitrary date
$ liturgical_colour 2023-01-25
name : The Conversion of Paul
url : https://en.wikipedia.org/wiki/Conversion_of_Paul
prec : 7
type : Festival
season : Epiphany
weekno : 3
date : 2023-01-25
colour : white
colourcode : #ffffff
Usage, as a library
# Get info for today
dayinfo = liturgical_colour()
# Get info for an arbitrary date
# Date can be expressed as a string in YYYY-MM-DD format, a Datetime object, or a Date object
dayinfo = liturgical_colour('YYYY-MM-DD')
# Access the attributes individually
print(dayinfo['colour'])
Issues
If you find bugs (either in the code or in the calendar), please create an issue on GitHub.
Pull requests are always welcome, either to address bugs or add new features.
Example
There is a sample app which uses this library called Liturgical Colour App.
Metadata
Release files for liturgical-colour 0.3.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 | |
|---|---|---|---|---|
| liturgical_colour-0.3.0.tar.gz | 13.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| liturgical_colour-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 26.1 kB
Release files / liturgical_colour-0.3.0.tar.gz
| Download URL | liturgical_colour-0.3.0.tar.gz |
|---|---|
| Size | 13.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c31a1057450cb34d57db93467fbad3012f47c6f827992a95cdd48786f1b79c38
|
|
BLAKE2b-256 checksum How to use checksums |
9c97029f100b5301329ea848022679bec803008e66c3016d6ab4503fa2a7b4cf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
poetry/1.8.2 CPython/3.11.8 Linux/6.5.0-1016-azure
|
Release files / liturgical_colour-0.3.0-py3-none-any.whl
| Download URL | liturgical_colour-0.3.0-py3-none-any.whl |
|---|---|
| Size | 13.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7fc6009328d954eb23db0daa47e7086f8b37775a7ea8bb6bf0b49405a758ad76
|
|
BLAKE2b-256 checksum How to use checksums |
6fd33ddc68f91a5a22e1d6ddc379cf10890f67e2fe03fa974538320705f88bab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
poetry/1.8.2 CPython/3.11.8 Linux/6.5.0-1016-azure
|
Security for liturgical-colour 0.3.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.
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.