authentik

authentik root module

 1"""authentik root module"""
 2
 3from functools import lru_cache
 4from os import environ
 5
 6VERSION = "2026.5.0-rc1"
 7ENV_GIT_HASH_KEY = "GIT_BUILD_HASH"
 8
 9
10@lru_cache
11def authentik_version() -> str:
12    return VERSION
13
14
15@lru_cache
16def authentik_build_hash(fallback: str | None = None) -> str:
17    """Get build hash"""
18    build_hash = environ.get(ENV_GIT_HASH_KEY, fallback if fallback else "")
19    return fallback if build_hash == "" and fallback else build_hash
20
21
22@lru_cache
23def authentik_full_version() -> str:
24    """Get full version, with build hash appended"""
25    version = authentik_version()
26    if (build_hash := authentik_build_hash()) != "":
27        return f"{version}+{build_hash}"
28    return version
VERSION = '2026.5.0-rc1'
ENV_GIT_HASH_KEY = 'GIT_BUILD_HASH'
@lru_cache
def authentik_version() -> str:
11@lru_cache
12def authentik_version() -> str:
13    return VERSION
@lru_cache
def authentik_build_hash(fallback: str | None = None) -> str:
16@lru_cache
17def authentik_build_hash(fallback: str | None = None) -> str:
18    """Get build hash"""
19    build_hash = environ.get(ENV_GIT_HASH_KEY, fallback if fallback else "")
20    return fallback if build_hash == "" and fallback else build_hash

Get build hash

@lru_cache
def authentik_full_version() -> str:
23@lru_cache
24def authentik_full_version() -> str:
25    """Get full version, with build hash appended"""
26    version = authentik_version()
27    if (build_hash := authentik_build_hash()) != "":
28        return f"{version}+{build_hash}"
29    return version

Get full version, with build hash appended