fable-model 0.3.0__tar.gz → 0.4.0__tar.gz
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.
- {fable_model-0.3.0 → fable_model-0.4.0}/PKG-INFO +2 -2
- {fable_model-0.3.0 → fable_model-0.4.0}/README.md +1 -1
- {fable_model-0.3.0 → fable_model-0.4.0}/fable_model/__init__.py +2 -0
- {fable_model-0.3.0 → fable_model-0.4.0}/fable_model/broker.py +35 -7
- {fable_model-0.3.0 → fable_model-0.4.0}/pyproject.toml +1 -1
- {fable_model-0.3.0 → fable_model-0.4.0}/LICENSE +0 -0
- {fable_model-0.3.0 → fable_model-0.4.0}/fable_model/common.py +0 -0
- {fable_model-0.3.0 → fable_model-0.4.0}/fable_model/mask.py +0 -0
- {fable_model-0.3.0 → fable_model-0.4.0}/fable_model/match.py +0 -0
- {fable_model-0.3.0 → fable_model-0.4.0}/fable_model/transform.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: fable-model
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.4.0
|
|
4
4
|
Summary: Data models utilized in the FABLE ecosystem's HTTP-based services.
|
|
5
5
|
License-Expression: MIT
|
|
6
6
|
License-File: LICENSE
|
|
@@ -23,7 +23,7 @@ Description-Content-Type: text/markdown
|
|
|
23
23
|
|
|
24
24
|
[](https://pypi.org/project/fable-model/)
|
|
25
25
|
[](https://pypi.org/project/fable-model/)
|
|
26
|
-

|
|
27
27
|
[](https://pypi.org/project/fable-model/)
|
|
28
28
|
[](https://conventionalcommits.org)
|
|
29
29
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[](https://pypi.org/project/fable-model/)
|
|
2
2
|
[](https://pypi.org/project/fable-model/)
|
|
3
|
-

|
|
4
4
|
[](https://pypi.org/project/fable-model/)
|
|
5
5
|
[](https://conventionalcommits.org)
|
|
6
6
|
|
|
@@ -75,6 +75,7 @@ from .broker import (
|
|
|
75
75
|
ClientResultRequest,
|
|
76
76
|
MatchedClientVector,
|
|
77
77
|
ClientResultResponse,
|
|
78
|
+
SessionGetResponse,
|
|
78
79
|
)
|
|
79
80
|
|
|
80
81
|
__all__ = [
|
|
@@ -154,4 +155,5 @@ __all__ = [
|
|
|
154
155
|
"MatchedClientVector",
|
|
155
156
|
"ClientResultResponse",
|
|
156
157
|
"ServiceBaseInformation",
|
|
158
|
+
"SessionGetResponse",
|
|
157
159
|
]
|
|
@@ -1,17 +1,25 @@
|
|
|
1
1
|
from typing import Annotated
|
|
2
2
|
|
|
3
|
-
from pydantic import BaseModel, Field
|
|
3
|
+
from pydantic import BaseModel, Field, SecretStr, field_serializer
|
|
4
4
|
|
|
5
5
|
from fable_model.common import BitVectorEntity
|
|
6
6
|
from fable_model.match import MatchConfig
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
class BaseSessionModel(BaseModel):
|
|
10
|
-
session:
|
|
10
|
+
session: SecretStr
|
|
11
|
+
|
|
12
|
+
@field_serializer("session")
|
|
13
|
+
def serialize_session(self, value: SecretStr) -> str:
|
|
14
|
+
return value.get_secret_value()
|
|
11
15
|
|
|
12
16
|
|
|
13
17
|
class BaseAuthenticatedSessionModel(BaseSessionModel):
|
|
14
|
-
token:
|
|
18
|
+
token: SecretStr
|
|
19
|
+
|
|
20
|
+
@field_serializer("token")
|
|
21
|
+
def serialize_token(self, value: SecretStr) -> str:
|
|
22
|
+
return value.get_secret_value()
|
|
15
23
|
|
|
16
24
|
|
|
17
25
|
class SessionCreationRequest(BaseSessionModel):
|
|
@@ -23,8 +31,16 @@ class SessionUpdateResponse(BaseSessionModel):
|
|
|
23
31
|
expires_at: int
|
|
24
32
|
|
|
25
33
|
|
|
34
|
+
class SessionGetResponse(SessionUpdateResponse):
|
|
35
|
+
match_config: MatchConfig
|
|
36
|
+
|
|
37
|
+
|
|
26
38
|
class SessionCreationResponse(SessionUpdateResponse):
|
|
27
|
-
token:
|
|
39
|
+
token: SecretStr
|
|
40
|
+
|
|
41
|
+
@field_serializer("token")
|
|
42
|
+
def serialize_token(self, value: SecretStr) -> str:
|
|
43
|
+
return value.get_secret_value()
|
|
28
44
|
|
|
29
45
|
|
|
30
46
|
SessionDeletionRequest = BaseAuthenticatedSessionModel
|
|
@@ -41,7 +57,11 @@ class MetaBitVectorEntity(BitVectorEntity):
|
|
|
41
57
|
|
|
42
58
|
|
|
43
59
|
class BaseClientModel(BaseSessionModel):
|
|
44
|
-
client:
|
|
60
|
+
client: SecretStr
|
|
61
|
+
|
|
62
|
+
@field_serializer("client")
|
|
63
|
+
def serialize_client(self, value: SecretStr) -> str:
|
|
64
|
+
return value.get_secret_value()
|
|
45
65
|
|
|
46
66
|
|
|
47
67
|
class ClientSubmissionRequest(BaseClientModel):
|
|
@@ -49,16 +69,24 @@ class ClientSubmissionRequest(BaseClientModel):
|
|
|
49
69
|
|
|
50
70
|
|
|
51
71
|
class ClientVectorBatch(BaseModel):
|
|
52
|
-
client:
|
|
72
|
+
client: SecretStr
|
|
53
73
|
ids: list[str]
|
|
54
74
|
|
|
75
|
+
@field_serializer("client")
|
|
76
|
+
def serialize_client(self, value: SecretStr) -> str:
|
|
77
|
+
return value.get_secret_value()
|
|
78
|
+
|
|
55
79
|
|
|
56
80
|
class VectorMatchBatch(BaseModel):
|
|
57
81
|
domain: ClientVectorBatch
|
|
58
82
|
range: list[ClientVectorBatch]
|
|
59
|
-
session:
|
|
83
|
+
session: SecretStr
|
|
60
84
|
config: MatchConfig
|
|
61
85
|
|
|
86
|
+
@field_serializer("session")
|
|
87
|
+
def serialize_session(self, value: SecretStr) -> str:
|
|
88
|
+
return value.get_secret_value()
|
|
89
|
+
|
|
62
90
|
|
|
63
91
|
class ClientResultRequest(BaseClientModel):
|
|
64
92
|
show_unfinished_results: bool = False
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|