Projects / Reference
Passage Lookup API
A small HTTP service returning the text of a Scripture reference, used by Reading Notes as an optional dependency.
Screenshots
About this project
SAMPLE PROJECT / REFERENCE IMPLEMENTATION. Built by the course developer before the term to prove this submission path works. Not student work.
A Flask service with one lookup endpoint, a status endpoint and a health endpoint. It exists so reference project C's optional external dependency is a real one, and so the course does not rely on a third-party account that may vanish.
It is reference project D: the external-service path. Every failure mode a caller has to handle - a wrong key, a spent quota, an unknown reference, an archived service, a service that is simply not running - returns JSON a person can act on, and Reading Notes degrades cleanly through all of them.
Problem and purpose
Projects that call an outside service need a worked example of what to declare and how to fail gracefully, without depending on a commercial account that may disappear after the term.
Intended users
Other student projects, and students learning what a declared external dependency has to document.
Major features
- GET /?reference=Psalm+23:1 returns the passage as JSON
- Bearer-token authentication, configurable and optional
- A per-client rate limit, because real services have quotas
- GET /status reports its own availability state, unauthenticated
- Every failure returns JSON with an actionable detail
Known limitations
36 passages, not a complete Bible. The rate limit is in memory, so it resets on restart and is per-process rather than shared - a real service would use a shared store. No HTTPS of its own.
How it is built
No database: the passage set is a JSON file loaded once at start-up. The availability state is an environment variable, so the service can be retired to 'archived' without being switched off - callers then get a 503 with an explanation rather than a connection error.
Who built it
-
Dr. Taegil Ha
Author (reference implementation)
Wrote the project as the course's worked example of this submission path.