crypticorn 2.4.4__py3-none-any.whl → 2.4.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.
- crypticorn/client.py +1 -1
- crypticorn/common/errors.py +9 -5
- crypticorn/common/scopes.py +7 -1
- crypticorn/common/sorter.py +2 -2
- crypticorn/metrics/client/models/exchange_mapping.py +4 -2
- crypticorn/metrics/client/models/trading_status.py +1 -0
- crypticorn/pay/client/__init__.py +5 -6
- crypticorn/pay/client/api/payments_api.py +85 -18
- crypticorn/pay/client/api/products_api.py +49 -50
- crypticorn/pay/client/configuration.py +8 -1
- crypticorn/pay/client/models/__init__.py +5 -6
- crypticorn/pay/client/models/payment.py +28 -147
- crypticorn/pay/client/models/product_create.py +120 -0
- crypticorn/pay/client/models/product_read.py +123 -0
- crypticorn/pay/client/models/product_sub_read.py +103 -0
- crypticorn/pay/client/models/product_update.py +142 -0
- crypticorn/pay/client/models/product_update_model.py +6 -6
- crypticorn/pay/client/models/scope.py +2 -2
- crypticorn/pay/client/rest.py +4 -1
- {crypticorn-2.4.4.dist-info → crypticorn-2.4.6.dist-info}/METADATA +6 -1
- {crypticorn-2.4.4.dist-info → crypticorn-2.4.6.dist-info}/RECORD +24 -20
- {crypticorn-2.4.4.dist-info → crypticorn-2.4.6.dist-info}/WHEEL +0 -0
- {crypticorn-2.4.4.dist-info → crypticorn-2.4.6.dist-info}/entry_points.txt +0 -0
- {crypticorn-2.4.4.dist-info → crypticorn-2.4.6.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,120 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
Payment API
|
5
|
+
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
7
|
+
|
8
|
+
The version of the OpenAPI document: 0.1.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 (
|
21
|
+
BaseModel,
|
22
|
+
ConfigDict,
|
23
|
+
Field,
|
24
|
+
StrictBool,
|
25
|
+
StrictFloat,
|
26
|
+
StrictInt,
|
27
|
+
StrictStr,
|
28
|
+
)
|
29
|
+
from typing import Any, ClassVar, Dict, List, Optional, Union
|
30
|
+
from crypticorn.pay.client.models.scope import Scope
|
31
|
+
from typing import Optional, Set
|
32
|
+
from typing_extensions import Self
|
33
|
+
|
34
|
+
|
35
|
+
class ProductCreate(BaseModel):
|
36
|
+
"""
|
37
|
+
Model for creating a product
|
38
|
+
""" # noqa: E501
|
39
|
+
|
40
|
+
name: StrictStr = Field(description="Product name")
|
41
|
+
price: Union[StrictFloat, StrictInt] = Field(description="Product price")
|
42
|
+
scopes: Optional[List[Scope]] = None
|
43
|
+
duration: StrictInt = Field(
|
44
|
+
description="Product duration in days. 0 means unlimited."
|
45
|
+
)
|
46
|
+
description: StrictStr = Field(description="Product description")
|
47
|
+
is_active: StrictBool = Field(description="Product is active")
|
48
|
+
__properties: ClassVar[List[str]] = [
|
49
|
+
"name",
|
50
|
+
"price",
|
51
|
+
"scopes",
|
52
|
+
"duration",
|
53
|
+
"description",
|
54
|
+
"is_active",
|
55
|
+
]
|
56
|
+
|
57
|
+
model_config = ConfigDict(
|
58
|
+
populate_by_name=True,
|
59
|
+
validate_assignment=True,
|
60
|
+
protected_namespaces=(),
|
61
|
+
)
|
62
|
+
|
63
|
+
def to_str(self) -> str:
|
64
|
+
"""Returns the string representation of the model using alias"""
|
65
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
66
|
+
|
67
|
+
def to_json(self) -> str:
|
68
|
+
"""Returns the JSON representation of the model using alias"""
|
69
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
70
|
+
return json.dumps(self.to_dict())
|
71
|
+
|
72
|
+
@classmethod
|
73
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
74
|
+
"""Create an instance of ProductCreate from a JSON string"""
|
75
|
+
return cls.from_dict(json.loads(json_str))
|
76
|
+
|
77
|
+
def to_dict(self) -> Dict[str, Any]:
|
78
|
+
"""Return the dictionary representation of the model using alias.
|
79
|
+
|
80
|
+
This has the following differences from calling pydantic's
|
81
|
+
`self.model_dump(by_alias=True)`:
|
82
|
+
|
83
|
+
* `None` is only added to the output dict for nullable fields that
|
84
|
+
were set at model initialization. Other fields with value `None`
|
85
|
+
are ignored.
|
86
|
+
"""
|
87
|
+
excluded_fields: Set[str] = set([])
|
88
|
+
|
89
|
+
_dict = self.model_dump(
|
90
|
+
by_alias=True,
|
91
|
+
exclude=excluded_fields,
|
92
|
+
exclude_none=True,
|
93
|
+
)
|
94
|
+
# set to None if scopes (nullable) is None
|
95
|
+
# and model_fields_set contains the field
|
96
|
+
if self.scopes is None and "scopes" in self.model_fields_set:
|
97
|
+
_dict["scopes"] = None
|
98
|
+
|
99
|
+
return _dict
|
100
|
+
|
101
|
+
@classmethod
|
102
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
103
|
+
"""Create an instance of ProductCreate from a dict"""
|
104
|
+
if obj is None:
|
105
|
+
return None
|
106
|
+
|
107
|
+
if not isinstance(obj, dict):
|
108
|
+
return cls.model_validate(obj)
|
109
|
+
|
110
|
+
_obj = cls.model_validate(
|
111
|
+
{
|
112
|
+
"name": obj.get("name"),
|
113
|
+
"price": obj.get("price"),
|
114
|
+
"scopes": obj.get("scopes"),
|
115
|
+
"duration": obj.get("duration"),
|
116
|
+
"description": obj.get("description"),
|
117
|
+
"is_active": obj.get("is_active"),
|
118
|
+
}
|
119
|
+
)
|
120
|
+
return _obj
|
@@ -0,0 +1,123 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
Payment API
|
5
|
+
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
7
|
+
|
8
|
+
The version of the OpenAPI document: 0.1.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 (
|
21
|
+
BaseModel,
|
22
|
+
ConfigDict,
|
23
|
+
Field,
|
24
|
+
StrictBool,
|
25
|
+
StrictFloat,
|
26
|
+
StrictInt,
|
27
|
+
StrictStr,
|
28
|
+
)
|
29
|
+
from typing import Any, ClassVar, Dict, List, Optional, Union
|
30
|
+
from crypticorn.pay.client.models.scope import Scope
|
31
|
+
from typing import Optional, Set
|
32
|
+
from typing_extensions import Self
|
33
|
+
|
34
|
+
|
35
|
+
class ProductRead(BaseModel):
|
36
|
+
"""
|
37
|
+
Model for reading a product
|
38
|
+
""" # noqa: E501
|
39
|
+
|
40
|
+
name: StrictStr = Field(description="Product name")
|
41
|
+
price: Union[StrictFloat, StrictInt] = Field(description="Product price")
|
42
|
+
scopes: Optional[List[Scope]] = None
|
43
|
+
duration: StrictInt = Field(
|
44
|
+
description="Product duration in days. 0 means unlimited."
|
45
|
+
)
|
46
|
+
description: StrictStr = Field(description="Product description")
|
47
|
+
is_active: StrictBool = Field(description="Product is active")
|
48
|
+
id: StrictStr = Field(description="UID of the product")
|
49
|
+
__properties: ClassVar[List[str]] = [
|
50
|
+
"name",
|
51
|
+
"price",
|
52
|
+
"scopes",
|
53
|
+
"duration",
|
54
|
+
"description",
|
55
|
+
"is_active",
|
56
|
+
"id",
|
57
|
+
]
|
58
|
+
|
59
|
+
model_config = ConfigDict(
|
60
|
+
populate_by_name=True,
|
61
|
+
validate_assignment=True,
|
62
|
+
protected_namespaces=(),
|
63
|
+
)
|
64
|
+
|
65
|
+
def to_str(self) -> str:
|
66
|
+
"""Returns the string representation of the model using alias"""
|
67
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
68
|
+
|
69
|
+
def to_json(self) -> str:
|
70
|
+
"""Returns the JSON representation of the model using alias"""
|
71
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
72
|
+
return json.dumps(self.to_dict())
|
73
|
+
|
74
|
+
@classmethod
|
75
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
76
|
+
"""Create an instance of ProductRead from a JSON string"""
|
77
|
+
return cls.from_dict(json.loads(json_str))
|
78
|
+
|
79
|
+
def to_dict(self) -> Dict[str, Any]:
|
80
|
+
"""Return the dictionary representation of the model using alias.
|
81
|
+
|
82
|
+
This has the following differences from calling pydantic's
|
83
|
+
`self.model_dump(by_alias=True)`:
|
84
|
+
|
85
|
+
* `None` is only added to the output dict for nullable fields that
|
86
|
+
were set at model initialization. Other fields with value `None`
|
87
|
+
are ignored.
|
88
|
+
"""
|
89
|
+
excluded_fields: Set[str] = set([])
|
90
|
+
|
91
|
+
_dict = self.model_dump(
|
92
|
+
by_alias=True,
|
93
|
+
exclude=excluded_fields,
|
94
|
+
exclude_none=True,
|
95
|
+
)
|
96
|
+
# set to None if scopes (nullable) is None
|
97
|
+
# and model_fields_set contains the field
|
98
|
+
if self.scopes is None and "scopes" in self.model_fields_set:
|
99
|
+
_dict["scopes"] = None
|
100
|
+
|
101
|
+
return _dict
|
102
|
+
|
103
|
+
@classmethod
|
104
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
105
|
+
"""Create an instance of ProductRead from a dict"""
|
106
|
+
if obj is None:
|
107
|
+
return None
|
108
|
+
|
109
|
+
if not isinstance(obj, dict):
|
110
|
+
return cls.model_validate(obj)
|
111
|
+
|
112
|
+
_obj = cls.model_validate(
|
113
|
+
{
|
114
|
+
"name": obj.get("name"),
|
115
|
+
"price": obj.get("price"),
|
116
|
+
"scopes": obj.get("scopes"),
|
117
|
+
"duration": obj.get("duration"),
|
118
|
+
"description": obj.get("description"),
|
119
|
+
"is_active": obj.get("is_active"),
|
120
|
+
"id": obj.get("id"),
|
121
|
+
}
|
122
|
+
)
|
123
|
+
return _obj
|
@@ -0,0 +1,103 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
Payment API
|
5
|
+
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
7
|
+
|
8
|
+
The version of the OpenAPI document: 0.1.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, Field, StrictInt, StrictStr
|
21
|
+
from typing import Any, ClassVar, Dict, List
|
22
|
+
from typing import Optional, Set
|
23
|
+
from typing_extensions import Self
|
24
|
+
|
25
|
+
|
26
|
+
class ProductSubRead(BaseModel):
|
27
|
+
"""
|
28
|
+
Model for reading a product subscription
|
29
|
+
""" # noqa: E501
|
30
|
+
|
31
|
+
user_id: StrictStr = Field(description="User ID")
|
32
|
+
product_id: StrictStr = Field(description="Product ID")
|
33
|
+
access_from: StrictInt = Field(description="Access from timestamp in milliseconds")
|
34
|
+
access_until: StrictInt = Field(
|
35
|
+
description="Access until timestamp in milliseconds. 0 means unlimited."
|
36
|
+
)
|
37
|
+
id: StrictStr = Field(description="UID of the product subscription")
|
38
|
+
__properties: ClassVar[List[str]] = [
|
39
|
+
"user_id",
|
40
|
+
"product_id",
|
41
|
+
"access_from",
|
42
|
+
"access_until",
|
43
|
+
"id",
|
44
|
+
]
|
45
|
+
|
46
|
+
model_config = ConfigDict(
|
47
|
+
populate_by_name=True,
|
48
|
+
validate_assignment=True,
|
49
|
+
protected_namespaces=(),
|
50
|
+
)
|
51
|
+
|
52
|
+
def to_str(self) -> str:
|
53
|
+
"""Returns the string representation of the model using alias"""
|
54
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
55
|
+
|
56
|
+
def to_json(self) -> str:
|
57
|
+
"""Returns the JSON representation of the model using alias"""
|
58
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
59
|
+
return json.dumps(self.to_dict())
|
60
|
+
|
61
|
+
@classmethod
|
62
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
63
|
+
"""Create an instance of ProductSubRead from a JSON string"""
|
64
|
+
return cls.from_dict(json.loads(json_str))
|
65
|
+
|
66
|
+
def to_dict(self) -> Dict[str, Any]:
|
67
|
+
"""Return the dictionary representation of the model using alias.
|
68
|
+
|
69
|
+
This has the following differences from calling pydantic's
|
70
|
+
`self.model_dump(by_alias=True)`:
|
71
|
+
|
72
|
+
* `None` is only added to the output dict for nullable fields that
|
73
|
+
were set at model initialization. Other fields with value `None`
|
74
|
+
are ignored.
|
75
|
+
"""
|
76
|
+
excluded_fields: Set[str] = set([])
|
77
|
+
|
78
|
+
_dict = self.model_dump(
|
79
|
+
by_alias=True,
|
80
|
+
exclude=excluded_fields,
|
81
|
+
exclude_none=True,
|
82
|
+
)
|
83
|
+
return _dict
|
84
|
+
|
85
|
+
@classmethod
|
86
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
87
|
+
"""Create an instance of ProductSubRead from a dict"""
|
88
|
+
if obj is None:
|
89
|
+
return None
|
90
|
+
|
91
|
+
if not isinstance(obj, dict):
|
92
|
+
return cls.model_validate(obj)
|
93
|
+
|
94
|
+
_obj = cls.model_validate(
|
95
|
+
{
|
96
|
+
"user_id": obj.get("user_id"),
|
97
|
+
"product_id": obj.get("product_id"),
|
98
|
+
"access_from": obj.get("access_from"),
|
99
|
+
"access_until": obj.get("access_until"),
|
100
|
+
"id": obj.get("id"),
|
101
|
+
}
|
102
|
+
)
|
103
|
+
return _obj
|
@@ -0,0 +1,142 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
Payment API
|
5
|
+
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
7
|
+
|
8
|
+
The version of the OpenAPI document: 0.1.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 (
|
21
|
+
BaseModel,
|
22
|
+
ConfigDict,
|
23
|
+
StrictBool,
|
24
|
+
StrictFloat,
|
25
|
+
StrictInt,
|
26
|
+
StrictStr,
|
27
|
+
)
|
28
|
+
from typing import Any, ClassVar, Dict, List, Optional, Union
|
29
|
+
from crypticorn.pay.client.models.scope import Scope
|
30
|
+
from typing import Optional, Set
|
31
|
+
from typing_extensions import Self
|
32
|
+
|
33
|
+
|
34
|
+
class ProductUpdate(BaseModel):
|
35
|
+
"""
|
36
|
+
Model for updating a product
|
37
|
+
""" # noqa: E501
|
38
|
+
|
39
|
+
name: Optional[StrictStr] = None
|
40
|
+
price: Optional[Union[StrictFloat, StrictInt]] = None
|
41
|
+
scopes: Optional[List[Scope]] = None
|
42
|
+
duration: Optional[StrictInt] = None
|
43
|
+
description: Optional[StrictStr] = None
|
44
|
+
is_active: Optional[StrictBool] = None
|
45
|
+
__properties: ClassVar[List[str]] = [
|
46
|
+
"name",
|
47
|
+
"price",
|
48
|
+
"scopes",
|
49
|
+
"duration",
|
50
|
+
"description",
|
51
|
+
"is_active",
|
52
|
+
]
|
53
|
+
|
54
|
+
model_config = ConfigDict(
|
55
|
+
populate_by_name=True,
|
56
|
+
validate_assignment=True,
|
57
|
+
protected_namespaces=(),
|
58
|
+
)
|
59
|
+
|
60
|
+
def to_str(self) -> str:
|
61
|
+
"""Returns the string representation of the model using alias"""
|
62
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
63
|
+
|
64
|
+
def to_json(self) -> str:
|
65
|
+
"""Returns the JSON representation of the model using alias"""
|
66
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
67
|
+
return json.dumps(self.to_dict())
|
68
|
+
|
69
|
+
@classmethod
|
70
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
71
|
+
"""Create an instance of ProductUpdate from a JSON string"""
|
72
|
+
return cls.from_dict(json.loads(json_str))
|
73
|
+
|
74
|
+
def to_dict(self) -> Dict[str, Any]:
|
75
|
+
"""Return the dictionary representation of the model using alias.
|
76
|
+
|
77
|
+
This has the following differences from calling pydantic's
|
78
|
+
`self.model_dump(by_alias=True)`:
|
79
|
+
|
80
|
+
* `None` is only added to the output dict for nullable fields that
|
81
|
+
were set at model initialization. Other fields with value `None`
|
82
|
+
are ignored.
|
83
|
+
"""
|
84
|
+
excluded_fields: Set[str] = set([])
|
85
|
+
|
86
|
+
_dict = self.model_dump(
|
87
|
+
by_alias=True,
|
88
|
+
exclude=excluded_fields,
|
89
|
+
exclude_none=True,
|
90
|
+
)
|
91
|
+
# set to None if name (nullable) is None
|
92
|
+
# and model_fields_set contains the field
|
93
|
+
if self.name is None and "name" in self.model_fields_set:
|
94
|
+
_dict["name"] = None
|
95
|
+
|
96
|
+
# set to None if price (nullable) is None
|
97
|
+
# and model_fields_set contains the field
|
98
|
+
if self.price is None and "price" in self.model_fields_set:
|
99
|
+
_dict["price"] = None
|
100
|
+
|
101
|
+
# set to None if scopes (nullable) is None
|
102
|
+
# and model_fields_set contains the field
|
103
|
+
if self.scopes is None and "scopes" in self.model_fields_set:
|
104
|
+
_dict["scopes"] = None
|
105
|
+
|
106
|
+
# set to None if duration (nullable) is None
|
107
|
+
# and model_fields_set contains the field
|
108
|
+
if self.duration is None and "duration" in self.model_fields_set:
|
109
|
+
_dict["duration"] = None
|
110
|
+
|
111
|
+
# set to None if description (nullable) is None
|
112
|
+
# and model_fields_set contains the field
|
113
|
+
if self.description is None and "description" in self.model_fields_set:
|
114
|
+
_dict["description"] = None
|
115
|
+
|
116
|
+
# set to None if is_active (nullable) is None
|
117
|
+
# and model_fields_set contains the field
|
118
|
+
if self.is_active is None and "is_active" in self.model_fields_set:
|
119
|
+
_dict["is_active"] = None
|
120
|
+
|
121
|
+
return _dict
|
122
|
+
|
123
|
+
@classmethod
|
124
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
125
|
+
"""Create an instance of ProductUpdate from a dict"""
|
126
|
+
if obj is None:
|
127
|
+
return None
|
128
|
+
|
129
|
+
if not isinstance(obj, dict):
|
130
|
+
return cls.model_validate(obj)
|
131
|
+
|
132
|
+
_obj = cls.model_validate(
|
133
|
+
{
|
134
|
+
"name": obj.get("name"),
|
135
|
+
"price": obj.get("price"),
|
136
|
+
"scopes": obj.get("scopes"),
|
137
|
+
"duration": obj.get("duration"),
|
138
|
+
"description": obj.get("description"),
|
139
|
+
"is_active": obj.get("is_active"),
|
140
|
+
}
|
141
|
+
)
|
142
|
+
return _obj
|
@@ -37,12 +37,12 @@ class ProductUpdateModel(BaseModel):
|
|
37
37
|
""" # noqa: E501
|
38
38
|
|
39
39
|
id: Optional[StrictStr] = None
|
40
|
-
name: Optional[StrictStr]
|
41
|
-
price: Optional[Union[StrictFloat, StrictInt]]
|
42
|
-
scopes: Optional[List[Scope]]
|
43
|
-
duration: Optional[StrictInt]
|
44
|
-
description: Optional[StrictStr]
|
45
|
-
is_active: Optional[StrictBool]
|
40
|
+
name: Optional[StrictStr] = None
|
41
|
+
price: Optional[Union[StrictFloat, StrictInt]] = None
|
42
|
+
scopes: Optional[List[Scope]] = None
|
43
|
+
duration: Optional[StrictInt] = None
|
44
|
+
description: Optional[StrictStr] = None
|
45
|
+
is_active: Optional[StrictBool] = None
|
46
46
|
__properties: ClassVar[List[str]] = [
|
47
47
|
"id",
|
48
48
|
"name",
|
@@ -31,8 +31,8 @@ class Scope(str, Enum):
|
|
31
31
|
WRITE_COLON_HIVE_COLON_MODEL = "write:hive:model"
|
32
32
|
READ_COLON_TRADE_COLON_BOTS = "read:trade:bots"
|
33
33
|
WRITE_COLON_TRADE_COLON_BOTS = "write:trade:bots"
|
34
|
-
|
35
|
-
|
34
|
+
READ_COLON_TRADE_COLON_EXCHANGEKEYS = "read:trade:exchangekeys"
|
35
|
+
WRITE_COLON_TRADE_COLON_EXCHANGEKEYS = "write:trade:exchangekeys"
|
36
36
|
READ_COLON_TRADE_COLON_ORDERS = "read:trade:orders"
|
37
37
|
READ_COLON_TRADE_COLON_ACTIONS = "read:trade:actions"
|
38
38
|
WRITE_COLON_TRADE_COLON_ACTIONS = "write:trade:actions"
|
crypticorn/pay/client/rest.py
CHANGED
@@ -57,7 +57,10 @@ class RESTClientObject:
|
|
57
57
|
# maxsize is number of requests to host that are allowed in parallel
|
58
58
|
self.maxsize = configuration.connection_pool_maxsize
|
59
59
|
|
60
|
-
self.ssl_context = ssl.create_default_context(
|
60
|
+
self.ssl_context = ssl.create_default_context(
|
61
|
+
cafile=configuration.ssl_ca_cert,
|
62
|
+
cadata=configuration.ca_cert_data,
|
63
|
+
)
|
61
64
|
if configuration.cert_file:
|
62
65
|
self.ssl_context.load_cert_chain(
|
63
66
|
configuration.cert_file, keyfile=configuration.key_file
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: crypticorn
|
3
|
-
Version: 2.4.
|
3
|
+
Version: 2.4.6
|
4
4
|
Summary: Maximise Your Crypto Trading Profits with AI Predictions
|
5
5
|
Author-email: Crypticorn <timon@crypticorn.com>
|
6
6
|
Project-URL: Homepage, https://crypticorn.com
|
@@ -95,7 +95,12 @@ client = ApiClient(base_url=BaseUrl.Prod, api_key="your-api-key")
|
|
95
95
|
asyncio.run(client.pay.models.get_products())
|
96
96
|
asyncio.run(client.close())
|
97
97
|
```
|
98
|
+
...or wrapped in a function
|
99
|
+
async def main():
|
100
|
+
await client.pay.products.get_products()
|
98
101
|
|
102
|
+
asyncio.run(main())
|
103
|
+
asyncio.run(client.close())
|
99
104
|
## Response Types
|
100
105
|
|
101
106
|
There are three different available output formats you can choose from:
|
@@ -1,5 +1,5 @@
|
|
1
1
|
crypticorn/__init__.py,sha256=TL41V09dmtbd2ee07wmOuG9KJJpyvLMPJi5DEd9bDyU,129
|
2
|
-
crypticorn/client.py,sha256=
|
2
|
+
crypticorn/client.py,sha256=iaik7Ddy04oF8XW3Rh_Knn4LDx3XeJP5ZMefFol68EM,5001
|
3
3
|
crypticorn/auth/__init__.py,sha256=JAl1tBLK9pYLr_-YKaj581c-c94PWLoqnatTIVAVvMM,81
|
4
4
|
crypticorn/auth/main.py,sha256=1ggu7V--I43TLWu2TLFRSnQmtaJEs8C8FbSXycCdvkI,686
|
5
5
|
crypticorn/auth/client/__init__.py,sha256=Xda54fgvIunmwHy8CeOI_L3LJxQJ6qcoN3HQ24zIPxo,4970
|
@@ -62,10 +62,10 @@ crypticorn/cli/templates/auth.py,sha256=Q1TxlA7qzhjvrqp1xz1aV2vGnj3DKFNN-VSl3o0B
|
|
62
62
|
crypticorn/common/__init__.py,sha256=7DCYhqkqmzCyACdLWn3GuhccBcx5jQcwlIsl_cCr7gM,269
|
63
63
|
crypticorn/common/auth.py,sha256=wPdPLgTva4-bN-iOv8woe6n1t06LXNRbhbsNIEAHkuE,7496
|
64
64
|
crypticorn/common/enums.py,sha256=6cCwQZVdXUoN33WA8kSf4LeSZyExZcWO2ahSsgGddCs,1243
|
65
|
-
crypticorn/common/errors.py,sha256
|
65
|
+
crypticorn/common/errors.py,sha256=L4Tcfbd5ckzWlHDnN1K0eTXIOkQU1xFhqsgNdG6yI9o,19968
|
66
66
|
crypticorn/common/pydantic.py,sha256=pmnGYCIrLv59wZkDbvPyK9NJmgPJWW74LXTdIWSjOkY,1063
|
67
|
-
crypticorn/common/scopes.py,sha256=
|
68
|
-
crypticorn/common/sorter.py,sha256=
|
67
|
+
crypticorn/common/scopes.py,sha256=MgH9sGodJfPjEqVtFsaczNmwEaGL2wuGzeTpga_ehXs,2407
|
68
|
+
crypticorn/common/sorter.py,sha256=keRRp4u7KJk3nS2A8tMdSF8Hbc1jcsre8KdTVuetfGc,1278
|
69
69
|
crypticorn/common/urls.py,sha256=X557WaODUqW2dECi-mOjTbmhkSpnp40fPXDdvlnBXfo,805
|
70
70
|
crypticorn/common/utils.py,sha256=qzpTTdZarpK9vgCQi36puS2GS_vmdIA6ApxoOVuszPg,1460
|
71
71
|
crypticorn/hive/__init__.py,sha256=hRfTlEzEql4msytdUC_04vfaHzVKG5CGZle1M-9QFgY,81
|
@@ -165,31 +165,31 @@ crypticorn/metrics/client/models/base_response_list_dict.py,sha256=8_RJ-T7c2TTsW
|
|
165
165
|
crypticorn/metrics/client/models/base_response_list_exchange_mapping.py,sha256=WTgCZMBuRtdJkFozp5nmY0sBvGwZfNGWfteVI5ryjkA,4140
|
166
166
|
crypticorn/metrics/client/models/base_response_list_str.py,sha256=CiC2L4KwEfx4MhJjmhJHq6MC6awi1eM_ZHLK_uoz1FY,3535
|
167
167
|
crypticorn/metrics/client/models/error_response.py,sha256=kCwi5tas3eskJLsCu-YKWAitUD6nJtYLGmf_GSXoNns,3448
|
168
|
-
crypticorn/metrics/client/models/exchange_mapping.py,sha256=
|
168
|
+
crypticorn/metrics/client/models/exchange_mapping.py,sha256=noWjAm9V5TStmydDymleIhweVSszBJIEcCM4SEGc1YE,4498
|
169
169
|
crypticorn/metrics/client/models/health_check_response.py,sha256=Zs0x3q6VVBaZZZVShhtZvcSfxQoOsNLzT44VeDUEOak,2930
|
170
170
|
crypticorn/metrics/client/models/http_validation_error.py,sha256=kSD68KR46dJsvbvL1EbS4pMbkbH40gzSHbH0OBQad74,3266
|
171
171
|
crypticorn/metrics/client/models/market.py,sha256=yjCIMjIRqCW-81qoXnm3aWle0BNPrpsmepZk-UFS6ow,877
|
172
172
|
crypticorn/metrics/client/models/market_type.py,sha256=1xegIZVAcwb3UtMMXzhXdFxAxoHMVVf0OjBCNCdzenE,891
|
173
173
|
crypticorn/metrics/client/models/severity.py,sha256=AX81o6p2zjPDe1KZEwB5cQiScBm2BnKUEy0zDMLUNxQ,911
|
174
174
|
crypticorn/metrics/client/models/time_interval.py,sha256=Y2B7IhTJka5-e0zkKoH3xIaF-9_LVyrDhqxl6wv-Vmw,952
|
175
|
-
crypticorn/metrics/client/models/trading_status.py,sha256=
|
175
|
+
crypticorn/metrics/client/models/trading_status.py,sha256=Eek1P0zGrUib9VE1AaeSYna8eG0V_N1gQG-O8H3hV-0,926
|
176
176
|
crypticorn/metrics/client/models/validation_error.py,sha256=XAkAm1zTjroJLvnmQB6rUJq7tgWwhMYjqGukqMMJRmM,3376
|
177
177
|
crypticorn/metrics/client/models/validation_error_loc_inner.py,sha256=p0a-GosxsFHZV22hz3u4PNwj0kPd8-7CWRNwAO05pvk,5277
|
178
178
|
crypticorn/pay/__init__.py,sha256=ux-B-YbNetpTlZTb2fijuGUOEmSm4IB0fYtieGnVDBg,78
|
179
179
|
crypticorn/pay/main.py,sha256=6sCELtBpQglCDpHlOtCMfWct_itCNv9QZCeumZI22A0,601
|
180
|
-
crypticorn/pay/client/__init__.py,sha256=
|
180
|
+
crypticorn/pay/client/__init__.py,sha256=TH8EdKCLJEwTTolbAwieP9yJFpIOA890ag5PRg4WHwI,2465
|
181
181
|
crypticorn/pay/client/api_client.py,sha256=axhwIXY3gZod8xn8BCHjA-8v-wnyyHrxV5TxcMFqjVA,26924
|
182
182
|
crypticorn/pay/client/api_response.py,sha256=WhxwYDSMm6wPixp9CegO8dJzjFxDz3JF1yCq9s0ZqKE,639
|
183
|
-
crypticorn/pay/client/configuration.py,sha256=
|
183
|
+
crypticorn/pay/client/configuration.py,sha256=3OBBS0Q5lthyqgjRpAssw_fJStRpzsd39PUpyg7OQfM,19164
|
184
184
|
crypticorn/pay/client/exceptions.py,sha256=BewSfp_OiqQ9ybRNlkZ7A_nn-8kDY1iiBSlYocagl3w,6435
|
185
185
|
crypticorn/pay/client/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
186
|
-
crypticorn/pay/client/rest.py,sha256=
|
186
|
+
crypticorn/pay/client/rest.py,sha256=q0P8SwRU9kXGGOaeJJjYx8JSyPU_KlO1XSZ5t8G0Nn8,7035
|
187
187
|
crypticorn/pay/client/api/__init__.py,sha256=vbisPmBd4c5G3_MHAlInKeu1obSr8witdtwxC43BnN8,302
|
188
188
|
crypticorn/pay/client/api/now_payments_api.py,sha256=nbTM9vqDwf5OgGIT3Fsg84AoTCCWLAnSwpOz3S9N18Q,33011
|
189
|
-
crypticorn/pay/client/api/payments_api.py,sha256=
|
190
|
-
crypticorn/pay/client/api/products_api.py,sha256=
|
189
|
+
crypticorn/pay/client/api/payments_api.py,sha256=Nprz9wnXMmYzpKdPxtmr9vPrWm9qyS1ucr3YHSZvrls,34252
|
190
|
+
crypticorn/pay/client/api/products_api.py,sha256=Av_LkSXFihzoaDDmX7LVqjvHY_Hw0e4jqLNkHm1Tf_0,34018
|
191
191
|
crypticorn/pay/client/api/status_api.py,sha256=XSfwyUDRS3XMB8mfngLhtYqEFMOE2t6m_PAWcwX9eg0,9908
|
192
|
-
crypticorn/pay/client/models/__init__.py,sha256=
|
192
|
+
crypticorn/pay/client/models/__init__.py,sha256=ByKifb8yOXhBLZIncvKdj5JZgtQkpIbC5uFn-1fjWd0,1603
|
193
193
|
crypticorn/pay/client/models/api_status_res.py,sha256=2MSDgnzQZpQyjFu7I-4HkJI3ygy0Dzs1lPdvgzM63Jg,2494
|
194
194
|
crypticorn/pay/client/models/body_create_now_invoice.py,sha256=F--oFNyB0bv2mmFpwd3jG9ZGEl0Ip7slVFdSkxbVbe8,3045
|
195
195
|
crypticorn/pay/client/models/body_create_product.py,sha256=_Jh3LqwcC8U3Rz14NP6Aohimea7d3TsrSWTexm5iB5Q,3030
|
@@ -216,13 +216,17 @@ crypticorn/pay/client/models/now_payment_model.py,sha256=TbQLShcgKkF2AYRN9eAU5k6
|
|
216
216
|
crypticorn/pay/client/models/now_payment_status.py,sha256=D74hYmRztyg9V6V79K3eK34eGE7KKVT2vdCgzqAlEmA,955
|
217
217
|
crypticorn/pay/client/models/now_webhook_payload.py,sha256=6Fb2eW1w53ahNNCIXJWWK12XuD9B2t-_P_8vhqDy-Ng,6773
|
218
218
|
crypticorn/pay/client/models/partial_product_update_model.py,sha256=TIKIwGlTOT37fj0vnY3lcA_3wTlzHgFzR5141vxm-I8,4805
|
219
|
-
crypticorn/pay/client/models/payment.py,sha256=
|
219
|
+
crypticorn/pay/client/models/payment.py,sha256=CGpAkuK-gZR54fi-D35hEmUKvozumDSWCp7ks_9Le04,3585
|
220
220
|
crypticorn/pay/client/models/payment_status.py,sha256=X27W1roil70iUNkcJVKABK1dRpAUoNPa-ms8XJniGkI,877
|
221
221
|
crypticorn/pay/client/models/product.py,sha256=6_L59YIz-rdN5fHypJUcRpaU-hpG1l4xF1Cl2n8sF0k,2572
|
222
|
+
crypticorn/pay/client/models/product_create.py,sha256=D4_nazTIXavIxut2qTMWik4hvLS3eIq2bTvEwynzPPI,3597
|
222
223
|
crypticorn/pay/client/models/product_model.py,sha256=emo_bZGfI9k3dtR_jfzlJGFUTR1SZosLRfkaObj3J6g,3855
|
224
|
+
crypticorn/pay/client/models/product_read.py,sha256=RH4K8DFHYKdA2w3EVtGriJ_4N64YsHqhzWakUrByx-E,3701
|
225
|
+
crypticorn/pay/client/models/product_sub_read.py,sha256=-5lPLN2PmLIqQcMy2ziCyMZu2VEu_5vHnZ_bPEuMUcY,3210
|
223
226
|
crypticorn/pay/client/models/product_subs_model.py,sha256=DeeVu-8aDJneHov97hlNR4JFph_jGu2yt9_eVTPWzpw,3355
|
224
|
-
crypticorn/pay/client/models/
|
225
|
-
crypticorn/pay/client/models/
|
227
|
+
crypticorn/pay/client/models/product_update.py,sha256=gMnHofo6JaWR53sN7WHa70tbQsfAZah_-cWHkEoD2LM,4495
|
228
|
+
crypticorn/pay/client/models/product_update_model.py,sha256=j6EGDSqko5owqk-Qrx_9fh1mQQB87welVhCBmDkWcS0,4777
|
229
|
+
crypticorn/pay/client/models/scope.py,sha256=RQ6j1jQfNiu1CVnh_LMoAGSeunaXyISMgU-naCncBQw,2033
|
226
230
|
crypticorn/pay/client/models/services.py,sha256=GSR4E0IVNzmMkPW6AdhW9MmHFmku0YBfx27xWzAFDGI,709
|
227
231
|
crypticorn/pay/client/models/unified_payment_model.py,sha256=5IXOcKctWFejLAq_x3btO2R29fRaKMDSgMfgcYYJKY4,3621
|
228
232
|
crypticorn/pay/client/models/validation_error.py,sha256=dEYMLbX_N7IfQLeuL-BRBVnh5-plOpUe6R2YZTMzEX4,3206
|
@@ -273,8 +277,8 @@ crypticorn/trade/client/models/tpsl.py,sha256=LlqzHaSA-HgQp1k4PhRckmxWNhgVZU6NgB
|
|
273
277
|
crypticorn/trade/client/models/trading_action_type.py,sha256=oLVDp94VeC9kjYbgZN7dHn2t07YGGUrAkNr2PE435eM,827
|
274
278
|
crypticorn/trade/client/models/validation_error.py,sha256=x4rR325juK4EJiFJ8l5IKp2werY8y6PWbLx_WJMxbbA,3208
|
275
279
|
crypticorn/trade/client/models/validation_error_loc_inner.py,sha256=ZB2NbHkxhjDZ2-qK1HyvzTUnabeCdxeTjbSAHNmWq5A,5111
|
276
|
-
crypticorn-2.4.
|
277
|
-
crypticorn-2.4.
|
278
|
-
crypticorn-2.4.
|
279
|
-
crypticorn-2.4.
|
280
|
-
crypticorn-2.4.
|
280
|
+
crypticorn-2.4.6.dist-info/METADATA,sha256=xp-KF9CnKywMVF_adx_BiSmBxgSsvBdLZwPREa2uqUM,6034
|
281
|
+
crypticorn-2.4.6.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
282
|
+
crypticorn-2.4.6.dist-info/entry_points.txt,sha256=d_xHsGvUTebPveVUK0SrpDFQ5ZRSjlI7lNCc11sn2PM,59
|
283
|
+
crypticorn-2.4.6.dist-info/top_level.txt,sha256=EP3NY216qIBYfmvGl0L2Zc9ItP0DjGSkiYqd9xJwGcM,11
|
284
|
+
crypticorn-2.4.6.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|