alchemy-python 0.1.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.
- alchemy/.fern/metadata.json +18 -0
- alchemy/CONTRIBUTING.md +125 -0
- alchemy/__init__.py +380 -0
- alchemy/_default_clients.py +30 -0
- alchemy/auth/__init__.py +4 -0
- alchemy/auth/client.py +767 -0
- alchemy/auth/raw_client.py +866 -0
- alchemy/client.py +717 -0
- alchemy/core/__init__.py +127 -0
- alchemy/core/api_error.py +23 -0
- alchemy/core/client_wrapper.py +155 -0
- alchemy/core/datetime_utils.py +70 -0
- alchemy/core/file.py +67 -0
- alchemy/core/force_multipart.py +18 -0
- alchemy/core/http_client.py +940 -0
- alchemy/core/http_response.py +63 -0
- alchemy/core/http_sse/__init__.py +42 -0
- alchemy/core/http_sse/_api.py +455 -0
- alchemy/core/http_sse/_decoders.py +74 -0
- alchemy/core/http_sse/_exceptions.py +7 -0
- alchemy/core/http_sse/_models.py +17 -0
- alchemy/core/jsonable_encoder.py +133 -0
- alchemy/core/logging.py +107 -0
- alchemy/core/oauth_token_provider.py +73 -0
- alchemy/core/parse_error.py +36 -0
- alchemy/core/pydantic_utilities.py +486 -0
- alchemy/core/query_encoder.py +58 -0
- alchemy/core/remove_none_from_dict.py +11 -0
- alchemy/core/request_options.py +40 -0
- alchemy/core/serialization.py +347 -0
- alchemy/environment.py +7 -0
- alchemy/function/__init__.py +34 -0
- alchemy/function/client.py +808 -0
- alchemy/function/raw_client.py +903 -0
- alchemy/function/version/__init__.py +4 -0
- alchemy/function/version/client.py +364 -0
- alchemy/function/version/raw_client.py +410 -0
- alchemy/host/__init__.py +4 -0
- alchemy/host/client.py +227 -0
- alchemy/host/raw_client.py +242 -0
- alchemy/instance/__init__.py +4 -0
- alchemy/instance/client.py +136 -0
- alchemy/instance/raw_client.py +141 -0
- alchemy/invocation/__init__.py +4 -0
- alchemy/invocation/client.py +570 -0
- alchemy/invocation/raw_client.py +636 -0
- alchemy/member/__init__.py +4 -0
- alchemy/member/client.py +441 -0
- alchemy/member/raw_client.py +504 -0
- alchemy/metrics/__init__.py +4 -0
- alchemy/metrics/client.py +428 -0
- alchemy/metrics/raw_client.py +478 -0
- alchemy/py.typed +0 -0
- alchemy/raw_client.py +138 -0
- alchemy/reference.md +3300 -0
- alchemy/runtime/__init__.py +4 -0
- alchemy/runtime/client.py +141 -0
- alchemy/runtime/raw_client.py +140 -0
- alchemy/service_account/__init__.py +4 -0
- alchemy/service_account/client.py +429 -0
- alchemy/service_account/raw_client.py +490 -0
- alchemy/template/__init__.py +4 -0
- alchemy/template/client.py +141 -0
- alchemy/template/raw_client.py +140 -0
- alchemy/types/__init__.py +344 -0
- alchemy/types/auth_v1accept_invite_response.py +5 -0
- alchemy/types/auth_v1create_service_account_response.py +34 -0
- alchemy/types/auth_v1get_auth_config_request.py +5 -0
- alchemy/types/auth_v1get_auth_config_response.py +53 -0
- alchemy/types/auth_v1get_session_request.py +9 -0
- alchemy/types/auth_v1get_session_response.py +28 -0
- alchemy/types/auth_v1get_token_response.py +29 -0
- alchemy/types/auth_v1invite_member_response.py +29 -0
- alchemy/types/auth_v1list_members_request.py +5 -0
- alchemy/types/auth_v1list_members_response.py +34 -0
- alchemy/types/auth_v1list_service_accounts_request.py +5 -0
- alchemy/types/auth_v1list_service_accounts_response.py +29 -0
- alchemy/types/auth_v1login_response.py +5 -0
- alchemy/types/auth_v1logout_request.py +8 -0
- alchemy/types/auth_v1logout_response.py +5 -0
- alchemy/types/auth_v1member.py +31 -0
- alchemy/types/auth_v1register_response.py +23 -0
- alchemy/types/auth_v1remove_member_response.py +5 -0
- alchemy/types/auth_v1remove_service_account_response.py +5 -0
- alchemy/types/auth_v1role.py +5 -0
- alchemy/types/auth_v1rotate_service_account_secret_response.py +31 -0
- alchemy/types/auth_v1service_account.py +35 -0
- alchemy/types/auth_v1set_member_role_response.py +5 -0
- alchemy/types/connect_error.py +38 -0
- alchemy/types/connect_error_code.py +25 -0
- alchemy/types/connect_error_details_any.py +36 -0
- alchemy/types/connect_protocol_version.py +5 -0
- alchemy/types/connect_timeout_header.py +6 -0
- alchemy/types/functions_v1arrow_contract.py +50 -0
- alchemy/types/functions_v1contract.py +8 -0
- alchemy/types/functions_v1contract_arrow.py +20 -0
- alchemy/types/functions_v1contract_json_schema.py +26 -0
- alchemy/types/functions_v1contract_violation.py +32 -0
- alchemy/types/functions_v1create_function_response.py +22 -0
- alchemy/types/functions_v1create_function_version_response.py +20 -0
- alchemy/types/functions_v1delete_function_response.py +5 -0
- alchemy/types/functions_v1function.py +100 -0
- alchemy/types/functions_v1function_error.py +30 -0
- alchemy/types/functions_v1function_error_kind.py +15 -0
- alchemy/types/functions_v1function_spec.py +58 -0
- alchemy/types/functions_v1function_version.py +81 -0
- alchemy/types/functions_v1function_version_status.py +13 -0
- alchemy/types/functions_v1get_function_response.py +20 -0
- alchemy/types/functions_v1get_function_version_response.py +20 -0
- alchemy/types/functions_v1get_host_request.py +5 -0
- alchemy/types/functions_v1get_host_response.py +20 -0
- alchemy/types/functions_v1get_invocation_logs_request.py +31 -0
- alchemy/types/functions_v1get_invocation_logs_response.py +24 -0
- alchemy/types/functions_v1get_invocation_response.py +20 -0
- alchemy/types/functions_v1get_version_request.py +5 -0
- alchemy/types/functions_v1get_version_response.py +25 -0
- alchemy/types/functions_v1host.py +58 -0
- alchemy/types/functions_v1instance.py +54 -0
- alchemy/types/functions_v1instance_status.py +14 -0
- alchemy/types/functions_v1invocation.py +106 -0
- alchemy/types/functions_v1invocation_protocol.py +8 -0
- alchemy/types/functions_v1invocation_stats.py +41 -0
- alchemy/types/functions_v1invocation_status.py +18 -0
- alchemy/types/functions_v1invoke_async_response.py +34 -0
- alchemy/types/functions_v1invoke_response.py +8 -0
- alchemy/types/functions_v1invoke_response_error.py +20 -0
- alchemy/types/functions_v1invoke_response_output.py +19 -0
- alchemy/types/functions_v1json_schema_contract.py +28 -0
- alchemy/types/functions_v1list_function_versions_response.py +22 -0
- alchemy/types/functions_v1list_functions_response.py +22 -0
- alchemy/types/functions_v1list_hosts_request.py +5 -0
- alchemy/types/functions_v1list_hosts_response.py +23 -0
- alchemy/types/functions_v1list_instances_response.py +20 -0
- alchemy/types/functions_v1list_invocations_response.py +22 -0
- alchemy/types/functions_v1list_runtimes_request.py +5 -0
- alchemy/types/functions_v1list_runtimes_response.py +22 -0
- alchemy/types/functions_v1list_templates_request.py +5 -0
- alchemy/types/functions_v1list_templates_response.py +20 -0
- alchemy/types/functions_v1network.py +5 -0
- alchemy/types/functions_v1pagination_request.py +31 -0
- alchemy/types/functions_v1pagination_response.py +33 -0
- alchemy/types/functions_v1resources.py +28 -0
- alchemy/types/functions_v1runtime.py +59 -0
- alchemy/types/functions_v1runtime_starters.py +29 -0
- alchemy/types/functions_v1source.py +31 -0
- alchemy/types/functions_v1source_file.py +28 -0
- alchemy/types/functions_v1source_layer.py +27 -0
- alchemy/types/functions_v1source_limits.py +30 -0
- alchemy/types/functions_v1start_kind.py +8 -0
- alchemy/types/functions_v1tail_invocations_request.py +32 -0
- alchemy/types/functions_v1tail_invocations_response.py +34 -0
- alchemy/types/functions_v1template.py +94 -0
- alchemy/types/functions_v1template_source.py +27 -0
- alchemy/types/functions_v1update_function_response.py +20 -0
- alchemy/types/google_protobuf_list_value.py +10 -0
- alchemy/types/google_protobuf_null_value.py +5 -0
- alchemy/types/google_protobuf_struct.py +10 -0
- alchemy/types/google_protobuf_value.py +5 -0
- alchemy/types/metrics_v1aggregate_row.py +24 -0
- alchemy/types/metrics_v1get_queue_response.py +25 -0
- alchemy/types/metrics_v1metric.py +16 -0
- alchemy/types/metrics_v1metric_dimension.py +14 -0
- alchemy/types/metrics_v1metric_filter.py +26 -0
- alchemy/types/metrics_v1metric_granularity.py +13 -0
- alchemy/types/metrics_v1query_aggregate_response.py +20 -0
- alchemy/types/metrics_v1query_timeseries_response.py +20 -0
- alchemy/types/metrics_v1timeseries.py +28 -0
- alchemy/types/metrics_v1timeseries_point.py +28 -0
- alchemy_python-0.1.0.dist-info/METADATA +196 -0
- alchemy_python-0.1.0.dist-info/RECORD +172 -0
- alchemy_python-0.1.0.dist-info/WHEEL +4 -0
- alchemy_python-0.1.0.dist-info/licenses/LICENSE +201 -0
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
import typing_extensions
|
|
7
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
8
|
+
from ..core.serialization import FieldMetadata
|
|
9
|
+
from .functions_v1function_error import FunctionsV1FunctionError
|
|
10
|
+
from .functions_v1invocation_stats import FunctionsV1InvocationStats
|
|
11
|
+
from .functions_v1invocation_status import FunctionsV1InvocationStatus
|
|
12
|
+
from .functions_v1start_kind import FunctionsV1StartKind
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class FunctionsV1Invocation(UniversalBaseModel):
|
|
16
|
+
"""
|
|
17
|
+
Invocation is the persisted record of one Invoke call. Lifecycle stamps
|
|
18
|
+
are epoch millis; 0 means unset. started_at is when the function received
|
|
19
|
+
its input, ended_at when the record reached a terminal status.
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
tenant_id: typing_extensions.Annotated[
|
|
23
|
+
typing.Optional[str], FieldMetadata(alias="tenantId"), pydantic.Field(alias="tenantId")
|
|
24
|
+
] = None
|
|
25
|
+
id: typing.Optional[str] = None
|
|
26
|
+
function_id: typing_extensions.Annotated[
|
|
27
|
+
typing.Optional[str], FieldMetadata(alias="functionId"), pydantic.Field(alias="functionId")
|
|
28
|
+
] = None
|
|
29
|
+
version: typing.Optional[str] = None
|
|
30
|
+
status: typing.Optional[FunctionsV1InvocationStatus] = None
|
|
31
|
+
start_kind: typing_extensions.Annotated[
|
|
32
|
+
typing.Optional[FunctionsV1StartKind], FieldMetadata(alias="startKind"), pydantic.Field(alias="startKind")
|
|
33
|
+
] = None
|
|
34
|
+
created_at: typing_extensions.Annotated[
|
|
35
|
+
typing.Optional[str], FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt")
|
|
36
|
+
] = None
|
|
37
|
+
started_at: typing_extensions.Annotated[
|
|
38
|
+
typing.Optional[str], FieldMetadata(alias="startedAt"), pydantic.Field(alias="startedAt")
|
|
39
|
+
] = None
|
|
40
|
+
ended_at: typing_extensions.Annotated[
|
|
41
|
+
typing.Optional[str], FieldMetadata(alias="endedAt"), pydantic.Field(alias="endedAt")
|
|
42
|
+
] = None
|
|
43
|
+
stats: typing.Optional[FunctionsV1InvocationStats] = None
|
|
44
|
+
error: typing.Optional[FunctionsV1FunctionError] = None
|
|
45
|
+
platform_error: typing_extensions.Annotated[
|
|
46
|
+
typing.Optional[str], FieldMetadata(alias="platformError"), pydantic.Field(alias="platformError")
|
|
47
|
+
] = None
|
|
48
|
+
input_bytes: typing_extensions.Annotated[
|
|
49
|
+
typing.Optional[str], FieldMetadata(alias="inputBytes"), pydantic.Field(alias="inputBytes")
|
|
50
|
+
] = None
|
|
51
|
+
output_bytes: typing_extensions.Annotated[
|
|
52
|
+
typing.Optional[str], FieldMetadata(alias="outputBytes"), pydantic.Field(alias="outputBytes")
|
|
53
|
+
] = None
|
|
54
|
+
instance_id: typing_extensions.Annotated[
|
|
55
|
+
typing.Optional[str],
|
|
56
|
+
FieldMetadata(alias="instanceId"),
|
|
57
|
+
pydantic.Field(
|
|
58
|
+
alias="instanceId", description="instance_id names the microVM that served it, while it exists."
|
|
59
|
+
),
|
|
60
|
+
] = None
|
|
61
|
+
"""
|
|
62
|
+
instance_id names the microVM that served it, while it exists.
|
|
63
|
+
"""
|
|
64
|
+
|
|
65
|
+
created_by_user_id: typing_extensions.Annotated[
|
|
66
|
+
typing.Optional[str], FieldMetadata(alias="createdByUserId"), pydantic.Field(alias="createdByUserId")
|
|
67
|
+
] = None
|
|
68
|
+
idempotency_key: typing_extensions.Annotated[
|
|
69
|
+
typing.Optional[str],
|
|
70
|
+
FieldMetadata(alias="idempotencyKey"),
|
|
71
|
+
pydantic.Field(
|
|
72
|
+
alias="idempotencyKey", description="idempotency_key is the caller's key, when the call carried one."
|
|
73
|
+
),
|
|
74
|
+
] = None
|
|
75
|
+
"""
|
|
76
|
+
idempotency_key is the caller's key, when the call carried one.
|
|
77
|
+
"""
|
|
78
|
+
|
|
79
|
+
host: typing.Optional[str] = pydantic.Field(default=None)
|
|
80
|
+
"""
|
|
81
|
+
host is the host the invocation was sent to, empty when none took
|
|
82
|
+
it. Set by the server when it sends it and by the host in its record.
|
|
83
|
+
"""
|
|
84
|
+
|
|
85
|
+
attempts: typing.Optional[int] = pydantic.Field(default=None)
|
|
86
|
+
"""
|
|
87
|
+
attempts is how many times a host has started to run it.
|
|
88
|
+
"""
|
|
89
|
+
|
|
90
|
+
async_: typing_extensions.Annotated[
|
|
91
|
+
typing.Optional[bool],
|
|
92
|
+
FieldMetadata(alias="async"),
|
|
93
|
+
pydantic.Field(alias="async", description="async is set when the caller did not wait for the result."),
|
|
94
|
+
] = None
|
|
95
|
+
"""
|
|
96
|
+
async is set when the caller did not wait for the result.
|
|
97
|
+
"""
|
|
98
|
+
|
|
99
|
+
if IS_PYDANTIC_V2:
|
|
100
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
101
|
+
else:
|
|
102
|
+
|
|
103
|
+
class Config:
|
|
104
|
+
frozen = True
|
|
105
|
+
smart_union = True
|
|
106
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
import typing_extensions
|
|
7
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
8
|
+
from ..core.serialization import FieldMetadata
|
|
9
|
+
from .functions_v1start_kind import FunctionsV1StartKind
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class FunctionsV1InvocationStats(UniversalBaseModel):
|
|
13
|
+
"""
|
|
14
|
+
InvocationStats breaks down where the time went, in microseconds, so the
|
|
15
|
+
cost of each start path can be read directly off a response. acquire_us is
|
|
16
|
+
from accepting the request to having a microVM ready to take input; run_us
|
|
17
|
+
is from handing input to the function to receiving its result; total_us is
|
|
18
|
+
the whole request as seen by the server, including both validations.
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
start_kind: typing_extensions.Annotated[
|
|
22
|
+
typing.Optional[FunctionsV1StartKind], FieldMetadata(alias="startKind"), pydantic.Field(alias="startKind")
|
|
23
|
+
] = None
|
|
24
|
+
acquire_us: typing_extensions.Annotated[
|
|
25
|
+
typing.Optional[str], FieldMetadata(alias="acquireUs"), pydantic.Field(alias="acquireUs")
|
|
26
|
+
] = None
|
|
27
|
+
run_us: typing_extensions.Annotated[
|
|
28
|
+
typing.Optional[str], FieldMetadata(alias="runUs"), pydantic.Field(alias="runUs")
|
|
29
|
+
] = None
|
|
30
|
+
total_us: typing_extensions.Annotated[
|
|
31
|
+
typing.Optional[str], FieldMetadata(alias="totalUs"), pydantic.Field(alias="totalUs")
|
|
32
|
+
] = None
|
|
33
|
+
|
|
34
|
+
if IS_PYDANTIC_V2:
|
|
35
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
36
|
+
else:
|
|
37
|
+
|
|
38
|
+
class Config:
|
|
39
|
+
frozen = True
|
|
40
|
+
smart_union = True
|
|
41
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
FunctionsV1InvocationStatus = typing.Union[
|
|
6
|
+
typing.Literal[
|
|
7
|
+
"INVOCATION_STATUS_UNSPECIFIED",
|
|
8
|
+
"INVOCATION_STATUS_PENDING",
|
|
9
|
+
"INVOCATION_STATUS_STARTING",
|
|
10
|
+
"INVOCATION_STATUS_RUNNING",
|
|
11
|
+
"INVOCATION_STATUS_SUCCEEDED",
|
|
12
|
+
"INVOCATION_STATUS_FAILED",
|
|
13
|
+
"INVOCATION_STATUS_ERRORED",
|
|
14
|
+
"INVOCATION_STATUS_CANCELED",
|
|
15
|
+
"INVOCATION_STATUS_REJECTED",
|
|
16
|
+
],
|
|
17
|
+
typing.Any,
|
|
18
|
+
]
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
import typing_extensions
|
|
7
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
8
|
+
from ..core.serialization import FieldMetadata
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class FunctionsV1InvokeAsyncResponse(UniversalBaseModel):
|
|
12
|
+
"""
|
|
13
|
+
InvokeAsyncResponse is returned once the invocation is queued. Nothing
|
|
14
|
+
waits for it to run and its output is dropped. GetInvocation follows its
|
|
15
|
+
status, attempts and error.
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
invocation_id: typing_extensions.Annotated[
|
|
19
|
+
typing.Optional[str], FieldMetadata(alias="invocationId"), pydantic.Field(alias="invocationId")
|
|
20
|
+
] = None
|
|
21
|
+
replayed: typing.Optional[bool] = pydantic.Field(default=None)
|
|
22
|
+
"""
|
|
23
|
+
replayed is set when an earlier call with the same idempotency_key
|
|
24
|
+
queued invocation_id, and nothing was queued for this call.
|
|
25
|
+
"""
|
|
26
|
+
|
|
27
|
+
if IS_PYDANTIC_V2:
|
|
28
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
29
|
+
else:
|
|
30
|
+
|
|
31
|
+
class Config:
|
|
32
|
+
frozen = True
|
|
33
|
+
smart_union = True
|
|
34
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
from .functions_v1invoke_response_error import FunctionsV1InvokeResponseError
|
|
6
|
+
from .functions_v1invoke_response_output import FunctionsV1InvokeResponseOutput
|
|
7
|
+
|
|
8
|
+
FunctionsV1InvokeResponse = typing.Union[FunctionsV1InvokeResponseError, FunctionsV1InvokeResponseOutput]
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
|
+
from .functions_v1function_error import FunctionsV1FunctionError
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class FunctionsV1InvokeResponseError(UniversalBaseModel):
|
|
11
|
+
error: typing.Optional[FunctionsV1FunctionError] = None
|
|
12
|
+
|
|
13
|
+
if IS_PYDANTIC_V2:
|
|
14
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
15
|
+
else:
|
|
16
|
+
|
|
17
|
+
class Config:
|
|
18
|
+
frozen = True
|
|
19
|
+
smart_union = True
|
|
20
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class FunctionsV1InvokeResponseOutput(UniversalBaseModel):
|
|
10
|
+
output: typing.Optional[str] = None
|
|
11
|
+
|
|
12
|
+
if IS_PYDANTIC_V2:
|
|
13
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
14
|
+
else:
|
|
15
|
+
|
|
16
|
+
class Config:
|
|
17
|
+
frozen = True
|
|
18
|
+
smart_union = True
|
|
19
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
|
+
from .google_protobuf_struct import GoogleProtobufStruct
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class FunctionsV1JsonSchemaContract(UniversalBaseModel):
|
|
11
|
+
"""
|
|
12
|
+
JsonSchemaContract types the boundary with JSON Schema, draft 2020-12.
|
|
13
|
+
Input and output are one JSON value each, on both the API and the function
|
|
14
|
+
process's stdin/stdout. Each document must be self-contained: $ref may only
|
|
15
|
+
point inside it.
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
input: typing.Optional[GoogleProtobufStruct] = None
|
|
19
|
+
output: typing.Optional[GoogleProtobufStruct] = None
|
|
20
|
+
|
|
21
|
+
if IS_PYDANTIC_V2:
|
|
22
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
23
|
+
else:
|
|
24
|
+
|
|
25
|
+
class Config:
|
|
26
|
+
frozen = True
|
|
27
|
+
smart_union = True
|
|
28
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
|
+
from .functions_v1function_version import FunctionsV1FunctionVersion
|
|
8
|
+
from .functions_v1pagination_response import FunctionsV1PaginationResponse
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class FunctionsV1ListFunctionVersionsResponse(UniversalBaseModel):
|
|
12
|
+
versions: typing.Optional[typing.List[FunctionsV1FunctionVersion]] = None
|
|
13
|
+
pagination: typing.Optional[FunctionsV1PaginationResponse] = None
|
|
14
|
+
|
|
15
|
+
if IS_PYDANTIC_V2:
|
|
16
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
17
|
+
else:
|
|
18
|
+
|
|
19
|
+
class Config:
|
|
20
|
+
frozen = True
|
|
21
|
+
smart_union = True
|
|
22
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
|
+
from .functions_v1function import FunctionsV1Function
|
|
8
|
+
from .functions_v1pagination_response import FunctionsV1PaginationResponse
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class FunctionsV1ListFunctionsResponse(UniversalBaseModel):
|
|
12
|
+
functions: typing.Optional[typing.List[FunctionsV1Function]] = None
|
|
13
|
+
pagination: typing.Optional[FunctionsV1PaginationResponse] = None
|
|
14
|
+
|
|
15
|
+
if IS_PYDANTIC_V2:
|
|
16
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
17
|
+
else:
|
|
18
|
+
|
|
19
|
+
class Config:
|
|
20
|
+
frozen = True
|
|
21
|
+
smart_union = True
|
|
22
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
|
+
from .functions_v1host import FunctionsV1Host
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class FunctionsV1ListHostsResponse(UniversalBaseModel):
|
|
11
|
+
hosts: typing.Optional[typing.List[FunctionsV1Host]] = pydantic.Field(default=None)
|
|
12
|
+
"""
|
|
13
|
+
Every host that has sent a heartbeat recently, by hostname.
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
if IS_PYDANTIC_V2:
|
|
17
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
18
|
+
else:
|
|
19
|
+
|
|
20
|
+
class Config:
|
|
21
|
+
frozen = True
|
|
22
|
+
smart_union = True
|
|
23
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
|
+
from .functions_v1instance import FunctionsV1Instance
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class FunctionsV1ListInstancesResponse(UniversalBaseModel):
|
|
11
|
+
instances: typing.Optional[typing.List[FunctionsV1Instance]] = None
|
|
12
|
+
|
|
13
|
+
if IS_PYDANTIC_V2:
|
|
14
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
15
|
+
else:
|
|
16
|
+
|
|
17
|
+
class Config:
|
|
18
|
+
frozen = True
|
|
19
|
+
smart_union = True
|
|
20
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
|
+
from .functions_v1invocation import FunctionsV1Invocation
|
|
8
|
+
from .functions_v1pagination_response import FunctionsV1PaginationResponse
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class FunctionsV1ListInvocationsResponse(UniversalBaseModel):
|
|
12
|
+
invocations: typing.Optional[typing.List[FunctionsV1Invocation]] = None
|
|
13
|
+
pagination: typing.Optional[FunctionsV1PaginationResponse] = None
|
|
14
|
+
|
|
15
|
+
if IS_PYDANTIC_V2:
|
|
16
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
17
|
+
else:
|
|
18
|
+
|
|
19
|
+
class Config:
|
|
20
|
+
frozen = True
|
|
21
|
+
smart_union = True
|
|
22
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
|
+
from .functions_v1runtime import FunctionsV1Runtime
|
|
8
|
+
from .functions_v1source_limits import FunctionsV1SourceLimits
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class FunctionsV1ListRuntimesResponse(UniversalBaseModel):
|
|
12
|
+
runtimes: typing.Optional[typing.List[FunctionsV1Runtime]] = None
|
|
13
|
+
limits: typing.Optional[FunctionsV1SourceLimits] = None
|
|
14
|
+
|
|
15
|
+
if IS_PYDANTIC_V2:
|
|
16
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
17
|
+
else:
|
|
18
|
+
|
|
19
|
+
class Config:
|
|
20
|
+
frozen = True
|
|
21
|
+
smart_union = True
|
|
22
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
|
+
from .functions_v1template import FunctionsV1Template
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class FunctionsV1ListTemplatesResponse(UniversalBaseModel):
|
|
11
|
+
templates: typing.Optional[typing.List[FunctionsV1Template]] = None
|
|
12
|
+
|
|
13
|
+
if IS_PYDANTIC_V2:
|
|
14
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
15
|
+
else:
|
|
16
|
+
|
|
17
|
+
class Config:
|
|
18
|
+
frozen = True
|
|
19
|
+
smart_union = True
|
|
20
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
import typing_extensions
|
|
7
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
8
|
+
from ..core.serialization import FieldMetadata
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class FunctionsV1PaginationRequest(UniversalBaseModel):
|
|
12
|
+
"""
|
|
13
|
+
PaginationRequest narrows a List response to one page. Absent means the
|
|
14
|
+
full result. page_size is defaulted and capped server-side;
|
|
15
|
+
cursor is an opaque token from a prior response, absent meaning the first
|
|
16
|
+
page.
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
page_size: typing_extensions.Annotated[
|
|
20
|
+
typing.Optional[int], FieldMetadata(alias="pageSize"), pydantic.Field(alias="pageSize")
|
|
21
|
+
] = None
|
|
22
|
+
cursor: typing.Optional[str] = None
|
|
23
|
+
|
|
24
|
+
if IS_PYDANTIC_V2:
|
|
25
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
26
|
+
else:
|
|
27
|
+
|
|
28
|
+
class Config:
|
|
29
|
+
frozen = True
|
|
30
|
+
smart_union = True
|
|
31
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
import typing_extensions
|
|
7
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
8
|
+
from ..core.serialization import FieldMetadata
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class FunctionsV1PaginationResponse(UniversalBaseModel):
|
|
12
|
+
"""
|
|
13
|
+
PaginationResponse reports how many items matched before the page was cut,
|
|
14
|
+
plus opaque cursors for the adjacent pages. Absent cursors mean no page in
|
|
15
|
+
that direction.
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
total: typing.Optional[int] = None
|
|
19
|
+
previous_cursor: typing_extensions.Annotated[
|
|
20
|
+
typing.Optional[str], FieldMetadata(alias="previousCursor"), pydantic.Field(alias="previousCursor")
|
|
21
|
+
] = None
|
|
22
|
+
next_cursor: typing_extensions.Annotated[
|
|
23
|
+
typing.Optional[str], FieldMetadata(alias="nextCursor"), pydantic.Field(alias="nextCursor")
|
|
24
|
+
] = None
|
|
25
|
+
|
|
26
|
+
if IS_PYDANTIC_V2:
|
|
27
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
28
|
+
else:
|
|
29
|
+
|
|
30
|
+
class Config:
|
|
31
|
+
frozen = True
|
|
32
|
+
smart_union = True
|
|
33
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
import typing_extensions
|
|
7
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
8
|
+
from ..core.serialization import FieldMetadata
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class FunctionsV1Resources(UniversalBaseModel):
|
|
12
|
+
"""
|
|
13
|
+
Resources sizes the microVM. Zero fields take server defaults.
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
vcpus: typing.Optional[int] = None
|
|
17
|
+
memory_mib: typing_extensions.Annotated[
|
|
18
|
+
typing.Optional[int], FieldMetadata(alias="memoryMib"), pydantic.Field(alias="memoryMib")
|
|
19
|
+
] = None
|
|
20
|
+
|
|
21
|
+
if IS_PYDANTIC_V2:
|
|
22
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
23
|
+
else:
|
|
24
|
+
|
|
25
|
+
class Config:
|
|
26
|
+
frozen = True
|
|
27
|
+
smart_union = True
|
|
28
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
import typing_extensions
|
|
7
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
8
|
+
from ..core.serialization import FieldMetadata
|
|
9
|
+
from .functions_v1runtime_starters import FunctionsV1RuntimeStarters
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class FunctionsV1Runtime(UniversalBaseModel):
|
|
13
|
+
"""
|
|
14
|
+
Runtime is an image a function built from source lands on, with what a
|
|
15
|
+
client needs to offer it: the handler the image runs and a starter for it.
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
id: typing.Optional[str] = pydantic.Field(default=None)
|
|
19
|
+
"""
|
|
20
|
+
id names the runtime in a request, e.g. python.
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
label: typing.Optional[str] = pydantic.Field(default=None)
|
|
24
|
+
"""
|
|
25
|
+
label is the runtime's name for people, e.g. Python 3.13.
|
|
26
|
+
"""
|
|
27
|
+
|
|
28
|
+
image: typing.Optional[str] = pydantic.Field(default=None)
|
|
29
|
+
"""
|
|
30
|
+
image is the reference a source spec sets as spec.image.
|
|
31
|
+
"""
|
|
32
|
+
|
|
33
|
+
handler_path: typing_extensions.Annotated[
|
|
34
|
+
typing.Optional[str],
|
|
35
|
+
FieldMetadata(alias="handlerPath"),
|
|
36
|
+
pydantic.Field(
|
|
37
|
+
alias="handlerPath", description="handler_path is the file under /app the image runs, e.g. handler.py."
|
|
38
|
+
),
|
|
39
|
+
] = None
|
|
40
|
+
"""
|
|
41
|
+
handler_path is the file under /app the image runs, e.g. handler.py.
|
|
42
|
+
"""
|
|
43
|
+
|
|
44
|
+
dark_icon_url: typing_extensions.Annotated[
|
|
45
|
+
typing.Optional[str], FieldMetadata(alias="darkIconUrl"), pydantic.Field(alias="darkIconUrl")
|
|
46
|
+
] = None
|
|
47
|
+
light_icon_url: typing_extensions.Annotated[
|
|
48
|
+
typing.Optional[str], FieldMetadata(alias="lightIconUrl"), pydantic.Field(alias="lightIconUrl")
|
|
49
|
+
] = None
|
|
50
|
+
starters: typing.Optional[FunctionsV1RuntimeStarters] = None
|
|
51
|
+
|
|
52
|
+
if IS_PYDANTIC_V2:
|
|
53
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
54
|
+
else:
|
|
55
|
+
|
|
56
|
+
class Config:
|
|
57
|
+
frozen = True
|
|
58
|
+
smart_union = True
|
|
59
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
import typing_extensions
|
|
7
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
8
|
+
from ..core.serialization import FieldMetadata
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class FunctionsV1RuntimeStarters(UniversalBaseModel):
|
|
12
|
+
"""
|
|
13
|
+
RuntimeStarters are handlers that read one input and write one output, per
|
|
14
|
+
contract kind, for a function to start from.
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
json_schema: typing_extensions.Annotated[
|
|
18
|
+
typing.Optional[str], FieldMetadata(alias="jsonSchema"), pydantic.Field(alias="jsonSchema")
|
|
19
|
+
] = None
|
|
20
|
+
arrow: typing.Optional[str] = None
|
|
21
|
+
|
|
22
|
+
if IS_PYDANTIC_V2:
|
|
23
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
24
|
+
else:
|
|
25
|
+
|
|
26
|
+
class Config:
|
|
27
|
+
frozen = True
|
|
28
|
+
smart_union = True
|
|
29
|
+
extra = pydantic.Extra.allow
|