Debian Codegraph @

asynceapi/_constants.py

raw symbols SCIP
1 # Copyright (c) 2024-2026 Arista Networks, Inc.
2 # Use of this source code is governed by the Apache License 2.0
3 # that can be found in the LICENSE file.
4 """Constants and Enums for the asynceapi package."""
5
6 from __future__ import annotations
7
8 from enum import Enum
9
10
11 class EapiCommandFormat(str, Enum):
12 """Enum for the eAPI command format.
13
14 NOTE: This could be updated to StrEnum when Python 3.11 is the minimum supported version in ANTA.
15 """
16
17 JSON = "json"
18 TEXT = "text"
19
20 def __str__(self) -> str:
21 """Override the __str__ method to return the value of the Enum, mimicking the behavior of StrEnum."""
22 return self.value