You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
393 B
19 lines
393 B
from enum import Enum, StrEnum
|
|
|
|
|
|
class EnumBase(Enum):
|
|
@classmethod
|
|
def get_member_values(cls):
|
|
return [item.value for item in cls._member_map_.values()]
|
|
|
|
@classmethod
|
|
def get_member_names(cls):
|
|
return [name for name in cls._member_names_]
|
|
|
|
|
|
class MethodType(StrEnum):
|
|
GET = "GET"
|
|
POST = "POST"
|
|
PUT = "PUT"
|
|
DELETE = "DELETE"
|
|
PATCH = "PATCH"
|
|
|