This library provides session authentication to the Church of Jesus Christ of Latter Day Saints Leader and Clerk Resources (LCR) System. This uses the very capable Requests package to drive the web connection.
This library can also save the cookies from an established session, which means that once you authenticate you can repeatedly use your scripts without have to reauthenticate.
This in an unofficial and independent project. This is NOT officially associated with The Church of Jesus Christ of Latter-Day Saints.
pip install lcr-session
Here's a very simple and quick illustration of how to use the API:
import pprint
from lcr_session import LcrSession, ChurchUrl
endpoint_url = ChurchUrl("lcr", "api/report/members-with-callings?unitNumber={unit}")
api = LcrSession(USERNAME, PASSWORD, cookie_jar_file="cookies.txt")
resp = api.get_json(endpoint_url)
pprint.pprint(resp)
See the documentation at: https://lcr-session.readthedocs.io/en/stable/.