Skip to content

Version Operations

Operations for checking Stash version information.

Bases: StashClientProtocol

Mixin for version-related methods.

Functions

version async

version() -> Version

Get the current Stash version information.

Returns:

Type Description
Version

Version object containing version, hash, and build_time

Examples:

Get current version:

version = await client.version()
print(f"Stash version: {version.version}")
print(f"Git hash: {version.hash}")
print(f"Build time: {version.build_time}")

latestversion async

latestversion() -> LatestVersion

Get the latest available Stash version from GitHub.

Returns:

Type Description
LatestVersion

LatestVersion object containing version, shorthash, release_date, and url

Examples:

Check for updates:

current = await client.version()
latest = await client.latestversion()
if current.version != latest.version:
    print(f"Update available: {latest.version}")
    print(f"Release date: {latest.release_date}")
    print(f"Download: {latest.url}")