Skip to content

Commit 6b5a412

Browse files
chore: Update docstrings to include py312 (#2317)
Co-authored-by: Erlend vollset <erlendvollset@gmail.com>
1 parent 99fa661 commit 6b5a412

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

cognite/client/_api/functions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ def create(
246246
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.
247247
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.
248248
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", `None`], and `None` translates to the API default which will change over time. The runtime "py311" resolves to the latest version of the Python 3.11 series.
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.
250250
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.
251251
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>`_
252252
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>`_

cognite/client/data_classes/functions.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
if TYPE_CHECKING:
2424
from cognite.client import CogniteClient
2525

26-
RunTime: TypeAlias = Literal["py39", "py310", "py311"]
26+
RunTime: TypeAlias = Literal["py39", "py310", "py311", "py312"]
2727
FunctionStatus: TypeAlias = Literal["Queued", "Deploying", "Ready", "Failed"]
2828
HANDLER_FILE_NAME = "handler.py"
2929

@@ -90,7 +90,7 @@ class FunctionCore(WriteableCogniteResource["FunctionWrite"], ABC):
9090
env_vars (dict[str, str] | None): User specified environment variables on the function ((key, value) pairs).
9191
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.
9292
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"]. The runtime "py311" resolves to the latest version of the Python 3.11 series.
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.
9494
metadata (dict[str, str] | None): Metadata associated with a function as a set of key:value pairs.
9595
"""
9696

@@ -146,7 +146,7 @@ class Function(FunctionCore):
146146
env_vars (dict[str, str] | None): User specified environment variables on the function ((key, value) pairs).
147147
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.
148148
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"]. The runtime "py311" resolves to the latest version of the Python 3.11s series.
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.
150150
runtime_version (str | None): The complete specification of the function runtime with major, minor and patch version numbers.
151151
metadata (dict[str, str] | None): Metadata associated with a function as a set of key:value pairs.
152152
error (dict | None): Dictionary with keys "message" and "trace", which is populated if deployment fails.
@@ -310,7 +310,7 @@ class FunctionWrite(FunctionCore):
310310
env_vars (dict[str, str] | None): User specified environment variables on the function ((key, value) pairs).
311311
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.
312312
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"]. The runtime "py311" resolves to the latest version of the Python 3.11 series.
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.
314314
metadata (dict[str, str] | None): Metadata associated with a function as a set of key:value pairs.
315315
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.
316316
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):
745745
timeout_minutes (int): Timeout of each function call.
746746
cpu_cores (dict[str, float]): The number of CPU cores per function execution (i.e. function call).
747747
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, "py311" translates to the latest version of the Python 3.11 series.
748+
runtimes (list[str]): Available runtimes. For example, "py312" translates to the latest version of the Python 3.12 series.
749749
response_size_mb (int | None): Maximum response size of function calls.
750750
"""
751751

0 commit comments

Comments
 (0)