You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: cognite/client/_api/functions.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -246,7 +246,7 @@ def create(
246
246
env_vars (dict[str, str] | None): Environment variables as key/value pairs. Keys can contain only letters, numbers or the underscore character. You can create at most 100 environment variables.
247
247
cpu (float | None): Number of CPU cores per function. Allowed range and default value are given by the `limits endpoint. <https://developer.cognite.com/api#tag/Functions/operation/functionsLimits>`_, and None translates to the API default. On Azure, only the default value is used.
248
248
memory (float | None): Memory per function measured in GB. Allowed range and default value are given by the `limits endpoint. <https://developer.cognite.com/api#tag/Functions/operation/functionsLimits>`_, and None translates to the API default. On Azure, only the default value is used.
249
-
runtime (RunTime | None): The function runtime. Valid values are ["py39", "py310", "py311", "py312", `None`], and `None` translates to the API default which will change over time. The runtime "py312" resolves to the latest version of the Python 3.12 series.
249
+
runtime (RunTime | None): The function runtime. Valid values are ["py310", "py311", "py312", `None`], and `None` translates to the API default which will change over time. The runtime "py312" resolves to the latest version of the Python 3.12 series.
250
250
metadata (dict[str, str] | None): Metadata for the function as key/value pairs. Key & values can be at most 32, 512 characters long respectively. You can have at the most 16 key-value pairs, with a maximum size of 512 bytes.
251
251
index_url (str | None): Index URL for Python Package Manager to use. Be aware of the intrinsic security implications of using the `index_url` option. `More information can be found on official docs, <https://docs.cognite.com/cdf/functions/#additional-arguments>`_
252
252
extra_index_urls (list[str] | None): Extra Index URLs for Python Package Manager to use. Be aware of the intrinsic security implications of using the `extra_index_urls` option. `More information can be found on official docs, <https://docs.cognite.com/cdf/functions/#additional-arguments>`_
@@ -90,7 +90,7 @@ class FunctionCore(WriteableCogniteResource["FunctionWrite"], ABC):
90
90
env_vars (dict[str, str] | None): User specified environment variables on the function ((key, value) pairs).
91
91
cpu (float | None): Number of CPU cores per function. Allowed range and default value are given by the `limits endpoint. <https://developer.cognite.com/api#tag/Functions/operation/functionsLimits>`_, and None translates to the API default. On Azure, only the default value is used.
92
92
memory (float | None): Memory per function measured in GB. Allowed range and default value are given by the `limits endpoint. <https://developer.cognite.com/api#tag/Functions/operation/functionsLimits>`_, and None translates to the API default. On Azure, only the default value is used.
93
-
runtime (str | None): Runtime of the function. Allowed values are ["py39","py310", "py311", "py312"]. The runtime "py312" resolves to the latest version of the Python 3.12 series.
93
+
runtime (RunTime | None): Runtime of the function. Allowed values are ["py310", "py311", "py312"]. The runtime "py312" resolves to the latest version of the Python 3.12 series.
94
94
metadata (dict[str, str] | None): Metadata associated with a function as a set of key:value pairs.
95
95
"""
96
96
@@ -106,7 +106,7 @@ def __init__(
106
106
env_vars: dict[str, str] |None=None,
107
107
cpu: float|None=None,
108
108
memory: float|None=None,
109
-
runtime: str|None=None,
109
+
runtime: RunTime|None=None,
110
110
metadata: dict[str, str] |None=None,
111
111
) ->None:
112
112
# name/file_id are required when using the class to read,
@@ -124,7 +124,7 @@ def __init__(
124
124
self.env_vars=env_vars
125
125
self.cpu=cpu
126
126
self.memory=memory
127
-
self.runtime=runtime
127
+
self.runtime: RunTime|None=runtime
128
128
self.metadata=metadata
129
129
130
130
@@ -146,7 +146,7 @@ class Function(FunctionCore):
146
146
env_vars (dict[str, str] | None): User specified environment variables on the function ((key, value) pairs).
147
147
cpu (float | None): Number of CPU cores per function. Allowed range and default value are given by the `limits endpoint. <https://developer.cognite.com/api#tag/Functions/operation/functionsLimits>`_, and None translates to the API default. On Azure, only the default value is used.
148
148
memory (float | None): Memory per function measured in GB. Allowed range and default value are given by the `limits endpoint. <https://developer.cognite.com/api#tag/Functions/operation/functionsLimits>`_, and None translates to the API default. On Azure, only the default value is used.
149
-
runtime (str | None): Runtime of the function. Allowed values are ["py39","py310", "py311", "py312"]. The runtime "py312" resolves to the latest version of the Python 3.12 series.
149
+
runtime (RunTime | None): Runtime of the function. Allowed values are ["py310", "py311", "py312"]. The runtime "py312" resolves to the latest version of the Python 3.12 series.
150
150
runtime_version (str | None): The complete specification of the function runtime with major, minor and patch version numbers.
151
151
metadata (dict[str, str] | None): Metadata associated with a function as a set of key:value pairs.
152
152
error (dict | None): Dictionary with keys "message" and "trace", which is populated if deployment fails.
@@ -310,7 +310,7 @@ class FunctionWrite(FunctionCore):
310
310
env_vars (dict[str, str] | None): User specified environment variables on the function ((key, value) pairs).
311
311
cpu (float | None): Number of CPU cores per function. Allowed range and default value are given by the `limits endpoint. <https://developer.cognite.com/api#tag/Functions/operation/functionsLimits>`_, and None translates to the API default. On Azure, only the default value is used.
312
312
memory (float | None): Memory per function measured in GB. Allowed range and default value are given by the `limits endpoint. <https://developer.cognite.com/api#tag/Functions/operation/functionsLimits>`_, and None translates to the API default. On Azure, only the default value is used.
313
-
runtime (RunTime | None): Runtime of the function. Allowed values are ["py39","py310", "py311", "py312"]. The runtime "py312" resolves to the latest version of the Python 3.12 series.
313
+
runtime (RunTime | None): Runtime of the function. Allowed values are ["py310", "py311", "py312"]. The runtime "py312" resolves to the latest version of the Python 3.12 series.
314
314
metadata (dict[str, str] | None): Metadata associated with a function as a set of key:value pairs.
315
315
index_url (str | None): Specify a different python package index, allowing for packages published in private repositories. Supports basic HTTP authentication as described in pip basic authentication. See the documentation for additional information related to the security risks of using this option.
316
316
extra_index_urls (list[str] | None): Extra package index URLs to use when building the function, allowing for packages published in private repositories. Supports basic HTTP authentication as described in pip basic authentication. See the documentation for additional information related to the security risks of using this option.
@@ -745,7 +745,7 @@ class FunctionsLimits(CogniteResponse):
745
745
timeout_minutes (int): Timeout of each function call.
746
746
cpu_cores (dict[str, float]): The number of CPU cores per function execution (i.e. function call).
747
747
memory_gb (dict[str, float]): The amount of available memory in GB per function execution (i.e. function call).
748
-
runtimes (list[str]): Available runtimes. For example, "py312" translates to the latest version of the Python 3.12 series.
748
+
runtimes (list[RunTime]): Available runtimes. For example, "py312" translates to the latest version of the Python 3.12 series.
749
749
response_size_mb (int | None): Maximum response size of function calls.
0 commit comments