PyPew is a Flask app that helps you generate pew sheets for services using texts from the Book of Common Prayer. You can specify the date of your service, the Feast from which the texts should be used, the hymns to be sung, as well as other details such as the name of the priest, and all this information is assembled into a web page or .docx file for editing or printing.
There is a demonstration deployment at https://jmft2.user.srcf.net/pypew/ but it is also possible to run PyPew as a desktop app.
The project uses uv for dependency management. Requires Python 3.12 or later.
- Edit the variables in
.envto your taste (the defaults should be reasonable) - Install the dependencies:
uv sync uv run pypew
This should start up the Flask server as well as automatically opening
up your browser to http://localhost:5000.
Add --debug to run in Flask debug mode, or --no-launch to suppress
opening the browser.
Alternatively, uv run python -m pypew works the same way, and
uv run gunicorn pypew.wsgi:app serves it under gunicorn.
uv sync # install runtime + dev dependencies
uv run pypew --debug # run from a source checkout
uv run python -m unittest # run the test suite
uv run ruff check . # lint
uv run ruff format . # format
uv build # build a wheel and sdist
The package lives in src/pypew/, with the feast data, templates and
static files bundled inside it. scripts/ holds development helper
scripts that are not part of the installed package; install their extra
with uv sync --extra scripts if you need them.
It is also possible to compile binaries for PyPew that can be run without needing Python to be setup.
-
Set up the build environment:
uv sync --group build -
Run
build.batto create a folder indist/pypew, containing the executablepypew.exeas well as all the necessary files and DLLs. (This is rather large as it includes an entire Python distribution as well as packages like Pandas.) -
If desired, use Advanced Installer to create an .msi that will install PyPew into the 'Program Files' directory, together with shortcuts in the Start Menu.
The build.sh script runs PyInstaller to build dist/pypew.app, which
may then be put into your 'Applications' directory.
src/pypew/wsgi.py exposes the WSGI application as app, suitable for
gunicorn pypew.wsgi:app. See deploy/srcf.sh for the deployment used
by the demonstration instance.
PyPew is licensed under the MIT License.
Distributions of the PyPew include extracts from the Book of Common Prayer. Extracts from The Book of Common Prayer, the rights of which are vested in the Crown, are reproduced by permission of the Crown's patentee, Cambridge University Press.
Information about hymns is courtesy of Hymnary.org.