lambdadb 0.1.2__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.
Potentially problematic release.
This version of lambdadb might be problematic. Click here for more details.
- lambdadb/__init__.py +17 -0
- lambdadb/_hooks/__init__.py +5 -0
- lambdadb/_hooks/registration.py +13 -0
- lambdadb/_hooks/sdkhooks.py +76 -0
- lambdadb/_hooks/types.py +106 -0
- lambdadb/_version.py +15 -0
- lambdadb/basesdk.py +358 -0
- lambdadb/collections.py +1630 -0
- lambdadb/docs.py +1328 -0
- lambdadb/errors/__init__.py +74 -0
- lambdadb/errors/apierror.py +22 -0
- lambdadb/errors/badrequest_error.py +20 -0
- lambdadb/errors/internalservererror.py +20 -0
- lambdadb/errors/resourcealreadyexists_error.py +20 -0
- lambdadb/errors/resourcenotfound_error.py +20 -0
- lambdadb/errors/toomanyrequests_error.py +20 -0
- lambdadb/errors/unauthenticated_error.py +20 -0
- lambdadb/httpclient.py +126 -0
- lambdadb/models/__init__.py +420 -0
- lambdadb/models/bulkupsertdocsop.py +59 -0
- lambdadb/models/collectionresponse.py +64 -0
- lambdadb/models/createcollectionop.py +64 -0
- lambdadb/models/createprojectop.py +39 -0
- lambdadb/models/deletecollectionop.py +43 -0
- lambdadb/models/deletedocsop.py +88 -0
- lambdadb/models/deleteprojectop.py +52 -0
- lambdadb/models/fetchdocsop.py +102 -0
- lambdadb/models/getbulkupsertdocsop.py +82 -0
- lambdadb/models/getcollectionop.py +30 -0
- lambdadb/models/getprojectop.py +39 -0
- lambdadb/models/indexconfigs_union.py +95 -0
- lambdadb/models/listcollectionsop.py +35 -0
- lambdadb/models/listprojectsop.py +38 -0
- lambdadb/models/projectresponse.py +38 -0
- lambdadb/models/querycollectionop.py +152 -0
- lambdadb/models/security.py +25 -0
- lambdadb/models/status.py +12 -0
- lambdadb/models/updatecollectionop.py +48 -0
- lambdadb/models/updateprojectop.py +58 -0
- lambdadb/models/upsertdocsop.py +67 -0
- lambdadb/projects.py +1228 -0
- lambdadb/py.typed +1 -0
- lambdadb/sdk.py +170 -0
- lambdadb/sdkconfiguration.py +56 -0
- lambdadb/types/__init__.py +21 -0
- lambdadb/types/basemodel.py +39 -0
- lambdadb/utils/__init__.py +187 -0
- lambdadb/utils/annotations.py +55 -0
- lambdadb/utils/datetimes.py +23 -0
- lambdadb/utils/enums.py +74 -0
- lambdadb/utils/eventstreaming.py +238 -0
- lambdadb/utils/forms.py +202 -0
- lambdadb/utils/headers.py +136 -0
- lambdadb/utils/logger.py +27 -0
- lambdadb/utils/metadata.py +118 -0
- lambdadb/utils/queryparams.py +205 -0
- lambdadb/utils/requestbodies.py +66 -0
- lambdadb/utils/retries.py +217 -0
- lambdadb/utils/security.py +192 -0
- lambdadb/utils/serializers.py +248 -0
- lambdadb/utils/url.py +155 -0
- lambdadb/utils/values.py +137 -0
- lambdadb-0.1.2.dist-info/LICENSE +201 -0
- lambdadb-0.1.2.dist-info/METADATA +514 -0
- lambdadb-0.1.2.dist-info/RECORD +66 -0
- lambdadb-0.1.2.dist-info/WHEEL +4 -0
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from lambdadb.types import BaseModel
|
|
5
|
+
from lambdadb.utils import FieldMetadata, PathParamMetadata, RequestMetadata
|
|
6
|
+
import pydantic
|
|
7
|
+
from typing import List, Optional, Union
|
|
8
|
+
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class FilterTypedDict(TypedDict):
|
|
12
|
+
r"""Query filter."""
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class Filter(BaseModel):
|
|
16
|
+
r"""Query filter."""
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class RequestBody2TypedDict(TypedDict):
|
|
20
|
+
filter_: FilterTypedDict
|
|
21
|
+
r"""Query filter."""
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class RequestBody2(BaseModel):
|
|
25
|
+
filter_: Annotated[Filter, pydantic.Field(alias="filter")]
|
|
26
|
+
r"""Query filter."""
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class RequestBody1TypedDict(TypedDict):
|
|
30
|
+
ids: List[str]
|
|
31
|
+
r"""A list of document IDs."""
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
class RequestBody1(BaseModel):
|
|
35
|
+
ids: List[str]
|
|
36
|
+
r"""A list of document IDs."""
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
DeleteDocsRequestBodyTypedDict = TypeAliasType(
|
|
40
|
+
"DeleteDocsRequestBodyTypedDict",
|
|
41
|
+
Union[RequestBody1TypedDict, RequestBody2TypedDict],
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
DeleteDocsRequestBody = TypeAliasType(
|
|
46
|
+
"DeleteDocsRequestBody", Union[RequestBody1, RequestBody2]
|
|
47
|
+
)
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
class DeleteDocsRequestTypedDict(TypedDict):
|
|
51
|
+
project_name: str
|
|
52
|
+
r"""Project name."""
|
|
53
|
+
collection_name: str
|
|
54
|
+
r"""Collection name."""
|
|
55
|
+
request_body: DeleteDocsRequestBodyTypedDict
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
class DeleteDocsRequest(BaseModel):
|
|
59
|
+
project_name: Annotated[
|
|
60
|
+
str,
|
|
61
|
+
pydantic.Field(alias="projectName"),
|
|
62
|
+
FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
|
|
63
|
+
]
|
|
64
|
+
r"""Project name."""
|
|
65
|
+
|
|
66
|
+
collection_name: Annotated[
|
|
67
|
+
str,
|
|
68
|
+
pydantic.Field(alias="collectionName"),
|
|
69
|
+
FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
|
|
70
|
+
]
|
|
71
|
+
r"""Collection name."""
|
|
72
|
+
|
|
73
|
+
request_body: Annotated[
|
|
74
|
+
DeleteDocsRequestBody,
|
|
75
|
+
FieldMetadata(request=RequestMetadata(media_type="application/json")),
|
|
76
|
+
]
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
class DeleteDocsResponseTypedDict(TypedDict):
|
|
80
|
+
r"""Delete request accepted."""
|
|
81
|
+
|
|
82
|
+
message: NotRequired[str]
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
class DeleteDocsResponse(BaseModel):
|
|
86
|
+
r"""Delete request accepted."""
|
|
87
|
+
|
|
88
|
+
message: Optional[str] = None
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from lambdadb.types import BaseModel
|
|
5
|
+
from lambdadb.utils import FieldMetadata, PathParamMetadata, SecurityMetadata
|
|
6
|
+
import pydantic
|
|
7
|
+
from typing import Optional
|
|
8
|
+
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class DeleteProjectSecurityTypedDict(TypedDict):
|
|
12
|
+
admin_api_key: str
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class DeleteProjectSecurity(BaseModel):
|
|
16
|
+
admin_api_key: Annotated[
|
|
17
|
+
str,
|
|
18
|
+
FieldMetadata(
|
|
19
|
+
security=SecurityMetadata(
|
|
20
|
+
scheme=True,
|
|
21
|
+
scheme_type="apiKey",
|
|
22
|
+
sub_type="header",
|
|
23
|
+
field_name="x-api-key",
|
|
24
|
+
)
|
|
25
|
+
),
|
|
26
|
+
]
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class DeleteProjectRequestTypedDict(TypedDict):
|
|
30
|
+
project_name: str
|
|
31
|
+
r"""Project name."""
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
class DeleteProjectRequest(BaseModel):
|
|
35
|
+
project_name: Annotated[
|
|
36
|
+
str,
|
|
37
|
+
pydantic.Field(alias="projectName"),
|
|
38
|
+
FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
|
|
39
|
+
]
|
|
40
|
+
r"""Project name."""
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
class DeleteProjectResponseTypedDict(TypedDict):
|
|
44
|
+
r"""Project delete request accepted."""
|
|
45
|
+
|
|
46
|
+
message: NotRequired[str]
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
class DeleteProjectResponse(BaseModel):
|
|
50
|
+
r"""Project delete request accepted."""
|
|
51
|
+
|
|
52
|
+
message: Optional[str] = None
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from lambdadb.types import BaseModel
|
|
5
|
+
from lambdadb.utils import FieldMetadata, PathParamMetadata, RequestMetadata
|
|
6
|
+
import pydantic
|
|
7
|
+
from typing import List, Optional
|
|
8
|
+
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class FetchDocsRequestBodyTypedDict(TypedDict):
|
|
12
|
+
ids: List[str]
|
|
13
|
+
r"""A list of document IDs to fetch. Note that the maximum number of document IDs is 1000."""
|
|
14
|
+
consistent_read: NotRequired[bool]
|
|
15
|
+
r"""If your application requires a strongly consistent read, set consistentRead to true. Although a strongly consistent read might take more time than an eventually consistent read, it always returns the last updated value."""
|
|
16
|
+
include_vectors: NotRequired[bool]
|
|
17
|
+
r"""If your application need to include vector values in the response, set includeVectors to true."""
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class FetchDocsRequestBody(BaseModel):
|
|
21
|
+
ids: List[str]
|
|
22
|
+
r"""A list of document IDs to fetch. Note that the maximum number of document IDs is 1000."""
|
|
23
|
+
|
|
24
|
+
consistent_read: Annotated[
|
|
25
|
+
Optional[bool], pydantic.Field(alias="consistentRead")
|
|
26
|
+
] = False
|
|
27
|
+
r"""If your application requires a strongly consistent read, set consistentRead to true. Although a strongly consistent read might take more time than an eventually consistent read, it always returns the last updated value."""
|
|
28
|
+
|
|
29
|
+
include_vectors: Annotated[
|
|
30
|
+
Optional[bool], pydantic.Field(alias="includeVectors")
|
|
31
|
+
] = False
|
|
32
|
+
r"""If your application need to include vector values in the response, set includeVectors to true."""
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
class FetchDocsRequestTypedDict(TypedDict):
|
|
36
|
+
project_name: str
|
|
37
|
+
r"""Project name."""
|
|
38
|
+
collection_name: str
|
|
39
|
+
r"""Collection name."""
|
|
40
|
+
request_body: FetchDocsRequestBodyTypedDict
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
class FetchDocsRequest(BaseModel):
|
|
44
|
+
project_name: Annotated[
|
|
45
|
+
str,
|
|
46
|
+
pydantic.Field(alias="projectName"),
|
|
47
|
+
FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
|
|
48
|
+
]
|
|
49
|
+
r"""Project name."""
|
|
50
|
+
|
|
51
|
+
collection_name: Annotated[
|
|
52
|
+
str,
|
|
53
|
+
pydantic.Field(alias="collectionName"),
|
|
54
|
+
FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
|
|
55
|
+
]
|
|
56
|
+
r"""Collection name."""
|
|
57
|
+
|
|
58
|
+
request_body: Annotated[
|
|
59
|
+
FetchDocsRequestBody,
|
|
60
|
+
FieldMetadata(request=RequestMetadata(media_type="application/json")),
|
|
61
|
+
]
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
class FetchDocsDocDocTypedDict(TypedDict):
|
|
65
|
+
pass
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
class FetchDocsDocDoc(BaseModel):
|
|
69
|
+
pass
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
class FetchDocsDocTypedDict(TypedDict):
|
|
73
|
+
collection: NotRequired[str]
|
|
74
|
+
doc: NotRequired[FetchDocsDocDocTypedDict]
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
class FetchDocsDoc(BaseModel):
|
|
78
|
+
collection: Optional[str] = None
|
|
79
|
+
|
|
80
|
+
doc: Optional[FetchDocsDocDoc] = None
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
class FetchDocsResponseTypedDict(TypedDict):
|
|
84
|
+
r"""Fetched documents."""
|
|
85
|
+
|
|
86
|
+
total: NotRequired[int]
|
|
87
|
+
r"""Total number of documents returned."""
|
|
88
|
+
took: NotRequired[int]
|
|
89
|
+
r"""Elapsed time in milliseconds."""
|
|
90
|
+
docs: NotRequired[List[FetchDocsDocTypedDict]]
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
class FetchDocsResponse(BaseModel):
|
|
94
|
+
r"""Fetched documents."""
|
|
95
|
+
|
|
96
|
+
total: Optional[int] = None
|
|
97
|
+
r"""Total number of documents returned."""
|
|
98
|
+
|
|
99
|
+
took: Optional[int] = None
|
|
100
|
+
r"""Elapsed time in milliseconds."""
|
|
101
|
+
|
|
102
|
+
docs: Optional[List[FetchDocsDoc]] = None
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from enum import Enum
|
|
5
|
+
from lambdadb.types import BaseModel
|
|
6
|
+
from lambdadb.utils import FieldMetadata, PathParamMetadata
|
|
7
|
+
import pydantic
|
|
8
|
+
from typing import Optional
|
|
9
|
+
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class GetBulkUpsertDocsRequestTypedDict(TypedDict):
|
|
13
|
+
project_name: str
|
|
14
|
+
r"""Project name."""
|
|
15
|
+
collection_name: str
|
|
16
|
+
r"""Collection name."""
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class GetBulkUpsertDocsRequest(BaseModel):
|
|
20
|
+
project_name: Annotated[
|
|
21
|
+
str,
|
|
22
|
+
pydantic.Field(alias="projectName"),
|
|
23
|
+
FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
|
|
24
|
+
]
|
|
25
|
+
r"""Project name."""
|
|
26
|
+
|
|
27
|
+
collection_name: Annotated[
|
|
28
|
+
str,
|
|
29
|
+
pydantic.Field(alias="collectionName"),
|
|
30
|
+
FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
|
|
31
|
+
]
|
|
32
|
+
r"""Collection name."""
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
class GetBulkUpsertDocsType(str, Enum):
|
|
36
|
+
r"""Content type that must be specified when uploading documents."""
|
|
37
|
+
|
|
38
|
+
APPLICATION_JSON = "application/json"
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
class HTTPMethod(str, Enum):
|
|
42
|
+
r"""HTTP method that must be specified when uploading documents."""
|
|
43
|
+
|
|
44
|
+
PUT = "PUT"
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
class GetBulkUpsertDocsResponseTypedDict(TypedDict):
|
|
48
|
+
r"""Required info to upload documents."""
|
|
49
|
+
|
|
50
|
+
url: NotRequired[str]
|
|
51
|
+
r"""Presigned URL."""
|
|
52
|
+
type: NotRequired[GetBulkUpsertDocsType]
|
|
53
|
+
r"""Content type that must be specified when uploading documents."""
|
|
54
|
+
http_method: NotRequired[HTTPMethod]
|
|
55
|
+
r"""HTTP method that must be specified when uploading documents."""
|
|
56
|
+
object_key: NotRequired[str]
|
|
57
|
+
r"""Object key that must be specified when uploading documents."""
|
|
58
|
+
size_limit_bytes: NotRequired[int]
|
|
59
|
+
r"""Object size limit in bytes."""
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
class GetBulkUpsertDocsResponse(BaseModel):
|
|
63
|
+
r"""Required info to upload documents."""
|
|
64
|
+
|
|
65
|
+
url: Optional[str] = None
|
|
66
|
+
r"""Presigned URL."""
|
|
67
|
+
|
|
68
|
+
type: Optional[GetBulkUpsertDocsType] = GetBulkUpsertDocsType.APPLICATION_JSON
|
|
69
|
+
r"""Content type that must be specified when uploading documents."""
|
|
70
|
+
|
|
71
|
+
http_method: Annotated[Optional[HTTPMethod], pydantic.Field(alias="httpMethod")] = (
|
|
72
|
+
HTTPMethod.PUT
|
|
73
|
+
)
|
|
74
|
+
r"""HTTP method that must be specified when uploading documents."""
|
|
75
|
+
|
|
76
|
+
object_key: Annotated[Optional[str], pydantic.Field(alias="objectKey")] = None
|
|
77
|
+
r"""Object key that must be specified when uploading documents."""
|
|
78
|
+
|
|
79
|
+
size_limit_bytes: Annotated[
|
|
80
|
+
Optional[int], pydantic.Field(alias="sizeLimitBytes")
|
|
81
|
+
] = 209715200
|
|
82
|
+
r"""Object size limit in bytes."""
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from lambdadb.types import BaseModel
|
|
5
|
+
from lambdadb.utils import FieldMetadata, PathParamMetadata
|
|
6
|
+
import pydantic
|
|
7
|
+
from typing_extensions import Annotated, TypedDict
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class GetCollectionRequestTypedDict(TypedDict):
|
|
11
|
+
project_name: str
|
|
12
|
+
r"""Project name."""
|
|
13
|
+
collection_name: str
|
|
14
|
+
r"""Collection name."""
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class GetCollectionRequest(BaseModel):
|
|
18
|
+
project_name: Annotated[
|
|
19
|
+
str,
|
|
20
|
+
pydantic.Field(alias="projectName"),
|
|
21
|
+
FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
|
|
22
|
+
]
|
|
23
|
+
r"""Project name."""
|
|
24
|
+
|
|
25
|
+
collection_name: Annotated[
|
|
26
|
+
str,
|
|
27
|
+
pydantic.Field(alias="collectionName"),
|
|
28
|
+
FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
|
|
29
|
+
]
|
|
30
|
+
r"""Collection name."""
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from lambdadb.types import BaseModel
|
|
5
|
+
from lambdadb.utils import FieldMetadata, PathParamMetadata, SecurityMetadata
|
|
6
|
+
import pydantic
|
|
7
|
+
from typing_extensions import Annotated, TypedDict
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class GetProjectSecurityTypedDict(TypedDict):
|
|
11
|
+
admin_api_key: str
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class GetProjectSecurity(BaseModel):
|
|
15
|
+
admin_api_key: Annotated[
|
|
16
|
+
str,
|
|
17
|
+
FieldMetadata(
|
|
18
|
+
security=SecurityMetadata(
|
|
19
|
+
scheme=True,
|
|
20
|
+
scheme_type="apiKey",
|
|
21
|
+
sub_type="header",
|
|
22
|
+
field_name="x-api-key",
|
|
23
|
+
)
|
|
24
|
+
),
|
|
25
|
+
]
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class GetProjectRequestTypedDict(TypedDict):
|
|
29
|
+
project_name: str
|
|
30
|
+
r"""Project name."""
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class GetProjectRequest(BaseModel):
|
|
34
|
+
project_name: Annotated[
|
|
35
|
+
str,
|
|
36
|
+
pydantic.Field(alias="projectName"),
|
|
37
|
+
FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
|
|
38
|
+
]
|
|
39
|
+
r"""Project name."""
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from enum import Enum
|
|
5
|
+
from lambdadb.types import BaseModel
|
|
6
|
+
from typing import List, Optional, Union
|
|
7
|
+
from typing_extensions import NotRequired, TypeAliasType, TypedDict
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class Type(str, Enum):
|
|
11
|
+
KEYWORD = "keyword"
|
|
12
|
+
LONG = "long"
|
|
13
|
+
DOUBLE = "double"
|
|
14
|
+
DATETIME = "datetime"
|
|
15
|
+
BOOLEAN = "boolean"
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class IndexConfigsTypedDict(TypedDict):
|
|
19
|
+
r"""Types that do not need additional parameters."""
|
|
20
|
+
|
|
21
|
+
type: Type
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class IndexConfigs(BaseModel):
|
|
25
|
+
r"""Types that do not need additional parameters."""
|
|
26
|
+
|
|
27
|
+
type: Type
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
class TypeVector(str, Enum):
|
|
31
|
+
VECTOR = "vector"
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
class Similarity(str, Enum):
|
|
35
|
+
r"""Vector similarity metric."""
|
|
36
|
+
|
|
37
|
+
COSINE = "cosine"
|
|
38
|
+
L2_NORM = "l2_norm"
|
|
39
|
+
DOT_PRODUCT = "dot_product"
|
|
40
|
+
MAX_INNER_PRODUCT = "max_inner_product"
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
class IndexConfigsVectorTypedDict(TypedDict):
|
|
44
|
+
type: TypeVector
|
|
45
|
+
dimensions: int
|
|
46
|
+
r"""Vector dimensions."""
|
|
47
|
+
similarity: NotRequired[Similarity]
|
|
48
|
+
r"""Vector similarity metric."""
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
class IndexConfigsVector(BaseModel):
|
|
52
|
+
type: TypeVector
|
|
53
|
+
|
|
54
|
+
dimensions: int
|
|
55
|
+
r"""Vector dimensions."""
|
|
56
|
+
|
|
57
|
+
similarity: Optional[Similarity] = Similarity.COSINE
|
|
58
|
+
r"""Vector similarity metric."""
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
class TypeText(str, Enum):
|
|
62
|
+
TEXT = "text"
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
class Analyzer(str, Enum):
|
|
66
|
+
STANDARD = "standard"
|
|
67
|
+
KOREAN = "korean"
|
|
68
|
+
JAPANESE = "japanese"
|
|
69
|
+
ENGLISH = "english"
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
class IndexConfigsTextTypedDict(TypedDict):
|
|
73
|
+
type: TypeText
|
|
74
|
+
analyzers: NotRequired[List[Analyzer]]
|
|
75
|
+
r"""Analyzers."""
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
class IndexConfigsText(BaseModel):
|
|
79
|
+
type: TypeText
|
|
80
|
+
|
|
81
|
+
analyzers: Optional[List[Analyzer]] = None
|
|
82
|
+
r"""Analyzers."""
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
IndexConfigsUnionTypedDict = TypeAliasType(
|
|
86
|
+
"IndexConfigsUnionTypedDict",
|
|
87
|
+
Union[
|
|
88
|
+
IndexConfigsTypedDict, IndexConfigsTextTypedDict, IndexConfigsVectorTypedDict
|
|
89
|
+
],
|
|
90
|
+
)
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
IndexConfigsUnion = TypeAliasType(
|
|
94
|
+
"IndexConfigsUnion", Union[IndexConfigs, IndexConfigsText, IndexConfigsVector]
|
|
95
|
+
)
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from .collectionresponse import CollectionResponse, CollectionResponseTypedDict
|
|
5
|
+
from lambdadb.types import BaseModel
|
|
6
|
+
from lambdadb.utils import FieldMetadata, PathParamMetadata
|
|
7
|
+
import pydantic
|
|
8
|
+
from typing import List, Optional
|
|
9
|
+
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class ListcollectionsRequestTypedDict(TypedDict):
|
|
13
|
+
project_name: str
|
|
14
|
+
r"""Project name."""
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class ListcollectionsRequest(BaseModel):
|
|
18
|
+
project_name: Annotated[
|
|
19
|
+
str,
|
|
20
|
+
pydantic.Field(alias="projectName"),
|
|
21
|
+
FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
|
|
22
|
+
]
|
|
23
|
+
r"""Project name."""
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class ListcollectionsResponseTypedDict(TypedDict):
|
|
27
|
+
r"""A list of collections matched with a projectName."""
|
|
28
|
+
|
|
29
|
+
collections: NotRequired[List[CollectionResponseTypedDict]]
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
class ListcollectionsResponse(BaseModel):
|
|
33
|
+
r"""A list of collections matched with a projectName."""
|
|
34
|
+
|
|
35
|
+
collections: Optional[List[CollectionResponse]] = None
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from .projectresponse import ProjectResponse, ProjectResponseTypedDict
|
|
5
|
+
from lambdadb.types import BaseModel
|
|
6
|
+
from lambdadb.utils import FieldMetadata, SecurityMetadata
|
|
7
|
+
from typing import List, Optional
|
|
8
|
+
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class ListProjectsSecurityTypedDict(TypedDict):
|
|
12
|
+
admin_api_key: str
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class ListProjectsSecurity(BaseModel):
|
|
16
|
+
admin_api_key: Annotated[
|
|
17
|
+
str,
|
|
18
|
+
FieldMetadata(
|
|
19
|
+
security=SecurityMetadata(
|
|
20
|
+
scheme=True,
|
|
21
|
+
scheme_type="apiKey",
|
|
22
|
+
sub_type="header",
|
|
23
|
+
field_name="x-api-key",
|
|
24
|
+
)
|
|
25
|
+
),
|
|
26
|
+
]
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class ListProjectsResponseTypedDict(TypedDict):
|
|
30
|
+
r"""A list of projects."""
|
|
31
|
+
|
|
32
|
+
projects: NotRequired[List[ProjectResponseTypedDict]]
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
class ListProjectsResponse(BaseModel):
|
|
36
|
+
r"""A list of projects."""
|
|
37
|
+
|
|
38
|
+
projects: Optional[List[ProjectResponse]] = None
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from .status import Status
|
|
5
|
+
from lambdadb.types import BaseModel
|
|
6
|
+
import pydantic
|
|
7
|
+
from typing import Optional
|
|
8
|
+
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class ProjectResponseTypedDict(TypedDict):
|
|
12
|
+
id: NotRequired[str]
|
|
13
|
+
r"""Project ID."""
|
|
14
|
+
project_name: NotRequired[str]
|
|
15
|
+
r"""Project name."""
|
|
16
|
+
api_key: NotRequired[str]
|
|
17
|
+
r"""Project API key."""
|
|
18
|
+
rate_limit: NotRequired[float]
|
|
19
|
+
r"""Rate limit."""
|
|
20
|
+
status: NotRequired[Status]
|
|
21
|
+
r"""Status"""
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class ProjectResponse(BaseModel):
|
|
25
|
+
id: Optional[str] = None
|
|
26
|
+
r"""Project ID."""
|
|
27
|
+
|
|
28
|
+
project_name: Annotated[Optional[str], pydantic.Field(alias="projectName")] = None
|
|
29
|
+
r"""Project name."""
|
|
30
|
+
|
|
31
|
+
api_key: Annotated[Optional[str], pydantic.Field(alias="apiKey")] = None
|
|
32
|
+
r"""Project API key."""
|
|
33
|
+
|
|
34
|
+
rate_limit: Annotated[Optional[float], pydantic.Field(alias="rateLimit")] = None
|
|
35
|
+
r"""Rate limit."""
|
|
36
|
+
|
|
37
|
+
status: Optional[Status] = None
|
|
38
|
+
r"""Status"""
|