crypticorn 2.1.5__py3-none-any.whl → 2.1.6__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. crypticorn/client.py +4 -0
  2. crypticorn/common/urls.py +1 -0
  3. crypticorn/klines/client/configuration.py +2 -2
  4. crypticorn/metrics/__init__.py +4 -0
  5. crypticorn/metrics/client/__init__.py +60 -0
  6. crypticorn/metrics/client/api/__init__.py +10 -0
  7. crypticorn/metrics/client/api/exchanges_api.py +1003 -0
  8. crypticorn/metrics/client/api/health_check_api.py +265 -0
  9. crypticorn/metrics/client/api/indicators_api.py +680 -0
  10. crypticorn/metrics/client/api/logs_api.py +356 -0
  11. crypticorn/metrics/client/api/marketcap_api.py +1315 -0
  12. crypticorn/metrics/client/api/markets_api.py +618 -0
  13. crypticorn/metrics/client/api/tokens_api.py +300 -0
  14. crypticorn/metrics/client/api_client.py +758 -0
  15. crypticorn/metrics/client/api_response.py +20 -0
  16. crypticorn/metrics/client/configuration.py +575 -0
  17. crypticorn/metrics/client/exceptions.py +220 -0
  18. crypticorn/metrics/client/models/__init__.py +37 -0
  19. crypticorn/metrics/client/models/base_response_dict.py +106 -0
  20. crypticorn/metrics/client/models/base_response_health_check_response.py +114 -0
  21. crypticorn/metrics/client/models/base_response_list_dict.py +106 -0
  22. crypticorn/metrics/client/models/base_response_list_exchange_mapping.py +118 -0
  23. crypticorn/metrics/client/models/base_response_list_str.py +106 -0
  24. crypticorn/metrics/client/models/error_response.py +109 -0
  25. crypticorn/metrics/client/models/exchange_mapping.py +132 -0
  26. crypticorn/metrics/client/models/health_check_response.py +91 -0
  27. crypticorn/metrics/client/models/http_validation_error.py +99 -0
  28. crypticorn/metrics/client/models/market.py +35 -0
  29. crypticorn/metrics/client/models/severity.py +36 -0
  30. crypticorn/metrics/client/models/validation_error.py +105 -0
  31. crypticorn/metrics/client/models/validation_error_loc_inner.py +159 -0
  32. crypticorn/metrics/client/py.typed +0 -0
  33. crypticorn/metrics/client/rest.py +195 -0
  34. crypticorn/metrics/main.py +112 -0
  35. {crypticorn-2.1.5.dist-info → crypticorn-2.1.6.dist-info}/METADATA +1 -1
  36. {crypticorn-2.1.5.dist-info → crypticorn-2.1.6.dist-info}/RECORD +38 -7
  37. {crypticorn-2.1.5.dist-info → crypticorn-2.1.6.dist-info}/WHEEL +0 -0
  38. {crypticorn-2.1.5.dist-info → crypticorn-2.1.6.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,106 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Marketcap Service API
5
+
6
+ API for retrieving historical marketcap data, available exchanges, and indicators. ## Features - Historical marketcap data - OHLCV data with marketcap - Technical indicators (KER, SMA) - Exchange and symbol mappings - Error logs
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from datetime import datetime
21
+ from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr
22
+ from typing import Any, ClassVar, Dict, List, Optional
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+
27
+ class BaseResponseListStr(BaseModel):
28
+ """
29
+ BaseResponseListStr
30
+ """ # noqa: E501
31
+
32
+ success: Optional[StrictBool] = True
33
+ message: Optional[StrictStr] = None
34
+ data: Optional[List[StrictStr]] = None
35
+ timestamp: Optional[datetime] = None
36
+ __properties: ClassVar[List[str]] = ["success", "message", "data", "timestamp"]
37
+
38
+ model_config = ConfigDict(
39
+ populate_by_name=True,
40
+ validate_assignment=True,
41
+ protected_namespaces=(),
42
+ )
43
+
44
+ def to_str(self) -> str:
45
+ """Returns the string representation of the model using alias"""
46
+ return pprint.pformat(self.model_dump(by_alias=True))
47
+
48
+ def to_json(self) -> str:
49
+ """Returns the JSON representation of the model using alias"""
50
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
51
+ return json.dumps(self.to_dict())
52
+
53
+ @classmethod
54
+ def from_json(cls, json_str: str) -> Optional[Self]:
55
+ """Create an instance of BaseResponseListStr from a JSON string"""
56
+ return cls.from_dict(json.loads(json_str))
57
+
58
+ def to_dict(self) -> Dict[str, Any]:
59
+ """Return the dictionary representation of the model using alias.
60
+
61
+ This has the following differences from calling pydantic's
62
+ `self.model_dump(by_alias=True)`:
63
+
64
+ * `None` is only added to the output dict for nullable fields that
65
+ were set at model initialization. Other fields with value `None`
66
+ are ignored.
67
+ """
68
+ excluded_fields: Set[str] = set([])
69
+
70
+ _dict = self.model_dump(
71
+ by_alias=True,
72
+ exclude=excluded_fields,
73
+ exclude_none=True,
74
+ )
75
+ # set to None if message (nullable) is None
76
+ # and model_fields_set contains the field
77
+ if self.message is None and "message" in self.model_fields_set:
78
+ _dict["message"] = None
79
+
80
+ # set to None if data (nullable) is None
81
+ # and model_fields_set contains the field
82
+ if self.data is None and "data" in self.model_fields_set:
83
+ _dict["data"] = None
84
+
85
+ return _dict
86
+
87
+ @classmethod
88
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
89
+ """Create an instance of BaseResponseListStr from a dict"""
90
+ if obj is None:
91
+ return None
92
+
93
+ if not isinstance(obj, dict):
94
+ return cls.model_validate(obj)
95
+
96
+ _obj = cls.model_validate(
97
+ {
98
+ "success": (
99
+ obj.get("success") if obj.get("success") is not None else True
100
+ ),
101
+ "message": obj.get("message"),
102
+ "data": obj.get("data"),
103
+ "timestamp": obj.get("timestamp"),
104
+ }
105
+ )
106
+ return _obj
@@ -0,0 +1,109 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Marketcap Service API
5
+
6
+ API for retrieving historical marketcap data, available exchanges, and indicators. ## Features - Historical marketcap data - OHLCV data with marketcap - Technical indicators (KER, SMA) - Exchange and symbol mappings - Error logs
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from datetime import datetime
21
+ from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr
22
+ from typing import Any, ClassVar, Dict, List, Optional
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+
27
+ class ErrorResponse(BaseModel):
28
+ """
29
+ ErrorResponse
30
+ """ # noqa: E501
31
+
32
+ success: Optional[StrictBool] = False
33
+ message: StrictStr
34
+ error_code: StrictStr
35
+ details: Optional[Dict[str, Any]] = None
36
+ timestamp: Optional[datetime] = None
37
+ __properties: ClassVar[List[str]] = [
38
+ "success",
39
+ "message",
40
+ "error_code",
41
+ "details",
42
+ "timestamp",
43
+ ]
44
+
45
+ model_config = ConfigDict(
46
+ populate_by_name=True,
47
+ validate_assignment=True,
48
+ protected_namespaces=(),
49
+ )
50
+
51
+ def to_str(self) -> str:
52
+ """Returns the string representation of the model using alias"""
53
+ return pprint.pformat(self.model_dump(by_alias=True))
54
+
55
+ def to_json(self) -> str:
56
+ """Returns the JSON representation of the model using alias"""
57
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
58
+ return json.dumps(self.to_dict())
59
+
60
+ @classmethod
61
+ def from_json(cls, json_str: str) -> Optional[Self]:
62
+ """Create an instance of ErrorResponse from a JSON string"""
63
+ return cls.from_dict(json.loads(json_str))
64
+
65
+ def to_dict(self) -> Dict[str, Any]:
66
+ """Return the dictionary representation of the model using alias.
67
+
68
+ This has the following differences from calling pydantic's
69
+ `self.model_dump(by_alias=True)`:
70
+
71
+ * `None` is only added to the output dict for nullable fields that
72
+ were set at model initialization. Other fields with value `None`
73
+ are ignored.
74
+ """
75
+ excluded_fields: Set[str] = set([])
76
+
77
+ _dict = self.model_dump(
78
+ by_alias=True,
79
+ exclude=excluded_fields,
80
+ exclude_none=True,
81
+ )
82
+ # set to None if details (nullable) is None
83
+ # and model_fields_set contains the field
84
+ if self.details is None and "details" in self.model_fields_set:
85
+ _dict["details"] = None
86
+
87
+ return _dict
88
+
89
+ @classmethod
90
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
91
+ """Create an instance of ErrorResponse from a dict"""
92
+ if obj is None:
93
+ return None
94
+
95
+ if not isinstance(obj, dict):
96
+ return cls.model_validate(obj)
97
+
98
+ _obj = cls.model_validate(
99
+ {
100
+ "success": (
101
+ obj.get("success") if obj.get("success") is not None else False
102
+ ),
103
+ "message": obj.get("message"),
104
+ "error_code": obj.get("error_code"),
105
+ "details": obj.get("details"),
106
+ "timestamp": obj.get("timestamp"),
107
+ }
108
+ )
109
+ return _obj
@@ -0,0 +1,132 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Marketcap Service API
5
+
6
+ API for retrieving historical marketcap data, available exchanges, and indicators. ## Features - Historical marketcap data - OHLCV data with marketcap - Technical indicators (KER, SMA) - Exchange and symbol mappings - Error logs
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from datetime import datetime
21
+ from pydantic import BaseModel, ConfigDict, StrictStr
22
+ from typing import Any, ClassVar, Dict, List, Optional
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+
27
+ class ExchangeMapping(BaseModel):
28
+ """
29
+ ExchangeMapping
30
+ """ # noqa: E501
31
+
32
+ exchange_name: StrictStr
33
+ symbol: StrictStr
34
+ quote_currency: StrictStr
35
+ pair: StrictStr
36
+ first_trade_timestamp: Optional[datetime]
37
+ last_trade_timestamp: Optional[datetime]
38
+ status: StrictStr
39
+ market_type: Optional[StrictStr]
40
+ __properties: ClassVar[List[str]] = [
41
+ "exchange_name",
42
+ "symbol",
43
+ "quote_currency",
44
+ "pair",
45
+ "first_trade_timestamp",
46
+ "last_trade_timestamp",
47
+ "status",
48
+ "market_type",
49
+ ]
50
+
51
+ model_config = ConfigDict(
52
+ populate_by_name=True,
53
+ validate_assignment=True,
54
+ protected_namespaces=(),
55
+ )
56
+
57
+ def to_str(self) -> str:
58
+ """Returns the string representation of the model using alias"""
59
+ return pprint.pformat(self.model_dump(by_alias=True))
60
+
61
+ def to_json(self) -> str:
62
+ """Returns the JSON representation of the model using alias"""
63
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
64
+ return json.dumps(self.to_dict())
65
+
66
+ @classmethod
67
+ def from_json(cls, json_str: str) -> Optional[Self]:
68
+ """Create an instance of ExchangeMapping from a JSON string"""
69
+ return cls.from_dict(json.loads(json_str))
70
+
71
+ def to_dict(self) -> Dict[str, Any]:
72
+ """Return the dictionary representation of the model using alias.
73
+
74
+ This has the following differences from calling pydantic's
75
+ `self.model_dump(by_alias=True)`:
76
+
77
+ * `None` is only added to the output dict for nullable fields that
78
+ were set at model initialization. Other fields with value `None`
79
+ are ignored.
80
+ """
81
+ excluded_fields: Set[str] = set([])
82
+
83
+ _dict = self.model_dump(
84
+ by_alias=True,
85
+ exclude=excluded_fields,
86
+ exclude_none=True,
87
+ )
88
+ # set to None if first_trade_timestamp (nullable) is None
89
+ # and model_fields_set contains the field
90
+ if (
91
+ self.first_trade_timestamp is None
92
+ and "first_trade_timestamp" in self.model_fields_set
93
+ ):
94
+ _dict["first_trade_timestamp"] = None
95
+
96
+ # set to None if last_trade_timestamp (nullable) is None
97
+ # and model_fields_set contains the field
98
+ if (
99
+ self.last_trade_timestamp is None
100
+ and "last_trade_timestamp" in self.model_fields_set
101
+ ):
102
+ _dict["last_trade_timestamp"] = None
103
+
104
+ # set to None if market_type (nullable) is None
105
+ # and model_fields_set contains the field
106
+ if self.market_type is None and "market_type" in self.model_fields_set:
107
+ _dict["market_type"] = None
108
+
109
+ return _dict
110
+
111
+ @classmethod
112
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
113
+ """Create an instance of ExchangeMapping from a dict"""
114
+ if obj is None:
115
+ return None
116
+
117
+ if not isinstance(obj, dict):
118
+ return cls.model_validate(obj)
119
+
120
+ _obj = cls.model_validate(
121
+ {
122
+ "exchange_name": obj.get("exchange_name"),
123
+ "symbol": obj.get("symbol"),
124
+ "quote_currency": obj.get("quote_currency"),
125
+ "pair": obj.get("pair"),
126
+ "first_trade_timestamp": obj.get("first_trade_timestamp"),
127
+ "last_trade_timestamp": obj.get("last_trade_timestamp"),
128
+ "status": obj.get("status"),
129
+ "market_type": obj.get("market_type"),
130
+ }
131
+ )
132
+ return _obj
@@ -0,0 +1,91 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Marketcap Service API
5
+
6
+ API for retrieving historical marketcap data, available exchanges, and indicators. ## Features - Historical marketcap data - OHLCV data with marketcap - Technical indicators (KER, SMA) - Exchange and symbol mappings - Error logs
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, StrictStr
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from typing import Optional, Set
23
+ from typing_extensions import Self
24
+
25
+
26
+ class HealthCheckResponse(BaseModel):
27
+ """
28
+ HealthCheckResponse
29
+ """ # noqa: E501
30
+
31
+ status: Optional[StrictStr] = "ok"
32
+ version: Optional[StrictStr] = "1.0.0"
33
+ __properties: ClassVar[List[str]] = ["status", "version"]
34
+
35
+ model_config = ConfigDict(
36
+ populate_by_name=True,
37
+ validate_assignment=True,
38
+ protected_namespaces=(),
39
+ )
40
+
41
+ def to_str(self) -> str:
42
+ """Returns the string representation of the model using alias"""
43
+ return pprint.pformat(self.model_dump(by_alias=True))
44
+
45
+ def to_json(self) -> str:
46
+ """Returns the JSON representation of the model using alias"""
47
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
48
+ return json.dumps(self.to_dict())
49
+
50
+ @classmethod
51
+ def from_json(cls, json_str: str) -> Optional[Self]:
52
+ """Create an instance of HealthCheckResponse from a JSON string"""
53
+ return cls.from_dict(json.loads(json_str))
54
+
55
+ def to_dict(self) -> Dict[str, Any]:
56
+ """Return the dictionary representation of the model using alias.
57
+
58
+ This has the following differences from calling pydantic's
59
+ `self.model_dump(by_alias=True)`:
60
+
61
+ * `None` is only added to the output dict for nullable fields that
62
+ were set at model initialization. Other fields with value `None`
63
+ are ignored.
64
+ """
65
+ excluded_fields: Set[str] = set([])
66
+
67
+ _dict = self.model_dump(
68
+ by_alias=True,
69
+ exclude=excluded_fields,
70
+ exclude_none=True,
71
+ )
72
+ return _dict
73
+
74
+ @classmethod
75
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
76
+ """Create an instance of HealthCheckResponse from a dict"""
77
+ if obj is None:
78
+ return None
79
+
80
+ if not isinstance(obj, dict):
81
+ return cls.model_validate(obj)
82
+
83
+ _obj = cls.model_validate(
84
+ {
85
+ "status": obj.get("status") if obj.get("status") is not None else "ok",
86
+ "version": (
87
+ obj.get("version") if obj.get("version") is not None else "1.0.0"
88
+ ),
89
+ }
90
+ )
91
+ return _obj
@@ -0,0 +1,99 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Marketcap Service API
5
+
6
+ API for retrieving historical marketcap data, available exchanges, and indicators. ## Features - Historical marketcap data - OHLCV data with marketcap - Technical indicators (KER, SMA) - Exchange and symbol mappings - Error logs
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from crypticorn.metrics.client.models.validation_error import ValidationError
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+
27
+ class HTTPValidationError(BaseModel):
28
+ """
29
+ HTTPValidationError
30
+ """ # noqa: E501
31
+
32
+ detail: Optional[List[ValidationError]] = None
33
+ __properties: ClassVar[List[str]] = ["detail"]
34
+
35
+ model_config = ConfigDict(
36
+ populate_by_name=True,
37
+ validate_assignment=True,
38
+ protected_namespaces=(),
39
+ )
40
+
41
+ def to_str(self) -> str:
42
+ """Returns the string representation of the model using alias"""
43
+ return pprint.pformat(self.model_dump(by_alias=True))
44
+
45
+ def to_json(self) -> str:
46
+ """Returns the JSON representation of the model using alias"""
47
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
48
+ return json.dumps(self.to_dict())
49
+
50
+ @classmethod
51
+ def from_json(cls, json_str: str) -> Optional[Self]:
52
+ """Create an instance of HTTPValidationError from a JSON string"""
53
+ return cls.from_dict(json.loads(json_str))
54
+
55
+ def to_dict(self) -> Dict[str, Any]:
56
+ """Return the dictionary representation of the model using alias.
57
+
58
+ This has the following differences from calling pydantic's
59
+ `self.model_dump(by_alias=True)`:
60
+
61
+ * `None` is only added to the output dict for nullable fields that
62
+ were set at model initialization. Other fields with value `None`
63
+ are ignored.
64
+ """
65
+ excluded_fields: Set[str] = set([])
66
+
67
+ _dict = self.model_dump(
68
+ by_alias=True,
69
+ exclude=excluded_fields,
70
+ exclude_none=True,
71
+ )
72
+ # override the default output from pydantic by calling `to_dict()` of each item in detail (list)
73
+ _items = []
74
+ if self.detail:
75
+ for _item_detail in self.detail:
76
+ if _item_detail:
77
+ _items.append(_item_detail.to_dict())
78
+ _dict["detail"] = _items
79
+ return _dict
80
+
81
+ @classmethod
82
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
83
+ """Create an instance of HTTPValidationError from a dict"""
84
+ if obj is None:
85
+ return None
86
+
87
+ if not isinstance(obj, dict):
88
+ return cls.model_validate(obj)
89
+
90
+ _obj = cls.model_validate(
91
+ {
92
+ "detail": (
93
+ [ValidationError.from_dict(_item) for _item in obj["detail"]]
94
+ if obj.get("detail") is not None
95
+ else None
96
+ )
97
+ }
98
+ )
99
+ return _obj
@@ -0,0 +1,35 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Marketcap Service API
5
+
6
+ API for retrieving historical marketcap data, available exchanges, and indicators. ## Features - Historical marketcap data - OHLCV data with marketcap - Technical indicators (KER, SMA) - Exchange and symbol mappings - Error logs
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import json
17
+ from enum import Enum
18
+ from typing_extensions import Self
19
+
20
+
21
+ class Market(str, Enum):
22
+ """
23
+ Market
24
+ """
25
+
26
+ """
27
+ allowed enum values
28
+ """
29
+ SPOT = "spot"
30
+ FUTURES = "futures"
31
+
32
+ @classmethod
33
+ def from_json(cls, json_str: str) -> Self:
34
+ """Create an instance of Market from a JSON string"""
35
+ return cls(json.loads(json_str))
@@ -0,0 +1,36 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Marketcap Service API
5
+
6
+ API for retrieving historical marketcap data, available exchanges, and indicators. ## Features - Historical marketcap data - OHLCV data with marketcap - Technical indicators (KER, SMA) - Exchange and symbol mappings - Error logs
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import json
17
+ from enum import Enum
18
+ from typing_extensions import Self
19
+
20
+
21
+ class Severity(str, Enum):
22
+ """
23
+ Severity
24
+ """
25
+
26
+ """
27
+ allowed enum values
28
+ """
29
+ ERROR = "ERROR"
30
+ WARNING = "WARNING"
31
+ CRITICAL = "CRITICAL"
32
+
33
+ @classmethod
34
+ def from_json(cls, json_str: str) -> Self:
35
+ """Create an instance of Severity from a JSON string"""
36
+ return cls(json.loads(json_str))