mixpeek 0.15.2__py3-none-any.whl → 0.16.0__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.
- mixpeek/_hooks/__init__.py +0 -1
- mixpeek/_hooks/sdkhooks.py +0 -2
- mixpeek/_version.py +1 -1
- mixpeek/assets.py +74 -56
- mixpeek/collections.py +46 -40
- mixpeek/{featureextractors.py → feature_extractors.py} +6 -6
- mixpeek/feature_search.py +330 -0
- mixpeek/features.py +44 -356
- mixpeek/health.py +3 -15
- mixpeek/{ingest.py → ingest_assets.py} +43 -25
- mixpeek/models/__init__.py +291 -160
- mixpeek/models/assignmentconfig.py +25 -0
- mixpeek/models/availablemodels.py +2 -1
- mixpeek/models/{availableindexesresponse.py → availablemodelsresponse.py} +8 -4
- mixpeek/models/classificationmatch.py +72 -0
- mixpeek/models/classificationwithfeature.py +73 -0
- mixpeek/models/classify_features_v1_entities_taxonomies_taxonomy_classify_postop.py +73 -0
- mixpeek/models/{create_api_key_organizations_users_user_email_api_keys_postop.py → create_api_key_v1_organizations_users_user_email_api_keys_postop.py} +2 -2
- mixpeek/models/{create_collection_collections_postop.py → create_collection_v1_collections_postop.py} +2 -2
- mixpeek/models/create_taxonomy_v1_entities_taxonomies_postop.py +59 -0
- mixpeek/models/createnamespacerequest.py +2 -2
- mixpeek/models/{delete_api_key_organizations_users_user_email_api_keys_key_name_deleteop.py → delete_api_key_v1_organizations_users_user_email_api_keys_key_name_deleteop.py} +2 -2
- mixpeek/models/{delete_asset_assets_asset_id_deleteop.py → delete_asset_v1_assets_asset_id_deleteop.py} +2 -2
- mixpeek/models/delete_classifications_v1_entities_taxonomies_taxonomy_classifications_classification_id_deleteop.py +70 -0
- mixpeek/models/{delete_collection_collections_collection_deleteop.py → delete_collection_v1_collections_collection_deleteop.py} +2 -2
- mixpeek/models/{delete_feature_features_feature_id_deleteop.py → delete_feature_v1_features_feature_id_deleteop.py} +2 -2
- mixpeek/models/{delete_namespace_namespaces_namespace_deleteop.py → delete_namespace_v1_namespaces_namespace_deleteop.py} +2 -2
- mixpeek/models/delete_taxonomy_v1_entities_taxonomies_taxonomy_deleteop.py +59 -0
- mixpeek/models/{delete_user_organizations_users_user_email_deleteop.py → delete_user_v1_organizations_users_user_email_deleteop.py} +2 -2
- mixpeek/models/discoverrequest.py +74 -0
- mixpeek/models/embeddingconfig.py +33 -0
- mixpeek/models/embeddingrequest.py +40 -7
- mixpeek/models/featureoptions.py +25 -0
- mixpeek/models/{full_asset_update_assets_asset_id_putop.py → full_asset_update_v1_assets_asset_id_putop.py} +2 -2
- mixpeek/models/{full_feature_update_features_feature_id_putop.py → full_feature_update_v1_features_feature_id_putop.py} +2 -2
- mixpeek/models/genericsuccessresponse.py +17 -0
- mixpeek/models/{get_asset_assets_asset_id_getop.py → get_asset_v1_assets_asset_id_getop.py} +2 -2
- mixpeek/models/{get_asset_with_features_assets_asset_id_features_getop.py → get_asset_with_features_v1_assets_asset_id_features_getop.py} +2 -2
- mixpeek/models/{get_collection_collections_collection_getop.py → get_collection_v1_collections_collection_getop.py} +2 -2
- mixpeek/models/{get_feature_features_feature_id_getop.py → get_feature_v1_features_feature_id_getop.py} +2 -2
- mixpeek/models/{get_namespace_namespaces_namespace_getop.py → get_namespace_v1_namespaces_namespace_getop.py} +2 -2
- mixpeek/models/{get_task_tasks_task_id_getop.py → get_task_v1_tasks_task_id_getop.py} +2 -2
- mixpeek/models/get_taxonomy_node_v1_entities_taxonomies_nodes_node_getop.py +59 -0
- mixpeek/models/get_taxonomy_v1_entities_taxonomies_taxonomy_getop.py +59 -0
- mixpeek/models/{get_user_organizations_users_user_email_getop.py → get_user_v1_organizations_users_user_email_getop.py} +2 -2
- mixpeek/models/{ingest_image_url_ingest_images_url_postop.py → ingest_image_url_v1_ingest_images_url_postop.py} +2 -2
- mixpeek/models/{ingest_text_ingest_text_postop.py → ingest_text_v1_ingest_text_postop.py} +2 -2
- mixpeek/models/{ingest_video_url_ingest_videos_url_postop.py → ingest_video_url_v1_ingest_videos_url_postop.py} +2 -2
- mixpeek/models/{kill_task_tasks_task_id_deleteop.py → kill_task_v1_tasks_task_id_deleteop.py} +2 -2
- mixpeek/models/{list_assets_assets_postop.py → list_assets_v1_assets_postop.py} +2 -2
- mixpeek/models/list_classifications_v1_entities_taxonomies_taxonomy_classifications_postop.py +92 -0
- mixpeek/models/{list_collections_collections_getop.py → list_collections_v1_collections_getop.py} +2 -2
- mixpeek/models/{list_features_features_postop.py → list_features_v1_features_postop.py} +2 -2
- mixpeek/models/list_taxonomies_v1_entities_taxonomies_getop.py +67 -0
- mixpeek/models/listclassificationsrequest.py +69 -0
- mixpeek/models/listclassificationsresponse.py +31 -0
- mixpeek/models/listtaxonomiesresponse.py +24 -0
- mixpeek/models/modeldetails.py +9 -5
- mixpeek/models/nodeoptions.py +16 -0
- mixpeek/models/nodeupdate.py +51 -0
- mixpeek/models/{partial_asset_update_assets_asset_id_patchop.py → partial_asset_update_v1_assets_asset_id_patchop.py} +2 -2
- mixpeek/models/permission.py +12 -0
- mixpeek/models/{search_assets_assets_search_postop.py → search_assets_v1_assets_search_postop.py} +2 -2
- mixpeek/models/{search_features_features_search_postop.py → search_features_v1_features_search_postop.py} +4 -4
- mixpeek/models/taxonomycreate.py +20 -0
- mixpeek/models/taxonomymodel.py +27 -0
- mixpeek/models/taxonomynode.py +101 -0
- mixpeek/models/taxonomynodecreate.py +63 -0
- mixpeek/models/taxonomyupdate.py +55 -0
- mixpeek/models/{update_api_key_organizations_users_user_email_api_keys_key_name_patchop.py → update_api_key_v1_organizations_users_user_email_api_keys_key_name_patchop.py} +2 -2
- mixpeek/models/{update_collection_collections_collection_putop.py → update_collection_v1_collections_collection_putop.py} +2 -2
- mixpeek/models/{update_namespace_namespaces_namespace_putop.py → update_namespace_v1_namespaces_namespace_putop.py} +2 -2
- mixpeek/models/update_node_v1_entities_taxonomies_nodes_node_patchop.py +71 -0
- mixpeek/models/update_taxonomy_v1_entities_taxonomies_taxonomy_patchop.py +71 -0
- mixpeek/models/vectormodel.py +1 -0
- mixpeek/namespaces.py +52 -52
- mixpeek/organizations.py +82 -58
- mixpeek/sdk.py +12 -6
- mixpeek/sdkconfiguration.py +4 -4
- mixpeek/tasks.py +22 -16
- mixpeek/taxonomy_entities.py +2214 -0
- {mixpeek-0.15.2.dist-info → mixpeek-0.16.0.dist-info}/METADATA +64 -49
- {mixpeek-0.15.2.dist-info → mixpeek-0.16.0.dist-info}/RECORD +84 -55
- {mixpeek-0.15.2.dist-info → mixpeek-0.16.0.dist-info}/WHEEL +1 -1
@@ -0,0 +1,92 @@
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
from .listclassificationsrequest import (
|
5
|
+
ListClassificationsRequest,
|
6
|
+
ListClassificationsRequestTypedDict,
|
7
|
+
)
|
8
|
+
from mixpeek.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
9
|
+
from mixpeek.utils import (
|
10
|
+
FieldMetadata,
|
11
|
+
HeaderMetadata,
|
12
|
+
PathParamMetadata,
|
13
|
+
QueryParamMetadata,
|
14
|
+
RequestMetadata,
|
15
|
+
)
|
16
|
+
import pydantic
|
17
|
+
from pydantic import model_serializer
|
18
|
+
from typing import Optional
|
19
|
+
from typing_extensions import Annotated, NotRequired, TypedDict
|
20
|
+
|
21
|
+
|
22
|
+
class ListClassificationsV1EntitiesTaxonomiesTaxonomyClassificationsPostRequestTypedDict(
|
23
|
+
TypedDict
|
24
|
+
):
|
25
|
+
taxonomy: str
|
26
|
+
r"""The ID or name of the taxonomy"""
|
27
|
+
list_classifications_request: ListClassificationsRequestTypedDict
|
28
|
+
page: NotRequired[Nullable[int]]
|
29
|
+
page_size: NotRequired[int]
|
30
|
+
x_namespace: NotRequired[Nullable[str]]
|
31
|
+
r"""Optional namespace for data isolation. This can be a namespace name or namespace ID. Example: 'netflix_prod' or 'ns_1234567890'. To create a namespace, use the /namespaces endpoint."""
|
32
|
+
|
33
|
+
|
34
|
+
class ListClassificationsV1EntitiesTaxonomiesTaxonomyClassificationsPostRequest(
|
35
|
+
BaseModel
|
36
|
+
):
|
37
|
+
taxonomy: Annotated[
|
38
|
+
str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
|
39
|
+
]
|
40
|
+
r"""The ID or name of the taxonomy"""
|
41
|
+
|
42
|
+
list_classifications_request: Annotated[
|
43
|
+
ListClassificationsRequest,
|
44
|
+
FieldMetadata(request=RequestMetadata(media_type="application/json")),
|
45
|
+
]
|
46
|
+
|
47
|
+
page: Annotated[
|
48
|
+
OptionalNullable[int],
|
49
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
50
|
+
] = UNSET
|
51
|
+
|
52
|
+
page_size: Annotated[
|
53
|
+
Optional[int],
|
54
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
55
|
+
] = 10
|
56
|
+
|
57
|
+
x_namespace: Annotated[
|
58
|
+
OptionalNullable[str],
|
59
|
+
pydantic.Field(alias="X-Namespace"),
|
60
|
+
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
61
|
+
] = UNSET
|
62
|
+
r"""Optional namespace for data isolation. This can be a namespace name or namespace ID. Example: 'netflix_prod' or 'ns_1234567890'. To create a namespace, use the /namespaces endpoint."""
|
63
|
+
|
64
|
+
@model_serializer(mode="wrap")
|
65
|
+
def serialize_model(self, handler):
|
66
|
+
optional_fields = ["page", "page_size", "X-Namespace"]
|
67
|
+
nullable_fields = ["page", "X-Namespace"]
|
68
|
+
null_default_fields = []
|
69
|
+
|
70
|
+
serialized = handler(self)
|
71
|
+
|
72
|
+
m = {}
|
73
|
+
|
74
|
+
for n, f in self.model_fields.items():
|
75
|
+
k = f.alias or n
|
76
|
+
val = serialized.get(k)
|
77
|
+
serialized.pop(k, None)
|
78
|
+
|
79
|
+
optional_nullable = k in optional_fields and k in nullable_fields
|
80
|
+
is_set = (
|
81
|
+
self.__pydantic_fields_set__.intersection({n})
|
82
|
+
or k in null_default_fields
|
83
|
+
) # pylint: disable=no-member
|
84
|
+
|
85
|
+
if val is not None and val != UNSET_SENTINEL:
|
86
|
+
m[k] = val
|
87
|
+
elif val != UNSET_SENTINEL and (
|
88
|
+
not k in optional_fields or (optional_nullable and is_set)
|
89
|
+
):
|
90
|
+
m[k] = val
|
91
|
+
|
92
|
+
return m
|
mixpeek/models/{list_collections_collections_getop.py → list_collections_v1_collections_getop.py}
RENAMED
@@ -9,14 +9,14 @@ from typing import Optional
|
|
9
9
|
from typing_extensions import Annotated, NotRequired, TypedDict
|
10
10
|
|
11
11
|
|
12
|
-
class
|
12
|
+
class ListCollectionsV1CollectionsGetRequestTypedDict(TypedDict):
|
13
13
|
page: NotRequired[Nullable[int]]
|
14
14
|
page_size: NotRequired[int]
|
15
15
|
x_namespace: NotRequired[Nullable[str]]
|
16
16
|
r"""Optional namespace for data isolation. This can be a namespace name or namespace ID. Example: 'netflix_prod' or 'ns_1234567890'. To create a namespace, use the /namespaces endpoint."""
|
17
17
|
|
18
18
|
|
19
|
-
class
|
19
|
+
class ListCollectionsV1CollectionsGetRequest(BaseModel):
|
20
20
|
page: Annotated[
|
21
21
|
OptionalNullable[int],
|
22
22
|
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
@@ -15,7 +15,7 @@ from typing import Optional
|
|
15
15
|
from typing_extensions import Annotated, NotRequired, TypedDict
|
16
16
|
|
17
17
|
|
18
|
-
class
|
18
|
+
class ListFeaturesV1FeaturesPostRequestTypedDict(TypedDict):
|
19
19
|
list_features_request: ListFeaturesRequestTypedDict
|
20
20
|
offset_feature_id: NotRequired[Nullable[str]]
|
21
21
|
r"""The offset id to start returning results from. Used for pagination"""
|
@@ -24,7 +24,7 @@ class ListFeaturesFeaturesPostRequestTypedDict(TypedDict):
|
|
24
24
|
r"""Optional namespace for data isolation. This can be a namespace name or namespace ID. Example: 'netflix_prod' or 'ns_1234567890'. To create a namespace, use the /namespaces endpoint."""
|
25
25
|
|
26
26
|
|
27
|
-
class
|
27
|
+
class ListFeaturesV1FeaturesPostRequest(BaseModel):
|
28
28
|
list_features_request: Annotated[
|
29
29
|
ListFeaturesRequest,
|
30
30
|
FieldMetadata(request=RequestMetadata(media_type="application/json")),
|
@@ -0,0 +1,67 @@
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
from mixpeek.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
5
|
+
from mixpeek.utils import FieldMetadata, HeaderMetadata, QueryParamMetadata
|
6
|
+
import pydantic
|
7
|
+
from pydantic import model_serializer
|
8
|
+
from typing import Optional
|
9
|
+
from typing_extensions import Annotated, NotRequired, TypedDict
|
10
|
+
|
11
|
+
|
12
|
+
class ListTaxonomiesV1EntitiesTaxonomiesGetRequestTypedDict(TypedDict):
|
13
|
+
offset_id: NotRequired[Nullable[str]]
|
14
|
+
r"""The offset id to start returning results from. Used for pagination"""
|
15
|
+
page_size: NotRequired[int]
|
16
|
+
x_namespace: NotRequired[Nullable[str]]
|
17
|
+
r"""Optional namespace for data isolation. This can be a namespace name or namespace ID. Example: 'netflix_prod' or 'ns_1234567890'. To create a namespace, use the /namespaces endpoint."""
|
18
|
+
|
19
|
+
|
20
|
+
class ListTaxonomiesV1EntitiesTaxonomiesGetRequest(BaseModel):
|
21
|
+
offset_id: Annotated[
|
22
|
+
OptionalNullable[str],
|
23
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
24
|
+
] = UNSET
|
25
|
+
r"""The offset id to start returning results from. Used for pagination"""
|
26
|
+
|
27
|
+
page_size: Annotated[
|
28
|
+
Optional[int],
|
29
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
30
|
+
] = 10
|
31
|
+
|
32
|
+
x_namespace: Annotated[
|
33
|
+
OptionalNullable[str],
|
34
|
+
pydantic.Field(alias="X-Namespace"),
|
35
|
+
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
36
|
+
] = UNSET
|
37
|
+
r"""Optional namespace for data isolation. This can be a namespace name or namespace ID. Example: 'netflix_prod' or 'ns_1234567890'. To create a namespace, use the /namespaces endpoint."""
|
38
|
+
|
39
|
+
@model_serializer(mode="wrap")
|
40
|
+
def serialize_model(self, handler):
|
41
|
+
optional_fields = ["offset_id", "page_size", "X-Namespace"]
|
42
|
+
nullable_fields = ["offset_id", "X-Namespace"]
|
43
|
+
null_default_fields = []
|
44
|
+
|
45
|
+
serialized = handler(self)
|
46
|
+
|
47
|
+
m = {}
|
48
|
+
|
49
|
+
for n, f in self.model_fields.items():
|
50
|
+
k = f.alias or n
|
51
|
+
val = serialized.get(k)
|
52
|
+
serialized.pop(k, None)
|
53
|
+
|
54
|
+
optional_nullable = k in optional_fields and k in nullable_fields
|
55
|
+
is_set = (
|
56
|
+
self.__pydantic_fields_set__.intersection({n})
|
57
|
+
or k in null_default_fields
|
58
|
+
) # pylint: disable=no-member
|
59
|
+
|
60
|
+
if val is not None and val != UNSET_SENTINEL:
|
61
|
+
m[k] = val
|
62
|
+
elif val != UNSET_SENTINEL and (
|
63
|
+
not k in optional_fields or (optional_nullable and is_set)
|
64
|
+
):
|
65
|
+
m[k] = val
|
66
|
+
|
67
|
+
return m
|
@@ -0,0 +1,69 @@
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
from .featureoptions import FeatureOptions, FeatureOptionsTypedDict
|
5
|
+
from .logicaloperator import LogicalOperator, LogicalOperatorTypedDict
|
6
|
+
from .nodeoptions import NodeOptions, NodeOptionsTypedDict
|
7
|
+
from .sortoption import SortOption, SortOptionTypedDict
|
8
|
+
from mixpeek.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
9
|
+
from pydantic import model_serializer
|
10
|
+
from typing_extensions import NotRequired, TypedDict
|
11
|
+
|
12
|
+
|
13
|
+
class ListClassificationsRequestTypedDict(TypedDict):
|
14
|
+
r"""Request model for listing classifications with filters"""
|
15
|
+
|
16
|
+
filters: NotRequired[Nullable[LogicalOperatorTypedDict]]
|
17
|
+
r"""Complex nested query filters for classifications"""
|
18
|
+
sort: NotRequired[Nullable[SortOptionTypedDict]]
|
19
|
+
r"""Sort options for ordering classifications"""
|
20
|
+
feature_options: NotRequired[Nullable[FeatureOptionsTypedDict]]
|
21
|
+
r"""Controls what feature data to include in the response. Note: Including additional data increases response latency."""
|
22
|
+
node_options: NotRequired[Nullable[NodeOptionsTypedDict]]
|
23
|
+
r"""Controls what node data to include in the response. Note: Including additional data increases response latency."""
|
24
|
+
|
25
|
+
|
26
|
+
class ListClassificationsRequest(BaseModel):
|
27
|
+
r"""Request model for listing classifications with filters"""
|
28
|
+
|
29
|
+
filters: OptionalNullable[LogicalOperator] = UNSET
|
30
|
+
r"""Complex nested query filters for classifications"""
|
31
|
+
|
32
|
+
sort: OptionalNullable[SortOption] = UNSET
|
33
|
+
r"""Sort options for ordering classifications"""
|
34
|
+
|
35
|
+
feature_options: OptionalNullable[FeatureOptions] = UNSET
|
36
|
+
r"""Controls what feature data to include in the response. Note: Including additional data increases response latency."""
|
37
|
+
|
38
|
+
node_options: OptionalNullable[NodeOptions] = UNSET
|
39
|
+
r"""Controls what node data to include in the response. Note: Including additional data increases response latency."""
|
40
|
+
|
41
|
+
@model_serializer(mode="wrap")
|
42
|
+
def serialize_model(self, handler):
|
43
|
+
optional_fields = ["filters", "sort", "feature_options", "node_options"]
|
44
|
+
nullable_fields = ["filters", "sort", "feature_options", "node_options"]
|
45
|
+
null_default_fields = []
|
46
|
+
|
47
|
+
serialized = handler(self)
|
48
|
+
|
49
|
+
m = {}
|
50
|
+
|
51
|
+
for n, f in self.model_fields.items():
|
52
|
+
k = f.alias or n
|
53
|
+
val = serialized.get(k)
|
54
|
+
serialized.pop(k, None)
|
55
|
+
|
56
|
+
optional_nullable = k in optional_fields and k in nullable_fields
|
57
|
+
is_set = (
|
58
|
+
self.__pydantic_fields_set__.intersection({n})
|
59
|
+
or k in null_default_fields
|
60
|
+
) # pylint: disable=no-member
|
61
|
+
|
62
|
+
if val is not None and val != UNSET_SENTINEL:
|
63
|
+
m[k] = val
|
64
|
+
elif val != UNSET_SENTINEL and (
|
65
|
+
not k in optional_fields or (optional_nullable and is_set)
|
66
|
+
):
|
67
|
+
m[k] = val
|
68
|
+
|
69
|
+
return m
|
@@ -0,0 +1,31 @@
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
from .classificationwithfeature import (
|
5
|
+
ClassificationWithFeature,
|
6
|
+
ClassificationWithFeatureTypedDict,
|
7
|
+
)
|
8
|
+
from .db_model_paginationresponse import (
|
9
|
+
DbModelPaginationResponse,
|
10
|
+
DbModelPaginationResponseTypedDict,
|
11
|
+
)
|
12
|
+
from mixpeek.types import BaseModel
|
13
|
+
from typing import List
|
14
|
+
from typing_extensions import TypedDict
|
15
|
+
|
16
|
+
|
17
|
+
class ListClassificationsResponseTypedDict(TypedDict):
|
18
|
+
r"""Response for the list classifications endpoint"""
|
19
|
+
|
20
|
+
results: List[ClassificationWithFeatureTypedDict]
|
21
|
+
r"""List of classification entries with optional enriched data"""
|
22
|
+
pagination: DbModelPaginationResponseTypedDict
|
23
|
+
|
24
|
+
|
25
|
+
class ListClassificationsResponse(BaseModel):
|
26
|
+
r"""Response for the list classifications endpoint"""
|
27
|
+
|
28
|
+
results: List[ClassificationWithFeature]
|
29
|
+
r"""List of classification entries with optional enriched data"""
|
30
|
+
|
31
|
+
pagination: DbModelPaginationResponse
|
@@ -0,0 +1,24 @@
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
from .db_model_paginationresponse import (
|
5
|
+
DbModelPaginationResponse,
|
6
|
+
DbModelPaginationResponseTypedDict,
|
7
|
+
)
|
8
|
+
from .taxonomymodel import TaxonomyModel, TaxonomyModelTypedDict
|
9
|
+
from mixpeek.types import BaseModel
|
10
|
+
from typing import List
|
11
|
+
from typing_extensions import TypedDict
|
12
|
+
|
13
|
+
|
14
|
+
class ListTaxonomiesResponseTypedDict(TypedDict):
|
15
|
+
results: List[TaxonomyModelTypedDict]
|
16
|
+
r"""List of fully populated taxonomies with nodes"""
|
17
|
+
pagination: DbModelPaginationResponseTypedDict
|
18
|
+
|
19
|
+
|
20
|
+
class ListTaxonomiesResponse(BaseModel):
|
21
|
+
results: List[TaxonomyModel]
|
22
|
+
r"""List of fully populated taxonomies with nodes"""
|
23
|
+
|
24
|
+
pagination: DbModelPaginationResponse
|
mixpeek/models/modeldetails.py
CHANGED
@@ -3,32 +3,36 @@
|
|
3
3
|
from __future__ import annotations
|
4
4
|
from .modality import Modality
|
5
5
|
from .vectortype import VectorType
|
6
|
-
from mixpeek.types import BaseModel, Nullable, UNSET_SENTINEL
|
6
|
+
from mixpeek.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
7
7
|
from pydantic import model_serializer
|
8
8
|
from typing import List
|
9
|
-
from typing_extensions import TypedDict
|
9
|
+
from typing_extensions import NotRequired, TypedDict
|
10
10
|
|
11
11
|
|
12
12
|
class ModelDetailsTypedDict(TypedDict):
|
13
13
|
r"""Details about a model in the registry"""
|
14
14
|
|
15
15
|
supported_modalities: List[Modality]
|
16
|
+
r"""List of modalities that this model supports"""
|
16
17
|
vector_type: VectorType
|
17
|
-
size: Nullable[int]
|
18
|
+
size: NotRequired[Nullable[int]]
|
19
|
+
r"""Dimensionality of the output vector (if applicable)"""
|
18
20
|
|
19
21
|
|
20
22
|
class ModelDetails(BaseModel):
|
21
23
|
r"""Details about a model in the registry"""
|
22
24
|
|
23
25
|
supported_modalities: List[Modality]
|
26
|
+
r"""List of modalities that this model supports"""
|
24
27
|
|
25
28
|
vector_type: VectorType
|
26
29
|
|
27
|
-
size:
|
30
|
+
size: OptionalNullable[int] = UNSET
|
31
|
+
r"""Dimensionality of the output vector (if applicable)"""
|
28
32
|
|
29
33
|
@model_serializer(mode="wrap")
|
30
34
|
def serialize_model(self, handler):
|
31
|
-
optional_fields = []
|
35
|
+
optional_fields = ["size"]
|
32
36
|
nullable_fields = ["size"]
|
33
37
|
null_default_fields = []
|
34
38
|
|
@@ -0,0 +1,16 @@
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
from mixpeek.types import BaseModel
|
5
|
+
from typing import Optional
|
6
|
+
from typing_extensions import NotRequired, TypedDict
|
7
|
+
|
8
|
+
|
9
|
+
class NodeOptionsTypedDict(TypedDict):
|
10
|
+
return_payload: NotRequired[bool]
|
11
|
+
r"""Whether to include the full node object in the response"""
|
12
|
+
|
13
|
+
|
14
|
+
class NodeOptions(BaseModel):
|
15
|
+
return_payload: Optional[bool] = False
|
16
|
+
r"""Whether to include the full node object in the response"""
|
@@ -0,0 +1,51 @@
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
from mixpeek.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
5
|
+
from pydantic import model_serializer
|
6
|
+
from typing_extensions import NotRequired, TypedDict
|
7
|
+
|
8
|
+
|
9
|
+
class NodeUpdateTypedDict(TypedDict):
|
10
|
+
node_name: str
|
11
|
+
r"""Name of the taxonomy node (must be lowercase without spaces)"""
|
12
|
+
node_description: NotRequired[Nullable[str]]
|
13
|
+
r"""Optional description of what this node represents"""
|
14
|
+
|
15
|
+
|
16
|
+
class NodeUpdate(BaseModel):
|
17
|
+
node_name: str
|
18
|
+
r"""Name of the taxonomy node (must be lowercase without spaces)"""
|
19
|
+
|
20
|
+
node_description: OptionalNullable[str] = UNSET
|
21
|
+
r"""Optional description of what this node represents"""
|
22
|
+
|
23
|
+
@model_serializer(mode="wrap")
|
24
|
+
def serialize_model(self, handler):
|
25
|
+
optional_fields = ["node_description"]
|
26
|
+
nullable_fields = ["node_description"]
|
27
|
+
null_default_fields = []
|
28
|
+
|
29
|
+
serialized = handler(self)
|
30
|
+
|
31
|
+
m = {}
|
32
|
+
|
33
|
+
for n, f in self.model_fields.items():
|
34
|
+
k = f.alias or n
|
35
|
+
val = serialized.get(k)
|
36
|
+
serialized.pop(k, None)
|
37
|
+
|
38
|
+
optional_nullable = k in optional_fields and k in nullable_fields
|
39
|
+
is_set = (
|
40
|
+
self.__pydantic_fields_set__.intersection({n})
|
41
|
+
or k in null_default_fields
|
42
|
+
) # pylint: disable=no-member
|
43
|
+
|
44
|
+
if val is not None and val != UNSET_SENTINEL:
|
45
|
+
m[k] = val
|
46
|
+
elif val != UNSET_SENTINEL and (
|
47
|
+
not k in optional_fields or (optional_nullable and is_set)
|
48
|
+
):
|
49
|
+
m[k] = val
|
50
|
+
|
51
|
+
return m
|
@@ -14,14 +14,14 @@ from pydantic import model_serializer
|
|
14
14
|
from typing_extensions import Annotated, NotRequired, TypedDict
|
15
15
|
|
16
16
|
|
17
|
-
class
|
17
|
+
class PartialAssetUpdateV1AssetsAssetIDPatchRequestTypedDict(TypedDict):
|
18
18
|
asset_id: str
|
19
19
|
update_asset_request: UpdateAssetRequestTypedDict
|
20
20
|
x_namespace: NotRequired[Nullable[str]]
|
21
21
|
r"""Optional namespace for data isolation. This can be a namespace name or namespace ID. Example: 'netflix_prod' or 'ns_1234567890'. To create a namespace, use the /namespaces endpoint."""
|
22
22
|
|
23
23
|
|
24
|
-
class
|
24
|
+
class PartialAssetUpdateV1AssetsAssetIDPatchRequest(BaseModel):
|
25
25
|
asset_id: Annotated[
|
26
26
|
str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
|
27
27
|
]
|
mixpeek/models/permission.py
CHANGED
@@ -7,4 +7,16 @@ from enum import Enum
|
|
7
7
|
class Permission(str, Enum):
|
8
8
|
READ = "read"
|
9
9
|
WRITE = "write"
|
10
|
+
VIEW = "view"
|
11
|
+
CREATE = "create"
|
12
|
+
UPDATE = "update"
|
13
|
+
DELETE = "delete"
|
14
|
+
SUPER = "super"
|
10
15
|
ADMIN = "admin"
|
16
|
+
MANAGE_USERS = "manage_users"
|
17
|
+
MANAGE_BILLING = "manage_billing"
|
18
|
+
MANAGE_SETTINGS = "manage_settings"
|
19
|
+
READ_PUBLIC = "read_public"
|
20
|
+
READ_PRIVATE = "read_private"
|
21
|
+
WRITE_PUBLIC = "write_public"
|
22
|
+
WRITE_PRIVATE = "write_private"
|
mixpeek/models/{search_assets_assets_search_postop.py → search_assets_v1_assets_search_postop.py}
RENAMED
@@ -9,13 +9,13 @@ from pydantic import model_serializer
|
|
9
9
|
from typing_extensions import Annotated, NotRequired, TypedDict
|
10
10
|
|
11
11
|
|
12
|
-
class
|
12
|
+
class SearchAssetsV1AssetsSearchPostRequestTypedDict(TypedDict):
|
13
13
|
search_assets_request: SearchAssetsRequestTypedDict
|
14
14
|
x_namespace: NotRequired[Nullable[str]]
|
15
15
|
r"""Optional namespace for data isolation. This can be a namespace name or namespace ID. Example: 'netflix_prod' or 'ns_1234567890'. To create a namespace, use the /namespaces endpoint."""
|
16
16
|
|
17
17
|
|
18
|
-
class
|
18
|
+
class SearchAssetsV1AssetsSearchPostRequest(BaseModel):
|
19
19
|
search_assets_request: Annotated[
|
20
20
|
SearchAssetsRequest,
|
21
21
|
FieldMetadata(request=RequestMetadata(media_type="application/json")),
|
@@ -15,7 +15,7 @@ from typing import Optional
|
|
15
15
|
from typing_extensions import Annotated, NotRequired, TypedDict
|
16
16
|
|
17
17
|
|
18
|
-
class
|
18
|
+
class SearchFeaturesV1FeaturesSearchPostRequestTypedDict(TypedDict):
|
19
19
|
search_request_features: SearchRequestFeaturesTypedDict
|
20
20
|
offset_position: NotRequired[Nullable[int]]
|
21
21
|
r"""The position to start returning results from. Used for pagination. Does not work with group_by"""
|
@@ -25,7 +25,7 @@ class SearchFeaturesFeaturesSearchPostRequestTypedDict(TypedDict):
|
|
25
25
|
r"""Optional namespace for data isolation. This can be a namespace name or namespace ID. Example: 'netflix_prod' or 'ns_1234567890'. To create a namespace, use the /namespaces endpoint."""
|
26
26
|
|
27
27
|
|
28
|
-
class
|
28
|
+
class SearchFeaturesV1FeaturesSearchPostRequest(BaseModel):
|
29
29
|
search_request_features: Annotated[
|
30
30
|
SearchRequestFeatures,
|
31
31
|
FieldMetadata(request=RequestMetadata(media_type="application/json")),
|
@@ -81,13 +81,13 @@ class SearchFeaturesFeaturesSearchPostRequest(BaseModel):
|
|
81
81
|
return m
|
82
82
|
|
83
83
|
|
84
|
-
class
|
84
|
+
class SearchFeaturesV1FeaturesSearchPostResponseSearchFeaturesV1FeaturesSearchPostTypedDict(
|
85
85
|
TypedDict
|
86
86
|
):
|
87
87
|
r"""Successful Response"""
|
88
88
|
|
89
89
|
|
90
|
-
class
|
90
|
+
class SearchFeaturesV1FeaturesSearchPostResponseSearchFeaturesV1FeaturesSearchPost(
|
91
91
|
BaseModel
|
92
92
|
):
|
93
93
|
r"""Successful Response"""
|
@@ -0,0 +1,20 @@
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
from .taxonomynodecreate import TaxonomyNodeCreate, TaxonomyNodeCreateTypedDict
|
5
|
+
from mixpeek.types import BaseModel
|
6
|
+
from typing import List
|
7
|
+
from typing_extensions import TypedDict
|
8
|
+
|
9
|
+
|
10
|
+
class TaxonomyCreateTypedDict(TypedDict):
|
11
|
+
taxonomy_name: str
|
12
|
+
r"""Taxonomy name (must not contain spaces or special characters)"""
|
13
|
+
nodes: List[TaxonomyNodeCreateTypedDict]
|
14
|
+
|
15
|
+
|
16
|
+
class TaxonomyCreate(BaseModel):
|
17
|
+
taxonomy_name: str
|
18
|
+
r"""Taxonomy name (must not contain spaces or special characters)"""
|
19
|
+
|
20
|
+
nodes: List[TaxonomyNodeCreate]
|
@@ -0,0 +1,27 @@
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
from .taxonomynode import TaxonomyNode, TaxonomyNodeTypedDict
|
5
|
+
from mixpeek.types import BaseModel
|
6
|
+
from typing import List, Optional
|
7
|
+
from typing_extensions import NotRequired, TypedDict
|
8
|
+
|
9
|
+
|
10
|
+
class TaxonomyModelTypedDict(TypedDict):
|
11
|
+
taxonomy_name: str
|
12
|
+
r"""Taxonomy name"""
|
13
|
+
nodes: List[TaxonomyNodeTypedDict]
|
14
|
+
r"""Taxonomy nodes"""
|
15
|
+
taxonomy_id: NotRequired[str]
|
16
|
+
r"""Auto-generated taxonomy identifier"""
|
17
|
+
|
18
|
+
|
19
|
+
class TaxonomyModel(BaseModel):
|
20
|
+
taxonomy_name: str
|
21
|
+
r"""Taxonomy name"""
|
22
|
+
|
23
|
+
nodes: List[TaxonomyNode]
|
24
|
+
r"""Taxonomy nodes"""
|
25
|
+
|
26
|
+
taxonomy_id: Optional[str] = None
|
27
|
+
r"""Auto-generated taxonomy identifier"""
|