Skip to main content

Library to determine liturgical dates and colours for the Anglican Church of England

Project description

Liturgical Calendar

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.

Installation

This library is published on PyPI.

pip install liturgical-calendar

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_calendar
name : 
prec : 1
season : Lent
season_url : https://en.wikipedia.org/wiki/Lent
week : Lent 1
date : 2025-03-13
colour : purple
colourcode : #664fa6
ember : 0

# Get info for an arbitrary date
$ liturgical_calendar 2023-01-25
name : The Conversion of Paul
url : https://en.wikipedia.org/wiki/Conversion_of_Paul
prec : 7
type : Festival
type_url : https://en.wikipedia.org/wiki/Festival_(Church_of_England)
season : Epiphany
season_url : https://en.wikipedia.org/wiki/Epiphany_season
week : Epiphany 3
date : 2023-01-25
colour : white
colourcode : #fffff6
ember : 0

Usage, as a library

# Get info for today
dayinfo = liturgical_calendar()

# 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_calendar('YYYY-MM-DD')

# Access the attributes individually
print(dayinfo['colour'])

Development

This Python project is managed with Poetry. For local testing without installing, run

poetry run liturgical_colour

Issues

If you find bugs (either in the code or in the calendar data), please create an issue on GitHub.

Pull requests are always welcome, either to address bugs or add new features.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

liturgical_calendar-0.5.2.tar.gz (12.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

liturgical_calendar-0.5.2-py3-none-any.whl (12.9 kB view details)

Uploaded Python 3

File details

Details for the file liturgical_calendar-0.5.2.tar.gz.

File metadata

  • Download URL: liturgical_calendar-0.5.2.tar.gz
  • Upload date:
  • Size: 12.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: poetry/2.2.1 CPython/3.11.14 Linux/6.11.0-1018-azure

File hashes

Hashes for liturgical_calendar-0.5.2.tar.gz
Algorithm Hash digest
SHA256 b6a112f8f7214e0c0bc481598f8d8d6fd949daff7d7de7eca3862ee4a188aab4
MD5 cbfefb08cc6bfb503ca5620f3f9ed79e
BLAKE2b-256 12d47e70c5ec4ca53bddbcf60aace1e96026cc39a7adce8c85ce4b178a2580fc

See more details on using hashes here.

File details

Details for the file liturgical_calendar-0.5.2-py3-none-any.whl.

File metadata

  • Download URL: liturgical_calendar-0.5.2-py3-none-any.whl
  • Upload date:
  • Size: 12.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: poetry/2.2.1 CPython/3.11.14 Linux/6.11.0-1018-azure

File hashes

Hashes for liturgical_calendar-0.5.2-py3-none-any.whl
Algorithm Hash digest
SHA256 76b21e5a0b9097c78d113bfe6a3b8067f0efa84318fbd58f382640fbbb666df1
MD5 6d2cdfd4e1a420320f42462ae82cce6f
BLAKE2b-256 369bb48d6f7cb9f48dae01ca5632318c725a4cd3666d1e276f01e9e5bcf164e6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page