Skip to content

campus-common 0.2.2

Choose a tag to compare

@nycomp nycomp released this 02 Nov 05:42
· 4 commits to main since this release
7cbfed4

New campus.common.services module: the service URL registry. One resolver (get_base_url / resolve_base_url) owns where Campus services live, replacing the URL tables duplicated across campus.config, the campus_python SDK, and per-app resolvers.

  • Resolution precedence: CAMPUS_<SERVICE>_URL > <SERVICE>_URL > CAMPUS_BASE_URL > BASE_URL > the per-environment BASE_URLS table.
  • CAMPUS_-prefixed forms are primary (collision-safe on shared hosts); bare forms are aliases for dedicated hosts.
  • CAMPUS_BASE_URL/BASE_URL support gateway / single-server deployments: one origin fronting auth+api+audit; callers append route prefixes themselves.
  • Override/base values must be bare origins, validated like PUBLIC_URL; errors name the variable.
  • get_base_url keeps deployment semantics (testing + in-process self-calls resolve to the canonical origin); resolve_base_url is the client semantics the SDK needs.
  • env.py declares the override variables. Environment resolution: ENV > CAMPUS_ENV > development (SDK duality, unified).

Additive change → patch bump per the versioning policy. Full notes in CHANGELOG.md.