Enum class Version

Package: keychain.constants

Description

Version number.

For general use in versioning data serialization formats, database schema, etc. This enum provides standardized version identifiers used throughout the keychain library to maintain compatibility across different releases and data formats.

Since: v2.0

Enum Class Summary

Enum Constant Value Description

UNINITIALIZED_VERSION

0

Uninitialized version state

V20190716

1

Version released July 16, 2019

V20200304

2

Version released March 4, 2020

V20220412

3

Version released April 12, 2022

V20230102

4

Version released January 2, 2023

V20240412

5

Version released April 12, 2024 (Herbie Hancock’s birthday)

Enum Class Detail

UNINITIALIZED_VERSION

Value: 0

Uninitialized version state. This indicates that no specific version has been set.

V20190716

Value: 1

Version released July 16, 2019. This represents an early version of the keychain library data formats.

V20200304

Value: 2

Version released March 4, 2020. This version introduced updates to the serialization and database schema.

V20220412

Value: 3

Version released April 12, 2022. This version included significant improvements to the core cryptographic operations.

V20230102

Value: 4

Version released January 2, 2023. This version introduced new features and compatibility updates.

V20240412

Value: 5

Version released April 12, 2024 (Herbie Hancock’s birthday). This is the latest version with the most recent feature set and improvements.

Usage Example

from keychain.constants import Version

# Get the latest version
latest_version = Version.V20240412
print(f"Latest version: {latest_version}")  # Outputs: 5

# Check version compatibility
def is_version_compatible(version):
    return version.value >= Version.V20220412.value

# Example usage
current_version = Version.V20230102
if is_version_compatible(current_version):
    print("Version is compatible with current features")
else:
    print("Version may not support all current features")

# Version comparison
if latest_version.value > current_version.value:
    print("A newer version is available")