From 78eb019c87cc55186abffd92f1d710d0c6ef0895 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 24 Sep 2025 13:45:48 +0000 Subject: [PATCH 1/5] chore(types): change optional parameter type from NotGiven to Omit --- README.md | 4 +- src/gradient/__init__.py | 4 +- src/gradient/_base_client.py | 18 +- src/gradient/_client.py | 16 +- src/gradient/_qs.py | 14 +- src/gradient/_types.py | 29 +- src/gradient/_utils/_transform.py | 4 +- src/gradient/_utils/_utils.py | 8 +- src/gradient/resources/agents/agents.py | 166 ++--- src/gradient/resources/agents/api_keys.py | 50 +- .../resources/agents/chat/completions.py | 282 ++++---- .../resources/agents/evaluation_datasets.py | 22 +- .../evaluation_metrics/anthropic/keys.py | 62 +- .../evaluation_metrics/evaluation_metrics.py | 18 +- .../agents/evaluation_metrics/models.py | 22 +- .../evaluation_metrics/oauth2/dropbox.py | 14 +- .../evaluation_metrics/oauth2/oauth2.py | 14 +- .../agents/evaluation_metrics/openai/keys.py | 62 +- .../evaluation_metrics/workspaces/agents.py | 30 +- .../workspaces/workspaces.py | 50 +- .../resources/agents/evaluation_runs.py | 38 +- .../resources/agents/evaluation_test_cases.py | 78 +-- src/gradient/resources/agents/functions.py | 74 +-- .../resources/agents/knowledge_bases.py | 14 +- src/gradient/resources/agents/routes.py | 54 +- src/gradient/resources/agents/versions.py | 26 +- src/gradient/resources/chat/completions.py | 282 ++++---- .../databases/schema_registry/config.py | 18 +- .../resources/gpu_droplets/account/keys.py | 34 +- .../resources/gpu_droplets/actions.py | 150 ++--- .../resources/gpu_droplets/autoscale.py | 62 +- .../resources/gpu_droplets/backups.py | 34 +- .../destroy_with_associated_resources.py | 42 +- .../gpu_droplets/firewalls/droplets.py | 10 +- .../gpu_droplets/firewalls/firewalls.py | 34 +- .../resources/gpu_droplets/firewalls/rules.py | 26 +- .../resources/gpu_droplets/firewalls/tags.py | 10 +- .../gpu_droplets/floating_ips/actions.py | 26 +- .../gpu_droplets/floating_ips/floating_ips.py | 50 +- .../resources/gpu_droplets/gpu_droplets.py | 242 +++---- .../resources/gpu_droplets/images/actions.py | 26 +- .../resources/gpu_droplets/images/images.py | 78 +-- .../gpu_droplets/load_balancers/droplets.py | 10 +- .../load_balancers/forwarding_rules.py | 10 +- .../load_balancers/load_balancers.py | 610 +++++++++--------- src/gradient/resources/gpu_droplets/sizes.py | 14 +- .../resources/gpu_droplets/snapshots.py | 26 +- .../resources/gpu_droplets/volumes/actions.py | 162 ++--- .../gpu_droplets/volumes/snapshots.py | 30 +- .../resources/gpu_droplets/volumes/volumes.py | 114 ++-- src/gradient/resources/inference/api_keys.py | 42 +- .../resources/knowledge_bases/data_sources.py | 38 +- .../knowledge_bases/indexing_jobs.py | 42 +- .../knowledge_bases/knowledge_bases.py | 86 +-- src/gradient/resources/models/models.py | 22 +- .../resources/models/providers/anthropic.py | 62 +- .../resources/models/providers/openai.py | 62 +- src/gradient/resources/regions.py | 14 +- tests/test_transform.py | 11 +- 59 files changed, 1834 insertions(+), 1818 deletions(-) diff --git a/README.md b/README.md index a7b92030..bb2b23df 100644 --- a/README.md +++ b/README.md @@ -96,7 +96,7 @@ print(agent_response.choices[0].message.content) While you can provide an `access_token`, `model_access_key` keyword argument, we recommend using [python-dotenv](https://pypi.org/project/python-dotenv/) -to add `DIGITALOCEAN_ACCESS_TOKEN="My API Key"`, `GRADIENT_MODEL_ACCESS_KEY="My INFERENCE Key"` to your `.env` file +to add `DIGITALOCEAN_ACCESS_TOKEN="My Access Token"`, `GRADIENT_MODEL_ACCESS_KEY="My Model Access Key"` to your `.env` file so that your keys are not stored in source control. ## Async usage @@ -545,4 +545,4 @@ See [the contributing documentation](./CONTRIBUTING.md). ## License -Licensed under the Apache License 2.0. See [LICENSE](./LICENSE) \ No newline at end of file +Licensed under the Apache License 2.0. See [LICENSE](./LICENSE) diff --git a/src/gradient/__init__.py b/src/gradient/__init__.py index c78eff30..a67cd2a7 100644 --- a/src/gradient/__init__.py +++ b/src/gradient/__init__.py @@ -3,7 +3,7 @@ import typing as _t from . import types -from ._types import NOT_GIVEN, Omit, NoneType, NotGiven, Transport, ProxiesTypes +from ._types import NOT_GIVEN, Omit, NoneType, NotGiven, Transport, ProxiesTypes, omit, not_given from ._utils import file_from_path from ._client import ( Client, @@ -48,7 +48,9 @@ "ProxiesTypes", "NotGiven", "NOT_GIVEN", + "not_given", "Omit", + "omit", "GradientError", "APIError", "APIStatusError", diff --git a/src/gradient/_base_client.py b/src/gradient/_base_client.py index 15fbd174..89146b71 100644 --- a/src/gradient/_base_client.py +++ b/src/gradient/_base_client.py @@ -42,7 +42,6 @@ from ._qs import Querystring from ._files import to_httpx_files, async_to_httpx_files from ._types import ( - NOT_GIVEN, Body, Omit, Query, @@ -57,6 +56,7 @@ RequestOptions, HttpxRequestFiles, ModelBuilderProtocol, + not_given, ) from ._utils import is_dict, is_list, asyncify, is_given, lru_cache, is_mapping from ._compat import PYDANTIC_V1, model_copy, model_dump @@ -145,9 +145,9 @@ def __init__( def __init__( self, *, - url: URL | NotGiven = NOT_GIVEN, - json: Body | NotGiven = NOT_GIVEN, - params: Query | NotGiven = NOT_GIVEN, + url: URL | NotGiven = not_given, + json: Body | NotGiven = not_given, + params: Query | NotGiven = not_given, ) -> None: self.url = url self.json = json @@ -599,7 +599,7 @@ def _maybe_override_cast_to(self, cast_to: type[ResponseT], options: FinalReques # we internally support defining a temporary header to override the # default `cast_to` type for use with `.with_raw_response` and `.with_streaming_response` # see _response.py for implementation details - override_cast_to = headers.pop(OVERRIDE_CAST_TO_HEADER, NOT_GIVEN) + override_cast_to = headers.pop(OVERRIDE_CAST_TO_HEADER, not_given) if is_given(override_cast_to): options.headers = headers return cast(Type[ResponseT], override_cast_to) @@ -832,7 +832,7 @@ def __init__( version: str, base_url: str | URL, max_retries: int = DEFAULT_MAX_RETRIES, - timeout: float | Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | Timeout | None | NotGiven = not_given, http_client: httpx.Client | None = None, custom_headers: Mapping[str, str] | None = None, custom_query: Mapping[str, object] | None = None, @@ -1367,7 +1367,7 @@ def __init__( base_url: str | URL, _strict_response_validation: bool, max_retries: int = DEFAULT_MAX_RETRIES, - timeout: float | Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | Timeout | None | NotGiven = not_given, http_client: httpx.AsyncClient | None = None, custom_headers: Mapping[str, str] | None = None, custom_query: Mapping[str, object] | None = None, @@ -1833,8 +1833,8 @@ def make_request_options( extra_query: Query | None = None, extra_body: Body | None = None, idempotency_key: str | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - post_parser: PostParser | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + post_parser: PostParser | NotGiven = not_given, ) -> RequestOptions: """Create a dict of type RequestOptions without keys of NotGiven values.""" options: RequestOptions = {} diff --git a/src/gradient/_client.py b/src/gradient/_client.py index 10ac8c99..f7723171 100644 --- a/src/gradient/_client.py +++ b/src/gradient/_client.py @@ -3,7 +3,7 @@ from __future__ import annotations import os -from typing import TYPE_CHECKING, Any, Union, Mapping +from typing import TYPE_CHECKING, Any, Mapping from typing_extensions import Self, override import httpx @@ -11,7 +11,6 @@ from . import _exceptions from ._qs import Querystring from ._types import ( - NOT_GIVEN, Omit, Headers, Timeout, @@ -19,6 +18,7 @@ Transport, ProxiesTypes, RequestOptions, + not_given, ) from ._utils import is_given, get_async_library from ._compat import cached_property @@ -86,7 +86,7 @@ def __init__( agent_endpoint: str | None = None, inference_endpoint: str | None = None, base_url: str | httpx.URL | None = None, - timeout: Union[float, Timeout, None, NotGiven] = NOT_GIVEN, + timeout: float | Timeout | None | NotGiven = not_given, max_retries: int = DEFAULT_MAX_RETRIES, default_headers: Mapping[str, str] | None = None, default_query: Mapping[str, object] | None = None, @@ -273,9 +273,9 @@ def copy( agent_endpoint: str | None = None, inference_endpoint: str | None = None, base_url: str | httpx.URL | None = None, - timeout: float | Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | Timeout | None | NotGiven = not_given, http_client: httpx.Client | None = None, - max_retries: int | NotGiven = NOT_GIVEN, + max_retries: int | NotGiven = not_given, default_headers: Mapping[str, str] | None = None, set_default_headers: Mapping[str, str] | None = None, default_query: Mapping[str, object] | None = None, @@ -392,7 +392,7 @@ def __init__( agent_endpoint: str | None = None, inference_endpoint: str | None = None, base_url: str | httpx.URL | None = None, - timeout: Union[float, Timeout, None, NotGiven] = NOT_GIVEN, + timeout: float | Timeout | None | NotGiven = not_given, max_retries: int = DEFAULT_MAX_RETRIES, default_headers: Mapping[str, str] | None = None, default_query: Mapping[str, object] | None = None, @@ -579,9 +579,9 @@ def copy( agent_access_key: str | None = None, inference_endpoint: str | None = None, base_url: str | httpx.URL | None = None, - timeout: float | Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | Timeout | None | NotGiven = not_given, http_client: httpx.AsyncClient | None = None, - max_retries: int | NotGiven = NOT_GIVEN, + max_retries: int | NotGiven = not_given, default_headers: Mapping[str, str] | None = None, set_default_headers: Mapping[str, str] | None = None, default_query: Mapping[str, object] | None = None, diff --git a/src/gradient/_qs.py b/src/gradient/_qs.py index 274320ca..ada6fd3f 100644 --- a/src/gradient/_qs.py +++ b/src/gradient/_qs.py @@ -4,7 +4,7 @@ from urllib.parse import parse_qs, urlencode from typing_extensions import Literal, get_args -from ._types import NOT_GIVEN, NotGiven, NotGivenOr +from ._types import NotGiven, not_given from ._utils import flatten _T = TypeVar("_T") @@ -41,8 +41,8 @@ def stringify( self, params: Params, *, - array_format: NotGivenOr[ArrayFormat] = NOT_GIVEN, - nested_format: NotGivenOr[NestedFormat] = NOT_GIVEN, + array_format: ArrayFormat | NotGiven = not_given, + nested_format: NestedFormat | NotGiven = not_given, ) -> str: return urlencode( self.stringify_items( @@ -56,8 +56,8 @@ def stringify_items( self, params: Params, *, - array_format: NotGivenOr[ArrayFormat] = NOT_GIVEN, - nested_format: NotGivenOr[NestedFormat] = NOT_GIVEN, + array_format: ArrayFormat | NotGiven = not_given, + nested_format: NestedFormat | NotGiven = not_given, ) -> list[tuple[str, str]]: opts = Options( qs=self, @@ -143,8 +143,8 @@ def __init__( self, qs: Querystring = _qs, *, - array_format: NotGivenOr[ArrayFormat] = NOT_GIVEN, - nested_format: NotGivenOr[NestedFormat] = NOT_GIVEN, + array_format: ArrayFormat | NotGiven = not_given, + nested_format: NestedFormat | NotGiven = not_given, ) -> None: self.array_format = qs.array_format if isinstance(array_format, NotGiven) else array_format self.nested_format = qs.nested_format if isinstance(nested_format, NotGiven) else nested_format diff --git a/src/gradient/_types.py b/src/gradient/_types.py index 32375713..11a40997 100644 --- a/src/gradient/_types.py +++ b/src/gradient/_types.py @@ -117,18 +117,21 @@ class RequestOptions(TypedDict, total=False): # Sentinel class used until PEP 0661 is accepted class NotGiven: """ - A sentinel singleton class used to distinguish omitted keyword arguments - from those passed in with the value None (which may have different behavior). + For parameters with a meaningful None value, we need to distinguish between + the user explicitly passing None, and the user not passing the parameter at + all. + + User code shouldn't need to use not_given directly. For example: ```py - def get(timeout: Union[int, NotGiven, None] = NotGiven()) -> Response: ... + def create(timeout: Timeout | None | NotGiven = not_given): ... - get(timeout=1) # 1s timeout - get(timeout=None) # No timeout - get() # Default timeout behavior, which may not be statically known at the method definition. + create(timeout=1) # 1s timeout + create(timeout=None) # No timeout + create() # Default timeout behavior ``` """ @@ -140,13 +143,14 @@ def __repr__(self) -> str: return "NOT_GIVEN" -NotGivenOr = Union[_T, NotGiven] +not_given = NotGiven() +# for backwards compatibility: NOT_GIVEN = NotGiven() class Omit: - """In certain situations you need to be able to represent a case where a default value has - to be explicitly removed and `None` is not an appropriate substitute, for example: + """ + To explicitly omit something from being sent in a request, use `omit`. ```py # as the default `Content-Type` header is `application/json` that will be sent @@ -156,8 +160,8 @@ class Omit: # to look something like: 'multipart/form-data; boundary=0d8382fcf5f8c3be01ca2e11002d2983' client.post(..., headers={"Content-Type": "multipart/form-data"}) - # instead you can remove the default `application/json` header by passing Omit - client.post(..., headers={"Content-Type": Omit()}) + # instead you can remove the default `application/json` header by passing omit + client.post(..., headers={"Content-Type": omit}) ``` """ @@ -165,6 +169,9 @@ def __bool__(self) -> Literal[False]: return False +omit = Omit() + + @runtime_checkable class ModelBuilderProtocol(Protocol): @classmethod diff --git a/src/gradient/_utils/_transform.py b/src/gradient/_utils/_transform.py index c19124f0..52075492 100644 --- a/src/gradient/_utils/_transform.py +++ b/src/gradient/_utils/_transform.py @@ -268,7 +268,7 @@ def _transform_typeddict( annotations = get_type_hints(expected_type, include_extras=True) for key, value in data.items(): if not is_given(value): - # we don't need to include `NotGiven` values here as they'll + # we don't need to include omitted values here as they'll # be stripped out before the request is sent anyway continue @@ -434,7 +434,7 @@ async def _async_transform_typeddict( annotations = get_type_hints(expected_type, include_extras=True) for key, value in data.items(): if not is_given(value): - # we don't need to include `NotGiven` values here as they'll + # we don't need to include omitted values here as they'll # be stripped out before the request is sent anyway continue diff --git a/src/gradient/_utils/_utils.py b/src/gradient/_utils/_utils.py index f0818595..50d59269 100644 --- a/src/gradient/_utils/_utils.py +++ b/src/gradient/_utils/_utils.py @@ -21,7 +21,7 @@ import sniffio -from .._types import NotGiven, FileTypes, NotGivenOr, HeadersLike +from .._types import Omit, NotGiven, FileTypes, HeadersLike _T = TypeVar("_T") _TupleT = TypeVar("_TupleT", bound=Tuple[object, ...]) @@ -63,7 +63,7 @@ def _extract_items( try: key = path[index] except IndexError: - if isinstance(obj, NotGiven): + if not is_given(obj): # no value was provided - we can safely ignore return [] @@ -126,8 +126,8 @@ def _extract_items( return [] -def is_given(obj: NotGivenOr[_T]) -> TypeGuard[_T]: - return not isinstance(obj, NotGiven) +def is_given(obj: _T | NotGiven | Omit) -> TypeGuard[_T]: + return not isinstance(obj, NotGiven) and not isinstance(obj, Omit) # Type safe methods for narrowing types with TypeVars. diff --git a/src/gradient/resources/agents/agents.py b/src/gradient/resources/agents/agents.py index 590b9a76..a4d32fca 100644 --- a/src/gradient/resources/agents/agents.py +++ b/src/gradient/resources/agents/agents.py @@ -21,7 +21,7 @@ agent_update_status_params, agent_retrieve_usage_params, ) -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven, SequenceNotStr +from ..._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given from ..._utils import maybe_transform, async_maybe_transform from .api_keys import ( APIKeysResource, @@ -180,22 +180,22 @@ def with_streaming_response(self) -> AgentsResourceWithStreamingResponse: def create( self, *, - anthropic_key_uuid: str | NotGiven = NOT_GIVEN, - description: str | NotGiven = NOT_GIVEN, - instruction: str | NotGiven = NOT_GIVEN, - knowledge_base_uuid: SequenceNotStr[str] | NotGiven = NOT_GIVEN, - model_uuid: str | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, - openai_key_uuid: str | NotGiven = NOT_GIVEN, - project_id: str | NotGiven = NOT_GIVEN, - region: str | NotGiven = NOT_GIVEN, - tags: SequenceNotStr[str] | NotGiven = NOT_GIVEN, + anthropic_key_uuid: str | Omit = omit, + description: str | Omit = omit, + instruction: str | Omit = omit, + knowledge_base_uuid: SequenceNotStr[str] | Omit = omit, + model_uuid: str | Omit = omit, + name: str | Omit = omit, + openai_key_uuid: str | Omit = omit, + project_id: str | Omit = omit, + region: str | Omit = omit, + tags: SequenceNotStr[str] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AgentCreateResponse: """To create a new agent, send a POST request to `/v2/gen-ai/agents`. @@ -268,7 +268,7 @@ def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AgentRetrieveResponse: """To retrieve details of an agent, GET request to `/v2/gen-ai/agents/{uuid}`. @@ -300,29 +300,29 @@ def update( self, path_uuid: str, *, - agent_log_insights_enabled: bool | NotGiven = NOT_GIVEN, - anthropic_key_uuid: str | NotGiven = NOT_GIVEN, - conversation_logs_enabled: bool | NotGiven = NOT_GIVEN, - description: str | NotGiven = NOT_GIVEN, - instruction: str | NotGiven = NOT_GIVEN, - k: int | NotGiven = NOT_GIVEN, - max_tokens: int | NotGiven = NOT_GIVEN, - model_uuid: str | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, - openai_key_uuid: str | NotGiven = NOT_GIVEN, - project_id: str | NotGiven = NOT_GIVEN, - provide_citations: bool | NotGiven = NOT_GIVEN, - retrieval_method: APIRetrievalMethod | NotGiven = NOT_GIVEN, - tags: SequenceNotStr[str] | NotGiven = NOT_GIVEN, - temperature: float | NotGiven = NOT_GIVEN, - top_p: float | NotGiven = NOT_GIVEN, - body_uuid: str | NotGiven = NOT_GIVEN, + agent_log_insights_enabled: bool | Omit = omit, + anthropic_key_uuid: str | Omit = omit, + conversation_logs_enabled: bool | Omit = omit, + description: str | Omit = omit, + instruction: str | Omit = omit, + k: int | Omit = omit, + max_tokens: int | Omit = omit, + model_uuid: str | Omit = omit, + name: str | Omit = omit, + openai_key_uuid: str | Omit = omit, + project_id: str | Omit = omit, + provide_citations: bool | Omit = omit, + retrieval_method: APIRetrievalMethod | Omit = omit, + tags: SequenceNotStr[str] | Omit = omit, + temperature: float | Omit = omit, + top_p: float | Omit = omit, + body_uuid: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AgentUpdateResponse: """To update an agent, send a PUT request to `/v2/gen-ai/agents/{uuid}`. @@ -418,15 +418,15 @@ def update( def list( self, *, - only_deployed: bool | NotGiven = NOT_GIVEN, - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, + only_deployed: bool | Omit = omit, + page: int | Omit = omit, + per_page: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AgentListResponse: """ To list all agents, send a GET request to `/v2/gen-ai/agents`. @@ -476,7 +476,7 @@ def delete( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AgentDeleteResponse: """ To delete an agent, send a DELETE request to `/v2/gen-ai/agents/{uuid}`. @@ -506,14 +506,14 @@ def retrieve_usage( self, uuid: str, *, - start: str | NotGiven = NOT_GIVEN, - stop: str | NotGiven = NOT_GIVEN, + start: str | Omit = omit, + stop: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AgentRetrieveUsageResponse: """ To get agent usage, send a GET request to `/v2/gen-ai/agents/{uuid}/usage`. @@ -559,14 +559,14 @@ def update_status( self, path_uuid: str, *, - body_uuid: str | NotGiven = NOT_GIVEN, - visibility: APIDeploymentVisibility | NotGiven = NOT_GIVEN, + body_uuid: str | Omit = omit, + visibility: APIDeploymentVisibility | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AgentUpdateStatusResponse: """Check whether an agent is public or private. @@ -676,22 +676,22 @@ def with_streaming_response(self) -> AsyncAgentsResourceWithStreamingResponse: async def create( self, *, - anthropic_key_uuid: str | NotGiven = NOT_GIVEN, - description: str | NotGiven = NOT_GIVEN, - instruction: str | NotGiven = NOT_GIVEN, - knowledge_base_uuid: SequenceNotStr[str] | NotGiven = NOT_GIVEN, - model_uuid: str | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, - openai_key_uuid: str | NotGiven = NOT_GIVEN, - project_id: str | NotGiven = NOT_GIVEN, - region: str | NotGiven = NOT_GIVEN, - tags: SequenceNotStr[str] | NotGiven = NOT_GIVEN, + anthropic_key_uuid: str | Omit = omit, + description: str | Omit = omit, + instruction: str | Omit = omit, + knowledge_base_uuid: SequenceNotStr[str] | Omit = omit, + model_uuid: str | Omit = omit, + name: str | Omit = omit, + openai_key_uuid: str | Omit = omit, + project_id: str | Omit = omit, + region: str | Omit = omit, + tags: SequenceNotStr[str] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AgentCreateResponse: """To create a new agent, send a POST request to `/v2/gen-ai/agents`. @@ -764,7 +764,7 @@ async def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AgentRetrieveResponse: """To retrieve details of an agent, GET request to `/v2/gen-ai/agents/{uuid}`. @@ -796,29 +796,29 @@ async def update( self, path_uuid: str, *, - agent_log_insights_enabled: bool | NotGiven = NOT_GIVEN, - anthropic_key_uuid: str | NotGiven = NOT_GIVEN, - conversation_logs_enabled: bool | NotGiven = NOT_GIVEN, - description: str | NotGiven = NOT_GIVEN, - instruction: str | NotGiven = NOT_GIVEN, - k: int | NotGiven = NOT_GIVEN, - max_tokens: int | NotGiven = NOT_GIVEN, - model_uuid: str | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, - openai_key_uuid: str | NotGiven = NOT_GIVEN, - project_id: str | NotGiven = NOT_GIVEN, - provide_citations: bool | NotGiven = NOT_GIVEN, - retrieval_method: APIRetrievalMethod | NotGiven = NOT_GIVEN, - tags: SequenceNotStr[str] | NotGiven = NOT_GIVEN, - temperature: float | NotGiven = NOT_GIVEN, - top_p: float | NotGiven = NOT_GIVEN, - body_uuid: str | NotGiven = NOT_GIVEN, + agent_log_insights_enabled: bool | Omit = omit, + anthropic_key_uuid: str | Omit = omit, + conversation_logs_enabled: bool | Omit = omit, + description: str | Omit = omit, + instruction: str | Omit = omit, + k: int | Omit = omit, + max_tokens: int | Omit = omit, + model_uuid: str | Omit = omit, + name: str | Omit = omit, + openai_key_uuid: str | Omit = omit, + project_id: str | Omit = omit, + provide_citations: bool | Omit = omit, + retrieval_method: APIRetrievalMethod | Omit = omit, + tags: SequenceNotStr[str] | Omit = omit, + temperature: float | Omit = omit, + top_p: float | Omit = omit, + body_uuid: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AgentUpdateResponse: """To update an agent, send a PUT request to `/v2/gen-ai/agents/{uuid}`. @@ -914,15 +914,15 @@ async def update( async def list( self, *, - only_deployed: bool | NotGiven = NOT_GIVEN, - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, + only_deployed: bool | Omit = omit, + page: int | Omit = omit, + per_page: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AgentListResponse: """ To list all agents, send a GET request to `/v2/gen-ai/agents`. @@ -972,7 +972,7 @@ async def delete( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AgentDeleteResponse: """ To delete an agent, send a DELETE request to `/v2/gen-ai/agents/{uuid}`. @@ -1002,14 +1002,14 @@ async def retrieve_usage( self, uuid: str, *, - start: str | NotGiven = NOT_GIVEN, - stop: str | NotGiven = NOT_GIVEN, + start: str | Omit = omit, + stop: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AgentRetrieveUsageResponse: """ To get agent usage, send a GET request to `/v2/gen-ai/agents/{uuid}/usage`. @@ -1055,14 +1055,14 @@ async def update_status( self, path_uuid: str, *, - body_uuid: str | NotGiven = NOT_GIVEN, - visibility: APIDeploymentVisibility | NotGiven = NOT_GIVEN, + body_uuid: str | Omit = omit, + visibility: APIDeploymentVisibility | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AgentUpdateStatusResponse: """Check whether an agent is public or private. diff --git a/src/gradient/resources/agents/api_keys.py b/src/gradient/resources/agents/api_keys.py index 7e9feb51..174ebf60 100644 --- a/src/gradient/resources/agents/api_keys.py +++ b/src/gradient/resources/agents/api_keys.py @@ -4,7 +4,7 @@ import httpx -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from ..._utils import maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource @@ -49,14 +49,14 @@ def create( self, path_agent_uuid: str, *, - body_agent_uuid: str | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, + body_agent_uuid: str | Omit = omit, + name: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> APIKeyCreateResponse: """ To create an agent API key, send a POST request to @@ -99,15 +99,15 @@ def update( path_api_key_uuid: str, *, path_agent_uuid: str, - body_agent_uuid: str | NotGiven = NOT_GIVEN, - body_api_key_uuid: str | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, + body_agent_uuid: str | Omit = omit, + body_api_key_uuid: str | Omit = omit, + name: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> APIKeyUpdateResponse: """ To update an agent API key, send a PUT request to @@ -154,14 +154,14 @@ def list( self, agent_uuid: str, *, - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, + page: int | Omit = omit, + per_page: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> APIKeyListResponse: """ To list all agent API keys, send a GET request to @@ -212,7 +212,7 @@ def delete( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> APIKeyDeleteResponse: """ To delete an API key for an agent, send a DELETE request to @@ -251,7 +251,7 @@ def regenerate( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> APIKeyRegenerateResponse: """ To regenerate an agent API key, send a PUT request to @@ -305,14 +305,14 @@ async def create( self, path_agent_uuid: str, *, - body_agent_uuid: str | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, + body_agent_uuid: str | Omit = omit, + name: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> APIKeyCreateResponse: """ To create an agent API key, send a POST request to @@ -355,15 +355,15 @@ async def update( path_api_key_uuid: str, *, path_agent_uuid: str, - body_agent_uuid: str | NotGiven = NOT_GIVEN, - body_api_key_uuid: str | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, + body_agent_uuid: str | Omit = omit, + body_api_key_uuid: str | Omit = omit, + name: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> APIKeyUpdateResponse: """ To update an agent API key, send a PUT request to @@ -410,14 +410,14 @@ async def list( self, agent_uuid: str, *, - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, + page: int | Omit = omit, + per_page: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> APIKeyListResponse: """ To list all agent API keys, send a GET request to @@ -468,7 +468,7 @@ async def delete( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> APIKeyDeleteResponse: """ To delete an API key for an agent, send a DELETE request to @@ -507,7 +507,7 @@ async def regenerate( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> APIKeyRegenerateResponse: """ To regenerate an agent API key, send a PUT request to diff --git a/src/gradient/resources/agents/chat/completions.py b/src/gradient/resources/agents/chat/completions.py index fb4523c1..374fdc16 100644 --- a/src/gradient/resources/agents/chat/completions.py +++ b/src/gradient/resources/agents/chat/completions.py @@ -7,7 +7,7 @@ import httpx -from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven, SequenceNotStr +from ...._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given from ...._utils import required_args, maybe_transform, async_maybe_transform from ...._compat import cached_property from ...._resource import SyncAPIResource, AsyncAPIResource @@ -52,29 +52,29 @@ def create( *, messages: Iterable[completion_create_params.Message], model: str, - frequency_penalty: Optional[float] | NotGiven = NOT_GIVEN, - logit_bias: Optional[Dict[str, int]] | NotGiven = NOT_GIVEN, - logprobs: Optional[bool] | NotGiven = NOT_GIVEN, - max_completion_tokens: Optional[int] | NotGiven = NOT_GIVEN, - max_tokens: Optional[int] | NotGiven = NOT_GIVEN, - metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN, - n: Optional[int] | NotGiven = NOT_GIVEN, - presence_penalty: Optional[float] | NotGiven = NOT_GIVEN, - stop: Union[Optional[str], SequenceNotStr[str], None] | NotGiven = NOT_GIVEN, - stream: Optional[Literal[False]] | NotGiven = NOT_GIVEN, - stream_options: (Optional[completion_create_params.StreamOptions] | NotGiven) = NOT_GIVEN, - temperature: Optional[float] | NotGiven = NOT_GIVEN, - tool_choice: completion_create_params.ToolChoice | NotGiven = NOT_GIVEN, - tools: Iterable[completion_create_params.Tool] | NotGiven = NOT_GIVEN, - top_logprobs: Optional[int] | NotGiven = NOT_GIVEN, - top_p: Optional[float] | NotGiven = NOT_GIVEN, - user: str | NotGiven = NOT_GIVEN, + frequency_penalty: Optional[float] | Omit = omit, + logit_bias: Optional[Dict[str, int]] | Omit = omit, + logprobs: Optional[bool] | Omit = omit, + max_completion_tokens: Optional[int] | Omit = omit, + max_tokens: Optional[int] | Omit = omit, + metadata: Optional[Dict[str, str]] | Omit = omit, + n: Optional[int] | Omit = omit, + presence_penalty: Optional[float] | Omit = omit, + stop: Union[Optional[str], SequenceNotStr[str], None] | Omit = omit, + stream: Optional[Literal[False]] | Omit = omit, + stream_options: Optional[completion_create_params.StreamOptions] | Omit = omit, + temperature: Optional[float] | Omit = omit, + tool_choice: completion_create_params.ToolChoice | Omit = omit, + tools: Iterable[completion_create_params.Tool] | Omit = omit, + top_logprobs: Optional[int] | Omit = omit, + top_p: Optional[float] | Omit = omit, + user: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> CompletionCreateResponse: """ Creates a model response for the given chat conversation. @@ -181,28 +181,28 @@ def create( messages: Iterable[completion_create_params.Message], model: str, stream: Literal[True], - frequency_penalty: Optional[float] | NotGiven = NOT_GIVEN, - logit_bias: Optional[Dict[str, int]] | NotGiven = NOT_GIVEN, - logprobs: Optional[bool] | NotGiven = NOT_GIVEN, - max_completion_tokens: Optional[int] | NotGiven = NOT_GIVEN, - max_tokens: Optional[int] | NotGiven = NOT_GIVEN, - metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN, - n: Optional[int] | NotGiven = NOT_GIVEN, - presence_penalty: Optional[float] | NotGiven = NOT_GIVEN, - stop: Union[Optional[str], SequenceNotStr[str], None] | NotGiven = NOT_GIVEN, - stream_options: Optional[completion_create_params.StreamOptions] | NotGiven = NOT_GIVEN, - temperature: Optional[float] | NotGiven = NOT_GIVEN, - tool_choice: completion_create_params.ToolChoice | NotGiven = NOT_GIVEN, - tools: Iterable[completion_create_params.Tool] | NotGiven = NOT_GIVEN, - top_logprobs: Optional[int] | NotGiven = NOT_GIVEN, - top_p: Optional[float] | NotGiven = NOT_GIVEN, - user: str | NotGiven = NOT_GIVEN, + frequency_penalty: Optional[float] | Omit = omit, + logit_bias: Optional[Dict[str, int]] | Omit = omit, + logprobs: Optional[bool] | Omit = omit, + max_completion_tokens: Optional[int] | Omit = omit, + max_tokens: Optional[int] | Omit = omit, + metadata: Optional[Dict[str, str]] | Omit = omit, + n: Optional[int] | Omit = omit, + presence_penalty: Optional[float] | Omit = omit, + stop: Union[Optional[str], SequenceNotStr[str], None] | Omit = omit, + stream_options: Optional[completion_create_params.StreamOptions] | Omit = omit, + temperature: Optional[float] | Omit = omit, + tool_choice: completion_create_params.ToolChoice | Omit = omit, + tools: Iterable[completion_create_params.Tool] | Omit = omit, + top_logprobs: Optional[int] | Omit = omit, + top_p: Optional[float] | Omit = omit, + user: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> Stream[ChatCompletionChunk]: """ Creates a model response for the given chat conversation. @@ -309,28 +309,28 @@ def create( messages: Iterable[completion_create_params.Message], model: str, stream: bool, - frequency_penalty: Optional[float] | NotGiven = NOT_GIVEN, - logit_bias: Optional[Dict[str, int]] | NotGiven = NOT_GIVEN, - logprobs: Optional[bool] | NotGiven = NOT_GIVEN, - max_completion_tokens: Optional[int] | NotGiven = NOT_GIVEN, - max_tokens: Optional[int] | NotGiven = NOT_GIVEN, - metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN, - n: Optional[int] | NotGiven = NOT_GIVEN, - presence_penalty: Optional[float] | NotGiven = NOT_GIVEN, - stop: Union[Optional[str], SequenceNotStr[str], None] | NotGiven = NOT_GIVEN, - stream_options: Optional[completion_create_params.StreamOptions] | NotGiven = NOT_GIVEN, - temperature: Optional[float] | NotGiven = NOT_GIVEN, - tool_choice: completion_create_params.ToolChoice | NotGiven = NOT_GIVEN, - tools: Iterable[completion_create_params.Tool] | NotGiven = NOT_GIVEN, - top_logprobs: Optional[int] | NotGiven = NOT_GIVEN, - top_p: Optional[float] | NotGiven = NOT_GIVEN, - user: str | NotGiven = NOT_GIVEN, + frequency_penalty: Optional[float] | Omit = omit, + logit_bias: Optional[Dict[str, int]] | Omit = omit, + logprobs: Optional[bool] | Omit = omit, + max_completion_tokens: Optional[int] | Omit = omit, + max_tokens: Optional[int] | Omit = omit, + metadata: Optional[Dict[str, str]] | Omit = omit, + n: Optional[int] | Omit = omit, + presence_penalty: Optional[float] | Omit = omit, + stop: Union[Optional[str], SequenceNotStr[str], None] | Omit = omit, + stream_options: Optional[completion_create_params.StreamOptions] | Omit = omit, + temperature: Optional[float] | Omit = omit, + tool_choice: completion_create_params.ToolChoice | Omit = omit, + tools: Iterable[completion_create_params.Tool] | Omit = omit, + top_logprobs: Optional[int] | Omit = omit, + top_p: Optional[float] | Omit = omit, + user: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> CompletionCreateResponse | Stream[ChatCompletionChunk]: """ Creates a model response for the given chat conversation. @@ -439,29 +439,29 @@ def create( *, messages: Iterable[completion_create_params.Message], model: str, - frequency_penalty: Optional[float] | NotGiven = NOT_GIVEN, - logit_bias: Optional[Dict[str, int]] | NotGiven = NOT_GIVEN, - logprobs: Optional[bool] | NotGiven = NOT_GIVEN, - max_completion_tokens: Optional[int] | NotGiven = NOT_GIVEN, - max_tokens: Optional[int] | NotGiven = NOT_GIVEN, - metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN, - n: Optional[int] | NotGiven = NOT_GIVEN, - presence_penalty: Optional[float] | NotGiven = NOT_GIVEN, - stop: Union[Optional[str], SequenceNotStr[str], None] | NotGiven = NOT_GIVEN, - stream: Optional[Literal[False]] | Literal[True] | NotGiven = NOT_GIVEN, - stream_options: (Optional[completion_create_params.StreamOptions] | NotGiven) = NOT_GIVEN, - temperature: Optional[float] | NotGiven = NOT_GIVEN, - tool_choice: completion_create_params.ToolChoice | NotGiven = NOT_GIVEN, - tools: Iterable[completion_create_params.Tool] | NotGiven = NOT_GIVEN, - top_logprobs: Optional[int] | NotGiven = NOT_GIVEN, - top_p: Optional[float] | NotGiven = NOT_GIVEN, - user: str | NotGiven = NOT_GIVEN, + frequency_penalty: Optional[float] | Omit = omit, + logit_bias: Optional[Dict[str, int]] | Omit = omit, + logprobs: Optional[bool] | Omit = omit, + max_completion_tokens: Optional[int] | Omit = omit, + max_tokens: Optional[int] | Omit = omit, + metadata: Optional[Dict[str, str]] | Omit = omit, + n: Optional[int] | Omit = omit, + presence_penalty: Optional[float] | Omit = omit, + stop: Union[Optional[str], SequenceNotStr[str], None] | Omit = omit, + stream: Optional[Literal[False]] | Literal[True] | Omit = omit, + stream_options: Optional[completion_create_params.StreamOptions] | Omit = omit, + temperature: Optional[float] | Omit = omit, + tool_choice: completion_create_params.ToolChoice | Omit = omit, + tools: Iterable[completion_create_params.Tool] | Omit = omit, + top_logprobs: Optional[int] | Omit = omit, + top_p: Optional[float] | Omit = omit, + user: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> CompletionCreateResponse | Stream[ChatCompletionChunk]: # This method requires an agent_access_key to be set via client argument or environment variable if not self._client.agent_access_key: @@ -541,29 +541,29 @@ async def create( *, messages: Iterable[completion_create_params.Message], model: str, - frequency_penalty: Optional[float] | NotGiven = NOT_GIVEN, - logit_bias: Optional[Dict[str, int]] | NotGiven = NOT_GIVEN, - logprobs: Optional[bool] | NotGiven = NOT_GIVEN, - max_completion_tokens: Optional[int] | NotGiven = NOT_GIVEN, - max_tokens: Optional[int] | NotGiven = NOT_GIVEN, - metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN, - n: Optional[int] | NotGiven = NOT_GIVEN, - presence_penalty: Optional[float] | NotGiven = NOT_GIVEN, - stop: Union[Optional[str], SequenceNotStr[str], None] | NotGiven = NOT_GIVEN, - stream: Optional[Literal[False]] | NotGiven = NOT_GIVEN, - stream_options: (Optional[completion_create_params.StreamOptions] | NotGiven) = NOT_GIVEN, - temperature: Optional[float] | NotGiven = NOT_GIVEN, - tool_choice: completion_create_params.ToolChoice | NotGiven = NOT_GIVEN, - tools: Iterable[completion_create_params.Tool] | NotGiven = NOT_GIVEN, - top_logprobs: Optional[int] | NotGiven = NOT_GIVEN, - top_p: Optional[float] | NotGiven = NOT_GIVEN, - user: str | NotGiven = NOT_GIVEN, + frequency_penalty: Optional[float] | Omit = omit, + logit_bias: Optional[Dict[str, int]] | Omit = omit, + logprobs: Optional[bool] | Omit = omit, + max_completion_tokens: Optional[int] | Omit = omit, + max_tokens: Optional[int] | Omit = omit, + metadata: Optional[Dict[str, str]] | Omit = omit, + n: Optional[int] | Omit = omit, + presence_penalty: Optional[float] | Omit = omit, + stop: Union[Optional[str], SequenceNotStr[str], None] | Omit = omit, + stream: Optional[Literal[False]] | Omit = omit, + stream_options: Optional[completion_create_params.StreamOptions] | Omit = omit, + temperature: Optional[float] | Omit = omit, + tool_choice: completion_create_params.ToolChoice | Omit = omit, + tools: Iterable[completion_create_params.Tool] | Omit = omit, + top_logprobs: Optional[int] | Omit = omit, + top_p: Optional[float] | Omit = omit, + user: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> CompletionCreateResponse: """ Creates a model response for the given chat conversation. @@ -670,28 +670,28 @@ async def create( messages: Iterable[completion_create_params.Message], model: str, stream: Literal[True], - frequency_penalty: Optional[float] | NotGiven = NOT_GIVEN, - logit_bias: Optional[Dict[str, int]] | NotGiven = NOT_GIVEN, - logprobs: Optional[bool] | NotGiven = NOT_GIVEN, - max_completion_tokens: Optional[int] | NotGiven = NOT_GIVEN, - max_tokens: Optional[int] | NotGiven = NOT_GIVEN, - metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN, - n: Optional[int] | NotGiven = NOT_GIVEN, - presence_penalty: Optional[float] | NotGiven = NOT_GIVEN, - stop: Union[Optional[str], SequenceNotStr[str], None] | NotGiven = NOT_GIVEN, - stream_options: Optional[completion_create_params.StreamOptions] | NotGiven = NOT_GIVEN, - temperature: Optional[float] | NotGiven = NOT_GIVEN, - tool_choice: completion_create_params.ToolChoice | NotGiven = NOT_GIVEN, - tools: Iterable[completion_create_params.Tool] | NotGiven = NOT_GIVEN, - top_logprobs: Optional[int] | NotGiven = NOT_GIVEN, - top_p: Optional[float] | NotGiven = NOT_GIVEN, - user: str | NotGiven = NOT_GIVEN, + frequency_penalty: Optional[float] | Omit = omit, + logit_bias: Optional[Dict[str, int]] | Omit = omit, + logprobs: Optional[bool] | Omit = omit, + max_completion_tokens: Optional[int] | Omit = omit, + max_tokens: Optional[int] | Omit = omit, + metadata: Optional[Dict[str, str]] | Omit = omit, + n: Optional[int] | Omit = omit, + presence_penalty: Optional[float] | Omit = omit, + stop: Union[Optional[str], SequenceNotStr[str], None] | Omit = omit, + stream_options: Optional[completion_create_params.StreamOptions] | Omit = omit, + temperature: Optional[float] | Omit = omit, + tool_choice: completion_create_params.ToolChoice | Omit = omit, + tools: Iterable[completion_create_params.Tool] | Omit = omit, + top_logprobs: Optional[int] | Omit = omit, + top_p: Optional[float] | Omit = omit, + user: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AsyncStream[ChatCompletionChunk]: """ Creates a model response for the given chat conversation. @@ -798,28 +798,28 @@ async def create( messages: Iterable[completion_create_params.Message], model: str, stream: bool, - frequency_penalty: Optional[float] | NotGiven = NOT_GIVEN, - logit_bias: Optional[Dict[str, int]] | NotGiven = NOT_GIVEN, - logprobs: Optional[bool] | NotGiven = NOT_GIVEN, - max_completion_tokens: Optional[int] | NotGiven = NOT_GIVEN, - max_tokens: Optional[int] | NotGiven = NOT_GIVEN, - metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN, - n: Optional[int] | NotGiven = NOT_GIVEN, - presence_penalty: Optional[float] | NotGiven = NOT_GIVEN, - stop: Union[Optional[str], SequenceNotStr[str], None] | NotGiven = NOT_GIVEN, - stream_options: Optional[completion_create_params.StreamOptions] | NotGiven = NOT_GIVEN, - temperature: Optional[float] | NotGiven = NOT_GIVEN, - tool_choice: completion_create_params.ToolChoice | NotGiven = NOT_GIVEN, - tools: Iterable[completion_create_params.Tool] | NotGiven = NOT_GIVEN, - top_logprobs: Optional[int] | NotGiven = NOT_GIVEN, - top_p: Optional[float] | NotGiven = NOT_GIVEN, - user: str | NotGiven = NOT_GIVEN, + frequency_penalty: Optional[float] | Omit = omit, + logit_bias: Optional[Dict[str, int]] | Omit = omit, + logprobs: Optional[bool] | Omit = omit, + max_completion_tokens: Optional[int] | Omit = omit, + max_tokens: Optional[int] | Omit = omit, + metadata: Optional[Dict[str, str]] | Omit = omit, + n: Optional[int] | Omit = omit, + presence_penalty: Optional[float] | Omit = omit, + stop: Union[Optional[str], SequenceNotStr[str], None] | Omit = omit, + stream_options: Optional[completion_create_params.StreamOptions] | Omit = omit, + temperature: Optional[float] | Omit = omit, + tool_choice: completion_create_params.ToolChoice | Omit = omit, + tools: Iterable[completion_create_params.Tool] | Omit = omit, + top_logprobs: Optional[int] | Omit = omit, + top_p: Optional[float] | Omit = omit, + user: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> CompletionCreateResponse | AsyncStream[ChatCompletionChunk]: """ Creates a model response for the given chat conversation. @@ -925,29 +925,29 @@ async def create( *, messages: Iterable[completion_create_params.Message], model: str, - frequency_penalty: Optional[float] | NotGiven = NOT_GIVEN, - logit_bias: Optional[Dict[str, int]] | NotGiven = NOT_GIVEN, - logprobs: Optional[bool] | NotGiven = NOT_GIVEN, - max_completion_tokens: Optional[int] | NotGiven = NOT_GIVEN, - max_tokens: Optional[int] | NotGiven = NOT_GIVEN, - metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN, - n: Optional[int] | NotGiven = NOT_GIVEN, - presence_penalty: Optional[float] | NotGiven = NOT_GIVEN, - stop: Union[Optional[str], SequenceNotStr[str], None] | NotGiven = NOT_GIVEN, - stream: Optional[Literal[False]] | Literal[True] | NotGiven = NOT_GIVEN, - stream_options: (Optional[completion_create_params.StreamOptions] | NotGiven) = NOT_GIVEN, - temperature: Optional[float] | NotGiven = NOT_GIVEN, - tool_choice: completion_create_params.ToolChoice | NotGiven = NOT_GIVEN, - tools: Iterable[completion_create_params.Tool] | NotGiven = NOT_GIVEN, - top_logprobs: Optional[int] | NotGiven = NOT_GIVEN, - top_p: Optional[float] | NotGiven = NOT_GIVEN, - user: str | NotGiven = NOT_GIVEN, + frequency_penalty: Optional[float] | Omit = omit, + logit_bias: Optional[Dict[str, int]] | Omit = omit, + logprobs: Optional[bool] | Omit = omit, + max_completion_tokens: Optional[int] | Omit = omit, + max_tokens: Optional[int] | Omit = omit, + metadata: Optional[Dict[str, str]] | Omit = omit, + n: Optional[int] | Omit = omit, + presence_penalty: Optional[float] | Omit = omit, + stop: Union[Optional[str], SequenceNotStr[str], None] | Omit = omit, + stream: Optional[Literal[False]] | Literal[True] | Omit = omit, + stream_options: Optional[completion_create_params.StreamOptions] | Omit = omit, + temperature: Optional[float] | Omit = omit, + tool_choice: completion_create_params.ToolChoice | Omit = omit, + tools: Iterable[completion_create_params.Tool] | Omit = omit, + top_logprobs: Optional[int] | Omit = omit, + top_p: Optional[float] | Omit = omit, + user: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> CompletionCreateResponse | AsyncStream[ChatCompletionChunk]: # This method requires an agent_access_key to be set via client argument or environment variable if not self._client.agent_access_key: diff --git a/src/gradient/resources/agents/evaluation_datasets.py b/src/gradient/resources/agents/evaluation_datasets.py index d8e960de..0f9631ba 100644 --- a/src/gradient/resources/agents/evaluation_datasets.py +++ b/src/gradient/resources/agents/evaluation_datasets.py @@ -6,7 +6,7 @@ import httpx -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from ..._utils import maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource @@ -53,14 +53,14 @@ def with_streaming_response(self) -> EvaluationDatasetsResourceWithStreamingResp def create( self, *, - file_upload_dataset: APIFileUploadDataSourceParam | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, + file_upload_dataset: APIFileUploadDataSourceParam | Omit = omit, + name: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> EvaluationDatasetCreateResponse: """ To create an evaluation dataset, send a POST request to @@ -99,13 +99,13 @@ def create( def create_file_upload_presigned_urls( self, *, - files: Iterable[evaluation_dataset_create_file_upload_presigned_urls_params.File] | NotGiven = NOT_GIVEN, + files: Iterable[evaluation_dataset_create_file_upload_presigned_urls_params.File] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> EvaluationDatasetCreateFileUploadPresignedURLsResponse: """ To create presigned URLs for evaluation dataset file upload, send a POST request @@ -160,14 +160,14 @@ def with_streaming_response(self) -> AsyncEvaluationDatasetsResourceWithStreamin async def create( self, *, - file_upload_dataset: APIFileUploadDataSourceParam | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, + file_upload_dataset: APIFileUploadDataSourceParam | Omit = omit, + name: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> EvaluationDatasetCreateResponse: """ To create an evaluation dataset, send a POST request to @@ -206,13 +206,13 @@ async def create( async def create_file_upload_presigned_urls( self, *, - files: Iterable[evaluation_dataset_create_file_upload_presigned_urls_params.File] | NotGiven = NOT_GIVEN, + files: Iterable[evaluation_dataset_create_file_upload_presigned_urls_params.File] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> EvaluationDatasetCreateFileUploadPresignedURLsResponse: """ To create presigned URLs for evaluation dataset file upload, send a POST request diff --git a/src/gradient/resources/agents/evaluation_metrics/anthropic/keys.py b/src/gradient/resources/agents/evaluation_metrics/anthropic/keys.py index 6111bf6f..e015bf5c 100644 --- a/src/gradient/resources/agents/evaluation_metrics/anthropic/keys.py +++ b/src/gradient/resources/agents/evaluation_metrics/anthropic/keys.py @@ -4,7 +4,7 @@ import httpx -from ....._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ....._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from ....._utils import maybe_transform, async_maybe_transform from ....._compat import cached_property from ....._resource import SyncAPIResource, AsyncAPIResource @@ -54,14 +54,14 @@ def with_streaming_response(self) -> KeysResourceWithStreamingResponse: def create( self, *, - api_key: str | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, + api_key: str | Omit = omit, + name: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> KeyCreateResponse: """ To create an Anthropic API key, send a POST request to @@ -106,7 +106,7 @@ def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> KeyRetrieveResponse: """ To retrieve details of an Anthropic API key, send a GET request to @@ -137,15 +137,15 @@ def update( self, path_api_key_uuid: str, *, - api_key: str | NotGiven = NOT_GIVEN, - body_api_key_uuid: str | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, + api_key: str | Omit = omit, + body_api_key_uuid: str | Omit = omit, + name: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> KeyUpdateResponse: """ To update an Anthropic API key, send a PUT request to @@ -189,14 +189,14 @@ def update( def list( self, *, - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, + page: int | Omit = omit, + per_page: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> KeyListResponse: """ To list all Anthropic API keys, send a GET request to @@ -244,7 +244,7 @@ def delete( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> KeyDeleteResponse: """ To delete an Anthropic API key, send a DELETE request to @@ -275,14 +275,14 @@ def list_agents( self, uuid: str, *, - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, + page: int | Omit = omit, + per_page: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> KeyListAgentsResponse: """ List Agents by Anthropic Key. @@ -346,14 +346,14 @@ def with_streaming_response(self) -> AsyncKeysResourceWithStreamingResponse: async def create( self, *, - api_key: str | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, + api_key: str | Omit = omit, + name: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> KeyCreateResponse: """ To create an Anthropic API key, send a POST request to @@ -398,7 +398,7 @@ async def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> KeyRetrieveResponse: """ To retrieve details of an Anthropic API key, send a GET request to @@ -429,15 +429,15 @@ async def update( self, path_api_key_uuid: str, *, - api_key: str | NotGiven = NOT_GIVEN, - body_api_key_uuid: str | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, + api_key: str | Omit = omit, + body_api_key_uuid: str | Omit = omit, + name: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> KeyUpdateResponse: """ To update an Anthropic API key, send a PUT request to @@ -481,14 +481,14 @@ async def update( async def list( self, *, - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, + page: int | Omit = omit, + per_page: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> KeyListResponse: """ To list all Anthropic API keys, send a GET request to @@ -536,7 +536,7 @@ async def delete( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> KeyDeleteResponse: """ To delete an Anthropic API key, send a DELETE request to @@ -567,14 +567,14 @@ async def list_agents( self, uuid: str, *, - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, + page: int | Omit = omit, + per_page: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> KeyListAgentsResponse: """ List Agents by Anthropic Key. diff --git a/src/gradient/resources/agents/evaluation_metrics/evaluation_metrics.py b/src/gradient/resources/agents/evaluation_metrics/evaluation_metrics.py index b9e1386b..43c1aa9b 100644 --- a/src/gradient/resources/agents/evaluation_metrics/evaluation_metrics.py +++ b/src/gradient/resources/agents/evaluation_metrics/evaluation_metrics.py @@ -12,7 +12,7 @@ ModelsResourceWithStreamingResponse, AsyncModelsResourceWithStreamingResponse, ) -from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ...._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from ...._utils import maybe_transform, async_maybe_transform from ...._compat import cached_property from ...._resource import SyncAPIResource, AsyncAPIResource @@ -110,7 +110,7 @@ def list( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> EvaluationMetricListResponse: """ To list all evaluation metrics, send a GET request to @@ -129,14 +129,14 @@ def list( def list_regions( self, *, - serves_batch: bool | NotGiven = NOT_GIVEN, - serves_inference: bool | NotGiven = NOT_GIVEN, + serves_batch: bool | Omit = omit, + serves_inference: bool | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> EvaluationMetricListRegionsResponse: """ To list all datacenter regions, send a GET request to `/v2/gen-ai/regions`. @@ -223,7 +223,7 @@ async def list( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> EvaluationMetricListResponse: """ To list all evaluation metrics, send a GET request to @@ -242,14 +242,14 @@ async def list( async def list_regions( self, *, - serves_batch: bool | NotGiven = NOT_GIVEN, - serves_inference: bool | NotGiven = NOT_GIVEN, + serves_batch: bool | Omit = omit, + serves_inference: bool | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> EvaluationMetricListRegionsResponse: """ To list all datacenter regions, send a GET request to `/v2/gen-ai/regions`. diff --git a/src/gradient/resources/agents/evaluation_metrics/models.py b/src/gradient/resources/agents/evaluation_metrics/models.py index 1902a4f0..7728e662 100644 --- a/src/gradient/resources/agents/evaluation_metrics/models.py +++ b/src/gradient/resources/agents/evaluation_metrics/models.py @@ -7,7 +7,7 @@ import httpx -from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ...._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from ...._utils import maybe_transform, async_maybe_transform from ...._compat import cached_property from ...._resource import SyncAPIResource, AsyncAPIResource @@ -47,9 +47,9 @@ def with_streaming_response(self) -> ModelsResourceWithStreamingResponse: def list( self, *, - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, - public_only: bool | NotGiven = NOT_GIVEN, + page: int | Omit = omit, + per_page: int | Omit = omit, + public_only: bool | Omit = omit, usecases: List[ Literal[ "MODEL_USECASE_UNKNOWN", @@ -61,13 +61,13 @@ def list( "MODEL_USECASE_SERVERLESS", ] ] - | NotGiven = NOT_GIVEN, + | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ModelListResponse: """ To list all models, send a GET request to `/v2/gen-ai/models`. @@ -144,9 +144,9 @@ def with_streaming_response(self) -> AsyncModelsResourceWithStreamingResponse: async def list( self, *, - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, - public_only: bool | NotGiven = NOT_GIVEN, + page: int | Omit = omit, + per_page: int | Omit = omit, + public_only: bool | Omit = omit, usecases: List[ Literal[ "MODEL_USECASE_UNKNOWN", @@ -158,13 +158,13 @@ async def list( "MODEL_USECASE_SERVERLESS", ] ] - | NotGiven = NOT_GIVEN, + | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ModelListResponse: """ To list all models, send a GET request to `/v2/gen-ai/models`. diff --git a/src/gradient/resources/agents/evaluation_metrics/oauth2/dropbox.py b/src/gradient/resources/agents/evaluation_metrics/oauth2/dropbox.py index caa7d0d3..256040ba 100644 --- a/src/gradient/resources/agents/evaluation_metrics/oauth2/dropbox.py +++ b/src/gradient/resources/agents/evaluation_metrics/oauth2/dropbox.py @@ -4,7 +4,7 @@ import httpx -from ....._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ....._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from ....._utils import maybe_transform, async_maybe_transform from ....._compat import cached_property from ....._resource import SyncAPIResource, AsyncAPIResource @@ -44,14 +44,14 @@ def with_streaming_response(self) -> DropboxResourceWithStreamingResponse: def create_tokens( self, *, - code: str | NotGiven = NOT_GIVEN, - redirect_url: str | NotGiven = NOT_GIVEN, + code: str | Omit = omit, + redirect_url: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> DropboxCreateTokensResponse: """ To obtain the refresh token, needed for creation of data sources, send a GET @@ -112,14 +112,14 @@ def with_streaming_response(self) -> AsyncDropboxResourceWithStreamingResponse: async def create_tokens( self, *, - code: str | NotGiven = NOT_GIVEN, - redirect_url: str | NotGiven = NOT_GIVEN, + code: str | Omit = omit, + redirect_url: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> DropboxCreateTokensResponse: """ To obtain the refresh token, needed for creation of data sources, send a GET diff --git a/src/gradient/resources/agents/evaluation_metrics/oauth2/oauth2.py b/src/gradient/resources/agents/evaluation_metrics/oauth2/oauth2.py index 8063ce5a..335e58d7 100644 --- a/src/gradient/resources/agents/evaluation_metrics/oauth2/oauth2.py +++ b/src/gradient/resources/agents/evaluation_metrics/oauth2/oauth2.py @@ -12,7 +12,7 @@ DropboxResourceWithStreamingResponse, AsyncDropboxResourceWithStreamingResponse, ) -from ....._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ....._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from ....._utils import maybe_transform, async_maybe_transform from ....._compat import cached_property from ....._resource import SyncAPIResource, AsyncAPIResource @@ -56,14 +56,14 @@ def with_streaming_response(self) -> Oauth2ResourceWithStreamingResponse: def generate_url( self, *, - redirect_url: str | NotGiven = NOT_GIVEN, - type: str | NotGiven = NOT_GIVEN, + redirect_url: str | Omit = omit, + type: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> Oauth2GenerateURLResponse: """ To generate an Oauth2-URL for use with your localhost, send a GET request to @@ -130,14 +130,14 @@ def with_streaming_response(self) -> AsyncOauth2ResourceWithStreamingResponse: async def generate_url( self, *, - redirect_url: str | NotGiven = NOT_GIVEN, - type: str | NotGiven = NOT_GIVEN, + redirect_url: str | Omit = omit, + type: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> Oauth2GenerateURLResponse: """ To generate an Oauth2-URL for use with your localhost, send a GET request to diff --git a/src/gradient/resources/agents/evaluation_metrics/openai/keys.py b/src/gradient/resources/agents/evaluation_metrics/openai/keys.py index 00131691..9ab5cbad 100644 --- a/src/gradient/resources/agents/evaluation_metrics/openai/keys.py +++ b/src/gradient/resources/agents/evaluation_metrics/openai/keys.py @@ -4,7 +4,7 @@ import httpx -from ....._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ....._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from ....._utils import maybe_transform, async_maybe_transform from ....._compat import cached_property from ....._resource import SyncAPIResource, AsyncAPIResource @@ -54,14 +54,14 @@ def with_streaming_response(self) -> KeysResourceWithStreamingResponse: def create( self, *, - api_key: str | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, + api_key: str | Omit = omit, + name: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> KeyCreateResponse: """ To create an OpenAI API key, send a POST request to `/v2/gen-ai/openai/keys`. @@ -105,7 +105,7 @@ def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> KeyRetrieveResponse: """ To retrieve details of an OpenAI API key, send a GET request to @@ -136,15 +136,15 @@ def update( self, path_api_key_uuid: str, *, - api_key: str | NotGiven = NOT_GIVEN, - body_api_key_uuid: str | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, + api_key: str | Omit = omit, + body_api_key_uuid: str | Omit = omit, + name: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> KeyUpdateResponse: """ To update an OpenAI API key, send a PUT request to @@ -188,14 +188,14 @@ def update( def list( self, *, - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, + page: int | Omit = omit, + per_page: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> KeyListResponse: """ To list all OpenAI API keys, send a GET request to `/v2/gen-ai/openai/keys`. @@ -242,7 +242,7 @@ def delete( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> KeyDeleteResponse: """ To delete an OpenAI API key, send a DELETE request to @@ -273,14 +273,14 @@ def list_agents( self, uuid: str, *, - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, + page: int | Omit = omit, + per_page: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> KeyListAgentsResponse: """ List Agents by OpenAI Key. @@ -344,14 +344,14 @@ def with_streaming_response(self) -> AsyncKeysResourceWithStreamingResponse: async def create( self, *, - api_key: str | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, + api_key: str | Omit = omit, + name: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> KeyCreateResponse: """ To create an OpenAI API key, send a POST request to `/v2/gen-ai/openai/keys`. @@ -395,7 +395,7 @@ async def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> KeyRetrieveResponse: """ To retrieve details of an OpenAI API key, send a GET request to @@ -426,15 +426,15 @@ async def update( self, path_api_key_uuid: str, *, - api_key: str | NotGiven = NOT_GIVEN, - body_api_key_uuid: str | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, + api_key: str | Omit = omit, + body_api_key_uuid: str | Omit = omit, + name: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> KeyUpdateResponse: """ To update an OpenAI API key, send a PUT request to @@ -478,14 +478,14 @@ async def update( async def list( self, *, - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, + page: int | Omit = omit, + per_page: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> KeyListResponse: """ To list all OpenAI API keys, send a GET request to `/v2/gen-ai/openai/keys`. @@ -532,7 +532,7 @@ async def delete( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> KeyDeleteResponse: """ To delete an OpenAI API key, send a DELETE request to @@ -563,14 +563,14 @@ async def list_agents( self, uuid: str, *, - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, + page: int | Omit = omit, + per_page: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> KeyListAgentsResponse: """ List Agents by OpenAI Key. diff --git a/src/gradient/resources/agents/evaluation_metrics/workspaces/agents.py b/src/gradient/resources/agents/evaluation_metrics/workspaces/agents.py index 408396b1..7f9a766a 100644 --- a/src/gradient/resources/agents/evaluation_metrics/workspaces/agents.py +++ b/src/gradient/resources/agents/evaluation_metrics/workspaces/agents.py @@ -4,7 +4,7 @@ import httpx -from ....._types import NOT_GIVEN, Body, Query, Headers, NotGiven, SequenceNotStr +from ....._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given from ....._utils import maybe_transform, async_maybe_transform from ....._compat import cached_property from ....._resource import SyncAPIResource, AsyncAPIResource @@ -46,15 +46,15 @@ def list( self, workspace_uuid: str, *, - only_deployed: bool | NotGiven = NOT_GIVEN, - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, + only_deployed: bool | Omit = omit, + page: int | Omit = omit, + per_page: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AgentListResponse: """ To list all agents by a Workspace, send a GET request to @@ -102,14 +102,14 @@ def move( self, path_workspace_uuid: str, *, - agent_uuids: SequenceNotStr[str] | NotGiven = NOT_GIVEN, - body_workspace_uuid: str | NotGiven = NOT_GIVEN, + agent_uuids: SequenceNotStr[str] | Omit = omit, + body_workspace_uuid: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AgentMoveResponse: """ To move all listed agents a given workspace, send a PUT request to @@ -174,15 +174,15 @@ async def list( self, workspace_uuid: str, *, - only_deployed: bool | NotGiven = NOT_GIVEN, - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, + only_deployed: bool | Omit = omit, + page: int | Omit = omit, + per_page: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AgentListResponse: """ To list all agents by a Workspace, send a GET request to @@ -230,14 +230,14 @@ async def move( self, path_workspace_uuid: str, *, - agent_uuids: SequenceNotStr[str] | NotGiven = NOT_GIVEN, - body_workspace_uuid: str | NotGiven = NOT_GIVEN, + agent_uuids: SequenceNotStr[str] | Omit = omit, + body_workspace_uuid: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AgentMoveResponse: """ To move all listed agents a given workspace, send a PUT request to diff --git a/src/gradient/resources/agents/evaluation_metrics/workspaces/workspaces.py b/src/gradient/resources/agents/evaluation_metrics/workspaces/workspaces.py index e6f610ef..73539bbd 100644 --- a/src/gradient/resources/agents/evaluation_metrics/workspaces/workspaces.py +++ b/src/gradient/resources/agents/evaluation_metrics/workspaces/workspaces.py @@ -12,7 +12,7 @@ AgentsResourceWithStreamingResponse, AsyncAgentsResourceWithStreamingResponse, ) -from ....._types import NOT_GIVEN, Body, Query, Headers, NotGiven, SequenceNotStr +from ....._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given from ....._utils import maybe_transform, async_maybe_transform from ....._compat import cached_property from ....._resource import SyncAPIResource, AsyncAPIResource @@ -63,15 +63,15 @@ def with_streaming_response(self) -> WorkspacesResourceWithStreamingResponse: def create( self, *, - agent_uuids: SequenceNotStr[str] | NotGiven = NOT_GIVEN, - description: str | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, + agent_uuids: SequenceNotStr[str] | Omit = omit, + description: str | Omit = omit, + name: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> WorkspaceCreateResponse: """To create a new workspace, send a POST request to `/v2/gen-ai/workspaces`. @@ -120,7 +120,7 @@ def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> WorkspaceRetrieveResponse: """ To retrieve details of a workspace, GET request to @@ -152,15 +152,15 @@ def update( self, path_workspace_uuid: str, *, - description: str | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, - body_workspace_uuid: str | NotGiven = NOT_GIVEN, + description: str | Omit = omit, + name: str | Omit = omit, + body_workspace_uuid: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> WorkspaceUpdateResponse: """ To update a workspace, send a PUT request to @@ -212,7 +212,7 @@ def list( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> WorkspaceListResponse: """To list all workspaces, send a GET request to `/v2/gen-ai/workspaces`.""" return self._get( @@ -234,7 +234,7 @@ def delete( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> WorkspaceDeleteResponse: """ To delete a workspace, send a DELETE request to @@ -270,7 +270,7 @@ def list_evaluation_test_cases( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> WorkspaceListEvaluationTestCasesResponse: """ To list all evaluation test cases by a workspace, send a GET request to @@ -325,15 +325,15 @@ def with_streaming_response(self) -> AsyncWorkspacesResourceWithStreamingRespons async def create( self, *, - agent_uuids: SequenceNotStr[str] | NotGiven = NOT_GIVEN, - description: str | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, + agent_uuids: SequenceNotStr[str] | Omit = omit, + description: str | Omit = omit, + name: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> WorkspaceCreateResponse: """To create a new workspace, send a POST request to `/v2/gen-ai/workspaces`. @@ -382,7 +382,7 @@ async def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> WorkspaceRetrieveResponse: """ To retrieve details of a workspace, GET request to @@ -414,15 +414,15 @@ async def update( self, path_workspace_uuid: str, *, - description: str | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, - body_workspace_uuid: str | NotGiven = NOT_GIVEN, + description: str | Omit = omit, + name: str | Omit = omit, + body_workspace_uuid: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> WorkspaceUpdateResponse: """ To update a workspace, send a PUT request to @@ -474,7 +474,7 @@ async def list( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> WorkspaceListResponse: """To list all workspaces, send a GET request to `/v2/gen-ai/workspaces`.""" return await self._get( @@ -496,7 +496,7 @@ async def delete( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> WorkspaceDeleteResponse: """ To delete a workspace, send a DELETE request to @@ -532,7 +532,7 @@ async def list_evaluation_test_cases( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> WorkspaceListEvaluationTestCasesResponse: """ To list all evaluation test cases by a workspace, send a GET request to diff --git a/src/gradient/resources/agents/evaluation_runs.py b/src/gradient/resources/agents/evaluation_runs.py index e00c9eb3..8506b00f 100644 --- a/src/gradient/resources/agents/evaluation_runs.py +++ b/src/gradient/resources/agents/evaluation_runs.py @@ -4,7 +4,7 @@ import httpx -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven, SequenceNotStr +from ..._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given from ..._utils import maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource @@ -47,15 +47,15 @@ def with_streaming_response(self) -> EvaluationRunsResourceWithStreamingResponse def create( self, *, - agent_uuids: SequenceNotStr[str] | NotGiven = NOT_GIVEN, - run_name: str | NotGiven = NOT_GIVEN, - test_case_uuid: str | NotGiven = NOT_GIVEN, + agent_uuids: SequenceNotStr[str] | Omit = omit, + run_name: str | Omit = omit, + test_case_uuid: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> EvaluationRunCreateResponse: """ To run an evaluation test case, send a POST request to @@ -103,7 +103,7 @@ def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> EvaluationRunRetrieveResponse: """ To retrive information about an existing evaluation run, send a GET request to @@ -136,14 +136,14 @@ def list_results( self, evaluation_run_uuid: str, *, - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, + page: int | Omit = omit, + per_page: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> EvaluationRunListResultsResponse: """ To retrieve results of an evaluation run, send a GET request to @@ -196,7 +196,7 @@ def retrieve_results( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> EvaluationRunRetrieveResultsResponse: """ To retrieve results of an evaluation run, send a GET request to @@ -249,15 +249,15 @@ def with_streaming_response(self) -> AsyncEvaluationRunsResourceWithStreamingRes async def create( self, *, - agent_uuids: SequenceNotStr[str] | NotGiven = NOT_GIVEN, - run_name: str | NotGiven = NOT_GIVEN, - test_case_uuid: str | NotGiven = NOT_GIVEN, + agent_uuids: SequenceNotStr[str] | Omit = omit, + run_name: str | Omit = omit, + test_case_uuid: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> EvaluationRunCreateResponse: """ To run an evaluation test case, send a POST request to @@ -305,7 +305,7 @@ async def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> EvaluationRunRetrieveResponse: """ To retrive information about an existing evaluation run, send a GET request to @@ -338,14 +338,14 @@ async def list_results( self, evaluation_run_uuid: str, *, - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, + page: int | Omit = omit, + per_page: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> EvaluationRunListResultsResponse: """ To retrieve results of an evaluation run, send a GET request to @@ -398,7 +398,7 @@ async def retrieve_results( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> EvaluationRunRetrieveResultsResponse: """ To retrieve results of an evaluation run, send a GET request to diff --git a/src/gradient/resources/agents/evaluation_test_cases.py b/src/gradient/resources/agents/evaluation_test_cases.py index 07f0a251..d53b8c26 100644 --- a/src/gradient/resources/agents/evaluation_test_cases.py +++ b/src/gradient/resources/agents/evaluation_test_cases.py @@ -4,7 +4,7 @@ import httpx -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven, SequenceNotStr +from ..._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given from ..._utils import maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource @@ -56,18 +56,18 @@ def with_streaming_response(self) -> EvaluationTestCasesResourceWithStreamingRes def create( self, *, - dataset_uuid: str | NotGiven = NOT_GIVEN, - description: str | NotGiven = NOT_GIVEN, - metrics: SequenceNotStr[str] | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, - star_metric: APIStarMetricParam | NotGiven = NOT_GIVEN, - workspace_uuid: str | NotGiven = NOT_GIVEN, + dataset_uuid: str | Omit = omit, + description: str | Omit = omit, + metrics: SequenceNotStr[str] | Omit = omit, + name: str | Omit = omit, + star_metric: APIStarMetricParam | Omit = omit, + workspace_uuid: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> EvaluationTestCaseCreateResponse: """ To create an evaluation test-case send a POST request to @@ -117,13 +117,13 @@ def retrieve( self, test_case_uuid: str, *, - evaluation_test_case_version: int | NotGiven = NOT_GIVEN, + evaluation_test_case_version: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> EvaluationTestCaseRetrieveResponse: """ To retrive information about an existing evaluation test case, send a GET @@ -163,18 +163,18 @@ def update( self, path_test_case_uuid: str, *, - dataset_uuid: str | NotGiven = NOT_GIVEN, - description: str | NotGiven = NOT_GIVEN, - metrics: evaluation_test_case_update_params.Metrics | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, - star_metric: APIStarMetricParam | NotGiven = NOT_GIVEN, - body_test_case_uuid: str | NotGiven = NOT_GIVEN, + dataset_uuid: str | Omit = omit, + description: str | Omit = omit, + metrics: evaluation_test_case_update_params.Metrics | Omit = omit, + name: str | Omit = omit, + star_metric: APIStarMetricParam | Omit = omit, + body_test_case_uuid: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> EvaluationTestCaseUpdateResponse: """ To update an evaluation test-case send a PUT request to @@ -230,7 +230,7 @@ def list( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> EvaluationTestCaseListResponse: """ To list all evaluation test cases, send a GET request to @@ -250,13 +250,13 @@ def list_evaluation_runs( self, evaluation_test_case_uuid: str, *, - evaluation_test_case_version: int | NotGiven = NOT_GIVEN, + evaluation_test_case_version: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> EvaluationTestCaseListEvaluationRunsResponse: """ To list all evaluation runs by test case, send a GET request to @@ -318,18 +318,18 @@ def with_streaming_response(self) -> AsyncEvaluationTestCasesResourceWithStreami async def create( self, *, - dataset_uuid: str | NotGiven = NOT_GIVEN, - description: str | NotGiven = NOT_GIVEN, - metrics: SequenceNotStr[str] | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, - star_metric: APIStarMetricParam | NotGiven = NOT_GIVEN, - workspace_uuid: str | NotGiven = NOT_GIVEN, + dataset_uuid: str | Omit = omit, + description: str | Omit = omit, + metrics: SequenceNotStr[str] | Omit = omit, + name: str | Omit = omit, + star_metric: APIStarMetricParam | Omit = omit, + workspace_uuid: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> EvaluationTestCaseCreateResponse: """ To create an evaluation test-case send a POST request to @@ -379,13 +379,13 @@ async def retrieve( self, test_case_uuid: str, *, - evaluation_test_case_version: int | NotGiven = NOT_GIVEN, + evaluation_test_case_version: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> EvaluationTestCaseRetrieveResponse: """ To retrive information about an existing evaluation test case, send a GET @@ -425,18 +425,18 @@ async def update( self, path_test_case_uuid: str, *, - dataset_uuid: str | NotGiven = NOT_GIVEN, - description: str | NotGiven = NOT_GIVEN, - metrics: evaluation_test_case_update_params.Metrics | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, - star_metric: APIStarMetricParam | NotGiven = NOT_GIVEN, - body_test_case_uuid: str | NotGiven = NOT_GIVEN, + dataset_uuid: str | Omit = omit, + description: str | Omit = omit, + metrics: evaluation_test_case_update_params.Metrics | Omit = omit, + name: str | Omit = omit, + star_metric: APIStarMetricParam | Omit = omit, + body_test_case_uuid: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> EvaluationTestCaseUpdateResponse: """ To update an evaluation test-case send a PUT request to @@ -492,7 +492,7 @@ async def list( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> EvaluationTestCaseListResponse: """ To list all evaluation test cases, send a GET request to @@ -512,13 +512,13 @@ async def list_evaluation_runs( self, evaluation_test_case_uuid: str, *, - evaluation_test_case_version: int | NotGiven = NOT_GIVEN, + evaluation_test_case_version: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> EvaluationTestCaseListEvaluationRunsResponse: """ To list all evaluation runs by test case, send a GET request to diff --git a/src/gradient/resources/agents/functions.py b/src/gradient/resources/agents/functions.py index 7986f750..3d995d24 100644 --- a/src/gradient/resources/agents/functions.py +++ b/src/gradient/resources/agents/functions.py @@ -4,7 +4,7 @@ import httpx -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from ..._utils import maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource @@ -47,19 +47,19 @@ def create( self, path_agent_uuid: str, *, - body_agent_uuid: str | NotGiven = NOT_GIVEN, - description: str | NotGiven = NOT_GIVEN, - faas_name: str | NotGiven = NOT_GIVEN, - faas_namespace: str | NotGiven = NOT_GIVEN, - function_name: str | NotGiven = NOT_GIVEN, - input_schema: object | NotGiven = NOT_GIVEN, - output_schema: object | NotGiven = NOT_GIVEN, + body_agent_uuid: str | Omit = omit, + description: str | Omit = omit, + faas_name: str | Omit = omit, + faas_namespace: str | Omit = omit, + function_name: str | Omit = omit, + input_schema: object | Omit = omit, + output_schema: object | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> FunctionCreateResponse: """ To create a function route for an agent, send a POST request to @@ -117,20 +117,20 @@ def update( path_function_uuid: str, *, path_agent_uuid: str, - body_agent_uuid: str | NotGiven = NOT_GIVEN, - description: str | NotGiven = NOT_GIVEN, - faas_name: str | NotGiven = NOT_GIVEN, - faas_namespace: str | NotGiven = NOT_GIVEN, - function_name: str | NotGiven = NOT_GIVEN, - body_function_uuid: str | NotGiven = NOT_GIVEN, - input_schema: object | NotGiven = NOT_GIVEN, - output_schema: object | NotGiven = NOT_GIVEN, + body_agent_uuid: str | Omit = omit, + description: str | Omit = omit, + faas_name: str | Omit = omit, + faas_namespace: str | Omit = omit, + function_name: str | Omit = omit, + body_function_uuid: str | Omit = omit, + input_schema: object | Omit = omit, + output_schema: object | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> FunctionUpdateResponse: """ To update the function route, send a PUT request to @@ -198,7 +198,7 @@ def delete( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> FunctionDeleteResponse: """ To delete a function route from an agent, send a DELETE request to @@ -252,19 +252,19 @@ async def create( self, path_agent_uuid: str, *, - body_agent_uuid: str | NotGiven = NOT_GIVEN, - description: str | NotGiven = NOT_GIVEN, - faas_name: str | NotGiven = NOT_GIVEN, - faas_namespace: str | NotGiven = NOT_GIVEN, - function_name: str | NotGiven = NOT_GIVEN, - input_schema: object | NotGiven = NOT_GIVEN, - output_schema: object | NotGiven = NOT_GIVEN, + body_agent_uuid: str | Omit = omit, + description: str | Omit = omit, + faas_name: str | Omit = omit, + faas_namespace: str | Omit = omit, + function_name: str | Omit = omit, + input_schema: object | Omit = omit, + output_schema: object | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> FunctionCreateResponse: """ To create a function route for an agent, send a POST request to @@ -322,20 +322,20 @@ async def update( path_function_uuid: str, *, path_agent_uuid: str, - body_agent_uuid: str | NotGiven = NOT_GIVEN, - description: str | NotGiven = NOT_GIVEN, - faas_name: str | NotGiven = NOT_GIVEN, - faas_namespace: str | NotGiven = NOT_GIVEN, - function_name: str | NotGiven = NOT_GIVEN, - body_function_uuid: str | NotGiven = NOT_GIVEN, - input_schema: object | NotGiven = NOT_GIVEN, - output_schema: object | NotGiven = NOT_GIVEN, + body_agent_uuid: str | Omit = omit, + description: str | Omit = omit, + faas_name: str | Omit = omit, + faas_namespace: str | Omit = omit, + function_name: str | Omit = omit, + body_function_uuid: str | Omit = omit, + input_schema: object | Omit = omit, + output_schema: object | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> FunctionUpdateResponse: """ To update the function route, send a PUT request to @@ -403,7 +403,7 @@ async def delete( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> FunctionDeleteResponse: """ To delete a function route from an agent, send a DELETE request to diff --git a/src/gradient/resources/agents/knowledge_bases.py b/src/gradient/resources/agents/knowledge_bases.py index 1664ee84..deefd123 100644 --- a/src/gradient/resources/agents/knowledge_bases.py +++ b/src/gradient/resources/agents/knowledge_bases.py @@ -4,7 +4,7 @@ import httpx -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._types import Body, Query, Headers, NotGiven, not_given from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import ( @@ -49,7 +49,7 @@ def attach( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> APILinkKnowledgeBaseOutput: """ To attach knowledge bases to an agent, send a POST request to @@ -86,7 +86,7 @@ def attach_single( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> APILinkKnowledgeBaseOutput: """ To attach a knowledge base to an agent, send a POST request to @@ -127,7 +127,7 @@ def detach( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> KnowledgeBaseDetachResponse: """ To detach a knowledge base from an agent, send a DELETE request to @@ -188,7 +188,7 @@ async def attach( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> APILinkKnowledgeBaseOutput: """ To attach knowledge bases to an agent, send a POST request to @@ -225,7 +225,7 @@ async def attach_single( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> APILinkKnowledgeBaseOutput: """ To attach a knowledge base to an agent, send a POST request to @@ -266,7 +266,7 @@ async def detach( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> KnowledgeBaseDetachResponse: """ To detach a knowledge base from an agent, send a DELETE request to diff --git a/src/gradient/resources/agents/routes.py b/src/gradient/resources/agents/routes.py index 1007b08f..dc37b7d2 100644 --- a/src/gradient/resources/agents/routes.py +++ b/src/gradient/resources/agents/routes.py @@ -4,7 +4,7 @@ import httpx -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from ..._utils import maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource @@ -49,17 +49,17 @@ def update( path_child_agent_uuid: str, *, path_parent_agent_uuid: str, - body_child_agent_uuid: str | NotGiven = NOT_GIVEN, - if_case: str | NotGiven = NOT_GIVEN, - body_parent_agent_uuid: str | NotGiven = NOT_GIVEN, - route_name: str | NotGiven = NOT_GIVEN, - uuid: str | NotGiven = NOT_GIVEN, + body_child_agent_uuid: str | Omit = omit, + if_case: str | Omit = omit, + body_parent_agent_uuid: str | Omit = omit, + route_name: str | Omit = omit, + uuid: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> RouteUpdateResponse: """ To update an agent route for an agent, send a PUT request to @@ -122,7 +122,7 @@ def delete( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> RouteDeleteResponse: """ To delete an agent route from a parent agent, send a DELETE request to @@ -156,16 +156,16 @@ def add( path_child_agent_uuid: str, *, path_parent_agent_uuid: str, - body_child_agent_uuid: str | NotGiven = NOT_GIVEN, - if_case: str | NotGiven = NOT_GIVEN, - body_parent_agent_uuid: str | NotGiven = NOT_GIVEN, - route_name: str | NotGiven = NOT_GIVEN, + body_child_agent_uuid: str | Omit = omit, + if_case: str | Omit = omit, + body_parent_agent_uuid: str | Omit = omit, + route_name: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> RouteAddResponse: """ To add an agent route to an agent, send a POST request to @@ -222,7 +222,7 @@ def view( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> RouteViewResponse: """ To view agent routes for an agent, send a GET requtest to @@ -275,17 +275,17 @@ async def update( path_child_agent_uuid: str, *, path_parent_agent_uuid: str, - body_child_agent_uuid: str | NotGiven = NOT_GIVEN, - if_case: str | NotGiven = NOT_GIVEN, - body_parent_agent_uuid: str | NotGiven = NOT_GIVEN, - route_name: str | NotGiven = NOT_GIVEN, - uuid: str | NotGiven = NOT_GIVEN, + body_child_agent_uuid: str | Omit = omit, + if_case: str | Omit = omit, + body_parent_agent_uuid: str | Omit = omit, + route_name: str | Omit = omit, + uuid: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> RouteUpdateResponse: """ To update an agent route for an agent, send a PUT request to @@ -348,7 +348,7 @@ async def delete( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> RouteDeleteResponse: """ To delete an agent route from a parent agent, send a DELETE request to @@ -382,16 +382,16 @@ async def add( path_child_agent_uuid: str, *, path_parent_agent_uuid: str, - body_child_agent_uuid: str | NotGiven = NOT_GIVEN, - if_case: str | NotGiven = NOT_GIVEN, - body_parent_agent_uuid: str | NotGiven = NOT_GIVEN, - route_name: str | NotGiven = NOT_GIVEN, + body_child_agent_uuid: str | Omit = omit, + if_case: str | Omit = omit, + body_parent_agent_uuid: str | Omit = omit, + route_name: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> RouteAddResponse: """ To add an agent route to an agent, send a POST request to @@ -448,7 +448,7 @@ async def view( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> RouteViewResponse: """ To view agent routes for an agent, send a GET requtest to diff --git a/src/gradient/resources/agents/versions.py b/src/gradient/resources/agents/versions.py index bc56e032..0331344a 100644 --- a/src/gradient/resources/agents/versions.py +++ b/src/gradient/resources/agents/versions.py @@ -4,7 +4,7 @@ import httpx -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from ..._utils import maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource @@ -46,14 +46,14 @@ def update( self, path_uuid: str, *, - body_uuid: str | NotGiven = NOT_GIVEN, - version_hash: str | NotGiven = NOT_GIVEN, + body_uuid: str | Omit = omit, + version_hash: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> VersionUpdateResponse: """ To update to a specific agent version, send a PUT request to @@ -95,14 +95,14 @@ def list( self, uuid: str, *, - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, + page: int | Omit = omit, + per_page: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> VersionListResponse: """ To list all agent versions, send a GET request to @@ -168,14 +168,14 @@ async def update( self, path_uuid: str, *, - body_uuid: str | NotGiven = NOT_GIVEN, - version_hash: str | NotGiven = NOT_GIVEN, + body_uuid: str | Omit = omit, + version_hash: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> VersionUpdateResponse: """ To update to a specific agent version, send a PUT request to @@ -217,14 +217,14 @@ async def list( self, uuid: str, *, - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, + page: int | Omit = omit, + per_page: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> VersionListResponse: """ To list all agent versions, send a GET request to diff --git a/src/gradient/resources/chat/completions.py b/src/gradient/resources/chat/completions.py index 3017deb6..779fffb0 100644 --- a/src/gradient/resources/chat/completions.py +++ b/src/gradient/resources/chat/completions.py @@ -7,7 +7,7 @@ import httpx -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven, SequenceNotStr +from ..._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given from ..._utils import required_args, maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource @@ -52,29 +52,29 @@ def create( *, messages: Iterable[completion_create_params.Message], model: str, - frequency_penalty: Optional[float] | NotGiven = NOT_GIVEN, - logit_bias: Optional[Dict[str, int]] | NotGiven = NOT_GIVEN, - logprobs: Optional[bool] | NotGiven = NOT_GIVEN, - max_completion_tokens: Optional[int] | NotGiven = NOT_GIVEN, - max_tokens: Optional[int] | NotGiven = NOT_GIVEN, - metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN, - n: Optional[int] | NotGiven = NOT_GIVEN, - presence_penalty: Optional[float] | NotGiven = NOT_GIVEN, - stop: Union[Optional[str], SequenceNotStr[str], None] | NotGiven = NOT_GIVEN, - stream: Optional[Literal[False]] | NotGiven = NOT_GIVEN, - stream_options: (Optional[completion_create_params.StreamOptions] | NotGiven) = NOT_GIVEN, - temperature: Optional[float] | NotGiven = NOT_GIVEN, - tool_choice: completion_create_params.ToolChoice | NotGiven = NOT_GIVEN, - tools: Iterable[completion_create_params.Tool] | NotGiven = NOT_GIVEN, - top_logprobs: Optional[int] | NotGiven = NOT_GIVEN, - top_p: Optional[float] | NotGiven = NOT_GIVEN, - user: str | NotGiven = NOT_GIVEN, + frequency_penalty: Optional[float] | Omit = omit, + logit_bias: Optional[Dict[str, int]] | Omit = omit, + logprobs: Optional[bool] | Omit = omit, + max_completion_tokens: Optional[int] | Omit = omit, + max_tokens: Optional[int] | Omit = omit, + metadata: Optional[Dict[str, str]] | Omit = omit, + n: Optional[int] | Omit = omit, + presence_penalty: Optional[float] | Omit = omit, + stop: Union[Optional[str], SequenceNotStr[str], None] | Omit = omit, + stream: Optional[Literal[False]] | Omit = omit, + stream_options: Optional[completion_create_params.StreamOptions] | Omit = omit, + temperature: Optional[float] | Omit = omit, + tool_choice: completion_create_params.ToolChoice | Omit = omit, + tools: Iterable[completion_create_params.Tool] | Omit = omit, + top_logprobs: Optional[int] | Omit = omit, + top_p: Optional[float] | Omit = omit, + user: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> CompletionCreateResponse: """ Creates a model response for the given chat conversation. @@ -182,28 +182,28 @@ def create( messages: Iterable[completion_create_params.Message], model: str, stream: Literal[True], - frequency_penalty: Optional[float] | NotGiven = NOT_GIVEN, - logit_bias: Optional[Dict[str, int]] | NotGiven = NOT_GIVEN, - logprobs: Optional[bool] | NotGiven = NOT_GIVEN, - max_completion_tokens: Optional[int] | NotGiven = NOT_GIVEN, - max_tokens: Optional[int] | NotGiven = NOT_GIVEN, - metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN, - n: Optional[int] | NotGiven = NOT_GIVEN, - presence_penalty: Optional[float] | NotGiven = NOT_GIVEN, - stop: Union[Optional[str], SequenceNotStr[str], None] | NotGiven = NOT_GIVEN, - stream_options: Optional[completion_create_params.StreamOptions] | NotGiven = NOT_GIVEN, - temperature: Optional[float] | NotGiven = NOT_GIVEN, - tool_choice: completion_create_params.ToolChoice | NotGiven = NOT_GIVEN, - tools: Iterable[completion_create_params.Tool] | NotGiven = NOT_GIVEN, - top_logprobs: Optional[int] | NotGiven = NOT_GIVEN, - top_p: Optional[float] | NotGiven = NOT_GIVEN, - user: str | NotGiven = NOT_GIVEN, + frequency_penalty: Optional[float] | Omit = omit, + logit_bias: Optional[Dict[str, int]] | Omit = omit, + logprobs: Optional[bool] | Omit = omit, + max_completion_tokens: Optional[int] | Omit = omit, + max_tokens: Optional[int] | Omit = omit, + metadata: Optional[Dict[str, str]] | Omit = omit, + n: Optional[int] | Omit = omit, + presence_penalty: Optional[float] | Omit = omit, + stop: Union[Optional[str], SequenceNotStr[str], None] | Omit = omit, + stream_options: Optional[completion_create_params.StreamOptions] | Omit = omit, + temperature: Optional[float] | Omit = omit, + tool_choice: completion_create_params.ToolChoice | Omit = omit, + tools: Iterable[completion_create_params.Tool] | Omit = omit, + top_logprobs: Optional[int] | Omit = omit, + top_p: Optional[float] | Omit = omit, + user: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> Stream[ChatCompletionChunk]: """ Creates a model response for the given chat conversation. @@ -310,28 +310,28 @@ def create( messages: Iterable[completion_create_params.Message], model: str, stream: bool, - frequency_penalty: Optional[float] | NotGiven = NOT_GIVEN, - logit_bias: Optional[Dict[str, int]] | NotGiven = NOT_GIVEN, - logprobs: Optional[bool] | NotGiven = NOT_GIVEN, - max_completion_tokens: Optional[int] | NotGiven = NOT_GIVEN, - max_tokens: Optional[int] | NotGiven = NOT_GIVEN, - metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN, - n: Optional[int] | NotGiven = NOT_GIVEN, - presence_penalty: Optional[float] | NotGiven = NOT_GIVEN, - stop: Union[Optional[str], SequenceNotStr[str], None] | NotGiven = NOT_GIVEN, - stream_options: Optional[completion_create_params.StreamOptions] | NotGiven = NOT_GIVEN, - temperature: Optional[float] | NotGiven = NOT_GIVEN, - tool_choice: completion_create_params.ToolChoice | NotGiven = NOT_GIVEN, - tools: Iterable[completion_create_params.Tool] | NotGiven = NOT_GIVEN, - top_logprobs: Optional[int] | NotGiven = NOT_GIVEN, - top_p: Optional[float] | NotGiven = NOT_GIVEN, - user: str | NotGiven = NOT_GIVEN, + frequency_penalty: Optional[float] | Omit = omit, + logit_bias: Optional[Dict[str, int]] | Omit = omit, + logprobs: Optional[bool] | Omit = omit, + max_completion_tokens: Optional[int] | Omit = omit, + max_tokens: Optional[int] | Omit = omit, + metadata: Optional[Dict[str, str]] | Omit = omit, + n: Optional[int] | Omit = omit, + presence_penalty: Optional[float] | Omit = omit, + stop: Union[Optional[str], SequenceNotStr[str], None] | Omit = omit, + stream_options: Optional[completion_create_params.StreamOptions] | Omit = omit, + temperature: Optional[float] | Omit = omit, + tool_choice: completion_create_params.ToolChoice | Omit = omit, + tools: Iterable[completion_create_params.Tool] | Omit = omit, + top_logprobs: Optional[int] | Omit = omit, + top_p: Optional[float] | Omit = omit, + user: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> CompletionCreateResponse | Stream[ChatCompletionChunk]: """ Creates a model response for the given chat conversation. @@ -437,29 +437,29 @@ def create( *, messages: Iterable[completion_create_params.Message], model: str, - frequency_penalty: Optional[float] | NotGiven = NOT_GIVEN, - logit_bias: Optional[Dict[str, int]] | NotGiven = NOT_GIVEN, - logprobs: Optional[bool] | NotGiven = NOT_GIVEN, - max_completion_tokens: Optional[int] | NotGiven = NOT_GIVEN, - max_tokens: Optional[int] | NotGiven = NOT_GIVEN, - metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN, - n: Optional[int] | NotGiven = NOT_GIVEN, - presence_penalty: Optional[float] | NotGiven = NOT_GIVEN, - stop: Union[Optional[str], SequenceNotStr[str], None] | NotGiven = NOT_GIVEN, - stream: Optional[Literal[False]] | Literal[True] | NotGiven = NOT_GIVEN, - stream_options: (Optional[completion_create_params.StreamOptions] | NotGiven) = NOT_GIVEN, - temperature: Optional[float] | NotGiven = NOT_GIVEN, - tool_choice: completion_create_params.ToolChoice | NotGiven = NOT_GIVEN, - tools: Iterable[completion_create_params.Tool] | NotGiven = NOT_GIVEN, - top_logprobs: Optional[int] | NotGiven = NOT_GIVEN, - top_p: Optional[float] | NotGiven = NOT_GIVEN, - user: str | NotGiven = NOT_GIVEN, + frequency_penalty: Optional[float] | Omit = omit, + logit_bias: Optional[Dict[str, int]] | Omit = omit, + logprobs: Optional[bool] | Omit = omit, + max_completion_tokens: Optional[int] | Omit = omit, + max_tokens: Optional[int] | Omit = omit, + metadata: Optional[Dict[str, str]] | Omit = omit, + n: Optional[int] | Omit = omit, + presence_penalty: Optional[float] | Omit = omit, + stop: Union[Optional[str], SequenceNotStr[str], None] | Omit = omit, + stream: Optional[Literal[False]] | Literal[True] | Omit = omit, + stream_options: Optional[completion_create_params.StreamOptions] | Omit = omit, + temperature: Optional[float] | Omit = omit, + tool_choice: completion_create_params.ToolChoice | Omit = omit, + tools: Iterable[completion_create_params.Tool] | Omit = omit, + top_logprobs: Optional[int] | Omit = omit, + top_p: Optional[float] | Omit = omit, + user: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> CompletionCreateResponse | Stream[ChatCompletionChunk]: # This method requires an model_access_key to be set via client argument or environment variable if not self._client.model_access_key: @@ -542,29 +542,29 @@ async def create( *, messages: Iterable[completion_create_params.Message], model: str, - frequency_penalty: Optional[float] | NotGiven = NOT_GIVEN, - logit_bias: Optional[Dict[str, int]] | NotGiven = NOT_GIVEN, - logprobs: Optional[bool] | NotGiven = NOT_GIVEN, - max_completion_tokens: Optional[int] | NotGiven = NOT_GIVEN, - max_tokens: Optional[int] | NotGiven = NOT_GIVEN, - metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN, - n: Optional[int] | NotGiven = NOT_GIVEN, - presence_penalty: Optional[float] | NotGiven = NOT_GIVEN, - stop: Union[Optional[str], SequenceNotStr[str], None] | NotGiven = NOT_GIVEN, - stream: Optional[Literal[False]] | NotGiven = NOT_GIVEN, - stream_options: (Optional[completion_create_params.StreamOptions] | NotGiven) = NOT_GIVEN, - temperature: Optional[float] | NotGiven = NOT_GIVEN, - tool_choice: completion_create_params.ToolChoice | NotGiven = NOT_GIVEN, - tools: Iterable[completion_create_params.Tool] | NotGiven = NOT_GIVEN, - top_logprobs: Optional[int] | NotGiven = NOT_GIVEN, - top_p: Optional[float] | NotGiven = NOT_GIVEN, - user: str | NotGiven = NOT_GIVEN, + frequency_penalty: Optional[float] | Omit = omit, + logit_bias: Optional[Dict[str, int]] | Omit = omit, + logprobs: Optional[bool] | Omit = omit, + max_completion_tokens: Optional[int] | Omit = omit, + max_tokens: Optional[int] | Omit = omit, + metadata: Optional[Dict[str, str]] | Omit = omit, + n: Optional[int] | Omit = omit, + presence_penalty: Optional[float] | Omit = omit, + stop: Union[Optional[str], SequenceNotStr[str], None] | Omit = omit, + stream: Optional[Literal[False]] | Omit = omit, + stream_options: Optional[completion_create_params.StreamOptions] | Omit = omit, + temperature: Optional[float] | Omit = omit, + tool_choice: completion_create_params.ToolChoice | Omit = omit, + tools: Iterable[completion_create_params.Tool] | Omit = omit, + top_logprobs: Optional[int] | Omit = omit, + top_p: Optional[float] | Omit = omit, + user: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> CompletionCreateResponse: """ Creates a model response for the given chat conversation. @@ -672,28 +672,28 @@ async def create( messages: Iterable[completion_create_params.Message], model: str, stream: Literal[True], - frequency_penalty: Optional[float] | NotGiven = NOT_GIVEN, - logit_bias: Optional[Dict[str, int]] | NotGiven = NOT_GIVEN, - logprobs: Optional[bool] | NotGiven = NOT_GIVEN, - max_completion_tokens: Optional[int] | NotGiven = NOT_GIVEN, - max_tokens: Optional[int] | NotGiven = NOT_GIVEN, - metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN, - n: Optional[int] | NotGiven = NOT_GIVEN, - presence_penalty: Optional[float] | NotGiven = NOT_GIVEN, - stop: Union[Optional[str], SequenceNotStr[str], None] | NotGiven = NOT_GIVEN, - stream_options: Optional[completion_create_params.StreamOptions] | NotGiven = NOT_GIVEN, - temperature: Optional[float] | NotGiven = NOT_GIVEN, - tool_choice: completion_create_params.ToolChoice | NotGiven = NOT_GIVEN, - tools: Iterable[completion_create_params.Tool] | NotGiven = NOT_GIVEN, - top_logprobs: Optional[int] | NotGiven = NOT_GIVEN, - top_p: Optional[float] | NotGiven = NOT_GIVEN, - user: str | NotGiven = NOT_GIVEN, + frequency_penalty: Optional[float] | Omit = omit, + logit_bias: Optional[Dict[str, int]] | Omit = omit, + logprobs: Optional[bool] | Omit = omit, + max_completion_tokens: Optional[int] | Omit = omit, + max_tokens: Optional[int] | Omit = omit, + metadata: Optional[Dict[str, str]] | Omit = omit, + n: Optional[int] | Omit = omit, + presence_penalty: Optional[float] | Omit = omit, + stop: Union[Optional[str], SequenceNotStr[str], None] | Omit = omit, + stream_options: Optional[completion_create_params.StreamOptions] | Omit = omit, + temperature: Optional[float] | Omit = omit, + tool_choice: completion_create_params.ToolChoice | Omit = omit, + tools: Iterable[completion_create_params.Tool] | Omit = omit, + top_logprobs: Optional[int] | Omit = omit, + top_p: Optional[float] | Omit = omit, + user: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AsyncStream[ChatCompletionChunk]: """ Creates a model response for the given chat conversation. @@ -800,28 +800,28 @@ async def create( messages: Iterable[completion_create_params.Message], model: str, stream: bool, - frequency_penalty: Optional[float] | NotGiven = NOT_GIVEN, - logit_bias: Optional[Dict[str, int]] | NotGiven = NOT_GIVEN, - logprobs: Optional[bool] | NotGiven = NOT_GIVEN, - max_completion_tokens: Optional[int] | NotGiven = NOT_GIVEN, - max_tokens: Optional[int] | NotGiven = NOT_GIVEN, - metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN, - n: Optional[int] | NotGiven = NOT_GIVEN, - presence_penalty: Optional[float] | NotGiven = NOT_GIVEN, - stop: Union[Optional[str], SequenceNotStr[str], None] | NotGiven = NOT_GIVEN, - stream_options: Optional[completion_create_params.StreamOptions] | NotGiven = NOT_GIVEN, - temperature: Optional[float] | NotGiven = NOT_GIVEN, - tool_choice: completion_create_params.ToolChoice | NotGiven = NOT_GIVEN, - tools: Iterable[completion_create_params.Tool] | NotGiven = NOT_GIVEN, - top_logprobs: Optional[int] | NotGiven = NOT_GIVEN, - top_p: Optional[float] | NotGiven = NOT_GIVEN, - user: str | NotGiven = NOT_GIVEN, + frequency_penalty: Optional[float] | Omit = omit, + logit_bias: Optional[Dict[str, int]] | Omit = omit, + logprobs: Optional[bool] | Omit = omit, + max_completion_tokens: Optional[int] | Omit = omit, + max_tokens: Optional[int] | Omit = omit, + metadata: Optional[Dict[str, str]] | Omit = omit, + n: Optional[int] | Omit = omit, + presence_penalty: Optional[float] | Omit = omit, + stop: Union[Optional[str], SequenceNotStr[str], None] | Omit = omit, + stream_options: Optional[completion_create_params.StreamOptions] | Omit = omit, + temperature: Optional[float] | Omit = omit, + tool_choice: completion_create_params.ToolChoice | Omit = omit, + tools: Iterable[completion_create_params.Tool] | Omit = omit, + top_logprobs: Optional[int] | Omit = omit, + top_p: Optional[float] | Omit = omit, + user: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> CompletionCreateResponse | AsyncStream[ChatCompletionChunk]: """ Creates a model response for the given chat conversation. @@ -927,29 +927,29 @@ async def create( *, messages: Iterable[completion_create_params.Message], model: str, - frequency_penalty: Optional[float] | NotGiven = NOT_GIVEN, - logit_bias: Optional[Dict[str, int]] | NotGiven = NOT_GIVEN, - logprobs: Optional[bool] | NotGiven = NOT_GIVEN, - max_completion_tokens: Optional[int] | NotGiven = NOT_GIVEN, - max_tokens: Optional[int] | NotGiven = NOT_GIVEN, - metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN, - n: Optional[int] | NotGiven = NOT_GIVEN, - presence_penalty: Optional[float] | NotGiven = NOT_GIVEN, - stop: Union[Optional[str], SequenceNotStr[str], None] | NotGiven = NOT_GIVEN, - stream: Optional[Literal[False]] | Literal[True] | NotGiven = NOT_GIVEN, - stream_options: (Optional[completion_create_params.StreamOptions] | NotGiven) = NOT_GIVEN, - temperature: Optional[float] | NotGiven = NOT_GIVEN, - tool_choice: completion_create_params.ToolChoice | NotGiven = NOT_GIVEN, - tools: Iterable[completion_create_params.Tool] | NotGiven = NOT_GIVEN, - top_logprobs: Optional[int] | NotGiven = NOT_GIVEN, - top_p: Optional[float] | NotGiven = NOT_GIVEN, - user: str | NotGiven = NOT_GIVEN, + frequency_penalty: Optional[float] | Omit = omit, + logit_bias: Optional[Dict[str, int]] | Omit = omit, + logprobs: Optional[bool] | Omit = omit, + max_completion_tokens: Optional[int] | Omit = omit, + max_tokens: Optional[int] | Omit = omit, + metadata: Optional[Dict[str, str]] | Omit = omit, + n: Optional[int] | Omit = omit, + presence_penalty: Optional[float] | Omit = omit, + stop: Union[Optional[str], SequenceNotStr[str], None] | Omit = omit, + stream: Optional[Literal[False]] | Literal[True] | Omit = omit, + stream_options: Optional[completion_create_params.StreamOptions] | Omit = omit, + temperature: Optional[float] | Omit = omit, + tool_choice: completion_create_params.ToolChoice | Omit = omit, + tools: Iterable[completion_create_params.Tool] | Omit = omit, + top_logprobs: Optional[int] | Omit = omit, + top_p: Optional[float] | Omit = omit, + user: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> CompletionCreateResponse | AsyncStream[ChatCompletionChunk]: # This method requires an model_access_key to be set via client argument or environment variable if not hasattr(self._client, "model_access_key") or not self._client.model_access_key: diff --git a/src/gradient/resources/databases/schema_registry/config.py b/src/gradient/resources/databases/schema_registry/config.py index f9c0d8d0..e012dd77 100644 --- a/src/gradient/resources/databases/schema_registry/config.py +++ b/src/gradient/resources/databases/schema_registry/config.py @@ -6,7 +6,7 @@ import httpx -from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ...._types import Body, Query, Headers, NotGiven, not_given from ...._utils import maybe_transform, async_maybe_transform from ...._compat import cached_property from ...._resource import SyncAPIResource, AsyncAPIResource @@ -55,7 +55,7 @@ def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ConfigRetrieveResponse: """ To retrieve the Schema Registry configuration for a Kafka cluster, send a GET @@ -98,7 +98,7 @@ def update( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ConfigUpdateResponse: """ To update the Schema Registry configuration for a Kafka cluster, send a PUT @@ -142,7 +142,7 @@ def retrieve_subject( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ConfigRetrieveSubjectResponse: """ To retrieve the Schema Registry configuration for a Subject of a Kafka cluster, @@ -189,7 +189,7 @@ def update_subject( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ConfigUpdateSubjectResponse: """ To update the Schema Registry configuration for a Subject of a Kafka cluster, @@ -258,7 +258,7 @@ async def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ConfigRetrieveResponse: """ To retrieve the Schema Registry configuration for a Kafka cluster, send a GET @@ -301,7 +301,7 @@ async def update( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ConfigUpdateResponse: """ To update the Schema Registry configuration for a Kafka cluster, send a PUT @@ -347,7 +347,7 @@ async def retrieve_subject( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ConfigRetrieveSubjectResponse: """ To retrieve the Schema Registry configuration for a Subject of a Kafka cluster, @@ -394,7 +394,7 @@ async def update_subject( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ConfigUpdateSubjectResponse: """ To update the Schema Registry configuration for a Subject of a Kafka cluster, diff --git a/src/gradient/resources/gpu_droplets/account/keys.py b/src/gradient/resources/gpu_droplets/account/keys.py index f5cd4120..f50b9945 100644 --- a/src/gradient/resources/gpu_droplets/account/keys.py +++ b/src/gradient/resources/gpu_droplets/account/keys.py @@ -6,7 +6,7 @@ import httpx -from ...._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven +from ...._types import Body, Omit, Query, Headers, NoneType, NotGiven, omit, not_given from ...._utils import maybe_transform, async_maybe_transform from ...._compat import cached_property from ...._resource import SyncAPIResource, AsyncAPIResource @@ -56,7 +56,7 @@ def create( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> KeyCreateResponse: """ To add a new SSH public key to your DigitalOcean account, send a POST request to @@ -102,7 +102,7 @@ def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> KeyRetrieveResponse: """ To get information about a key, send a GET request to `/v2/account/keys/$KEY_ID` @@ -136,13 +136,13 @@ def update( self, ssh_key_identifier: Union[int, str], *, - name: str | NotGiven = NOT_GIVEN, + name: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> KeyUpdateResponse: """ To update the name of an SSH key, send a PUT request to either @@ -178,14 +178,14 @@ def update( def list( self, *, - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, + page: int | Omit = omit, + per_page: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> KeyListResponse: """ To list all of the keys in your account, send a GET request to @@ -233,7 +233,7 @@ def delete( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> None: """ To destroy a public SSH key that you have in your account, send a DELETE request @@ -295,7 +295,7 @@ async def create( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> KeyCreateResponse: """ To add a new SSH public key to your DigitalOcean account, send a POST request to @@ -341,7 +341,7 @@ async def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> KeyRetrieveResponse: """ To get information about a key, send a GET request to `/v2/account/keys/$KEY_ID` @@ -375,13 +375,13 @@ async def update( self, ssh_key_identifier: Union[int, str], *, - name: str | NotGiven = NOT_GIVEN, + name: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> KeyUpdateResponse: """ To update the name of an SSH key, send a PUT request to either @@ -417,14 +417,14 @@ async def update( async def list( self, *, - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, + page: int | Omit = omit, + per_page: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> KeyListResponse: """ To list all of the keys in your account, send a GET request to @@ -472,7 +472,7 @@ async def delete( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> None: """ To destroy a public SSH key that you have in your account, send a DELETE request diff --git a/src/gradient/resources/gpu_droplets/actions.py b/src/gradient/resources/gpu_droplets/actions.py index 715fb076..a708fb67 100644 --- a/src/gradient/resources/gpu_droplets/actions.py +++ b/src/gradient/resources/gpu_droplets/actions.py @@ -7,7 +7,7 @@ import httpx -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from ..._utils import required_args, maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource @@ -58,7 +58,7 @@ def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ActionRetrieveResponse: """ To retrieve a Droplet action, send a GET request to @@ -90,14 +90,14 @@ def list( self, droplet_id: int, *, - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, + page: int | Omit = omit, + per_page: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ActionListResponse: """ To retrieve a list of all actions that have been executed for a Droplet, send a @@ -161,13 +161,13 @@ def bulk_initiate( "enable_ipv6", "snapshot", ], - tag_name: str | NotGiven = NOT_GIVEN, + tag_name: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ActionBulkInitiateResponse: """Some actions can be performed in bulk on tagged Droplets. @@ -223,14 +223,14 @@ def bulk_initiate( "enable_ipv6", "snapshot", ], - tag_name: str | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, + tag_name: str | Omit = omit, + name: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ActionBulkInitiateResponse: """Some actions can be performed in bulk on tagged Droplets. @@ -288,14 +288,14 @@ def bulk_initiate( "enable_ipv6", "snapshot", ], - tag_name: str | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, + tag_name: str | Omit = omit, + name: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ActionBulkInitiateResponse: return self._post( "/v2/droplets/actions" @@ -345,7 +345,7 @@ def initiate( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ActionInitiateResponse: """ To initiate an action on a Droplet send a POST request to @@ -406,13 +406,13 @@ def initiate( "enable_ipv6", "snapshot", ], - backup_policy: DropletBackupPolicyParam | NotGiven = NOT_GIVEN, + backup_policy: DropletBackupPolicyParam | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ActionInitiateResponse: """ To initiate an action on a Droplet send a POST request to @@ -476,13 +476,13 @@ def initiate( "enable_ipv6", "snapshot", ], - backup_policy: DropletBackupPolicyParam | NotGiven = NOT_GIVEN, + backup_policy: DropletBackupPolicyParam | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ActionInitiateResponse: """ To initiate an action on a Droplet send a POST request to @@ -545,13 +545,13 @@ def initiate( "enable_ipv6", "snapshot", ], - image: int | NotGiven = NOT_GIVEN, + image: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ActionInitiateResponse: """ To initiate an action on a Droplet send a POST request to @@ -614,14 +614,14 @@ def initiate( "enable_ipv6", "snapshot", ], - disk: bool | NotGiven = NOT_GIVEN, - size: str | NotGiven = NOT_GIVEN, + disk: bool | Omit = omit, + size: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ActionInitiateResponse: """ To initiate an action on a Droplet send a POST request to @@ -688,13 +688,13 @@ def initiate( "enable_ipv6", "snapshot", ], - image: Union[str, int] | NotGiven = NOT_GIVEN, + image: Union[str, int] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ActionInitiateResponse: """ To initiate an action on a Droplet send a POST request to @@ -758,13 +758,13 @@ def initiate( "enable_ipv6", "snapshot", ], - name: str | NotGiven = NOT_GIVEN, + name: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ActionInitiateResponse: """ To initiate an action on a Droplet send a POST request to @@ -827,13 +827,13 @@ def initiate( "enable_ipv6", "snapshot", ], - kernel: int | NotGiven = NOT_GIVEN, + kernel: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ActionInitiateResponse: """ To initiate an action on a Droplet send a POST request to @@ -896,13 +896,13 @@ def initiate( "enable_ipv6", "snapshot", ], - name: str | NotGiven = NOT_GIVEN, + name: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ActionInitiateResponse: """ To initiate an action on a Droplet send a POST request to @@ -965,18 +965,18 @@ def initiate( "enable_ipv6", "snapshot", ], - backup_policy: DropletBackupPolicyParam | NotGiven = NOT_GIVEN, - image: int | Union[str, int] | NotGiven = NOT_GIVEN, - disk: bool | NotGiven = NOT_GIVEN, - size: str | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, - kernel: int | NotGiven = NOT_GIVEN, + backup_policy: DropletBackupPolicyParam | Omit = omit, + image: int | Union[str, int] | Omit = omit, + disk: bool | Omit = omit, + size: str | Omit = omit, + name: str | Omit = omit, + kernel: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ActionInitiateResponse: return self._post( f"/v2/droplets/{droplet_id}/actions" @@ -1031,7 +1031,7 @@ async def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ActionRetrieveResponse: """ To retrieve a Droplet action, send a GET request to @@ -1063,14 +1063,14 @@ async def list( self, droplet_id: int, *, - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, + page: int | Omit = omit, + per_page: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ActionListResponse: """ To retrieve a list of all actions that have been executed for a Droplet, send a @@ -1134,13 +1134,13 @@ async def bulk_initiate( "enable_ipv6", "snapshot", ], - tag_name: str | NotGiven = NOT_GIVEN, + tag_name: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ActionBulkInitiateResponse: """Some actions can be performed in bulk on tagged Droplets. @@ -1196,14 +1196,14 @@ async def bulk_initiate( "enable_ipv6", "snapshot", ], - tag_name: str | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, + tag_name: str | Omit = omit, + name: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ActionBulkInitiateResponse: """Some actions can be performed in bulk on tagged Droplets. @@ -1261,14 +1261,14 @@ async def bulk_initiate( "enable_ipv6", "snapshot", ], - tag_name: str | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, + tag_name: str | Omit = omit, + name: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ActionBulkInitiateResponse: return await self._post( "/v2/droplets/actions" @@ -1320,7 +1320,7 @@ async def initiate( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ActionInitiateResponse: """ To initiate an action on a Droplet send a POST request to @@ -1381,13 +1381,13 @@ async def initiate( "enable_ipv6", "snapshot", ], - backup_policy: DropletBackupPolicyParam | NotGiven = NOT_GIVEN, + backup_policy: DropletBackupPolicyParam | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ActionInitiateResponse: """ To initiate an action on a Droplet send a POST request to @@ -1451,13 +1451,13 @@ async def initiate( "enable_ipv6", "snapshot", ], - backup_policy: DropletBackupPolicyParam | NotGiven = NOT_GIVEN, + backup_policy: DropletBackupPolicyParam | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ActionInitiateResponse: """ To initiate an action on a Droplet send a POST request to @@ -1520,13 +1520,13 @@ async def initiate( "enable_ipv6", "snapshot", ], - image: int | NotGiven = NOT_GIVEN, + image: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ActionInitiateResponse: """ To initiate an action on a Droplet send a POST request to @@ -1589,14 +1589,14 @@ async def initiate( "enable_ipv6", "snapshot", ], - disk: bool | NotGiven = NOT_GIVEN, - size: str | NotGiven = NOT_GIVEN, + disk: bool | Omit = omit, + size: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ActionInitiateResponse: """ To initiate an action on a Droplet send a POST request to @@ -1663,13 +1663,13 @@ async def initiate( "enable_ipv6", "snapshot", ], - image: Union[str, int] | NotGiven = NOT_GIVEN, + image: Union[str, int] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ActionInitiateResponse: """ To initiate an action on a Droplet send a POST request to @@ -1733,13 +1733,13 @@ async def initiate( "enable_ipv6", "snapshot", ], - name: str | NotGiven = NOT_GIVEN, + name: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ActionInitiateResponse: """ To initiate an action on a Droplet send a POST request to @@ -1802,13 +1802,13 @@ async def initiate( "enable_ipv6", "snapshot", ], - kernel: int | NotGiven = NOT_GIVEN, + kernel: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ActionInitiateResponse: """ To initiate an action on a Droplet send a POST request to @@ -1871,13 +1871,13 @@ async def initiate( "enable_ipv6", "snapshot", ], - name: str | NotGiven = NOT_GIVEN, + name: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ActionInitiateResponse: """ To initiate an action on a Droplet send a POST request to @@ -1940,18 +1940,18 @@ async def initiate( "enable_ipv6", "snapshot", ], - backup_policy: DropletBackupPolicyParam | NotGiven = NOT_GIVEN, - image: int | Union[str, int] | NotGiven = NOT_GIVEN, - disk: bool | NotGiven = NOT_GIVEN, - size: str | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, - kernel: int | NotGiven = NOT_GIVEN, + backup_policy: DropletBackupPolicyParam | Omit = omit, + image: int | Union[str, int] | Omit = omit, + disk: bool | Omit = omit, + size: str | Omit = omit, + name: str | Omit = omit, + kernel: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ActionInitiateResponse: return await self._post( f"/v2/droplets/{droplet_id}/actions" diff --git a/src/gradient/resources/gpu_droplets/autoscale.py b/src/gradient/resources/gpu_droplets/autoscale.py index 342256f6..8df17f7a 100644 --- a/src/gradient/resources/gpu_droplets/autoscale.py +++ b/src/gradient/resources/gpu_droplets/autoscale.py @@ -4,7 +4,7 @@ import httpx -from ..._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven +from ..._types import Body, Omit, Query, Headers, NoneType, NotGiven, omit, not_given from ..._utils import maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource @@ -64,7 +64,7 @@ def create( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AutoscaleCreateResponse: """ To create a new autoscale pool, send a POST request to `/v2/droplets/autoscale` @@ -114,7 +114,7 @@ def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AutoscaleRetrieveResponse: """ To show information about an individual autoscale pool, send a GET request to @@ -153,7 +153,7 @@ def update( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AutoscaleUpdateResponse: """ To update the configuration of an existing autoscale pool, send a PUT request to @@ -197,15 +197,15 @@ def update( def list( self, *, - name: str | NotGiven = NOT_GIVEN, - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, + name: str | Omit = omit, + page: int | Omit = omit, + per_page: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AutoscaleListResponse: """ To list all autoscale pools in your team, send a GET request to @@ -258,7 +258,7 @@ def delete( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> None: """ To destroy an autoscale pool, send a DELETE request to the @@ -298,7 +298,7 @@ def delete_dangerous( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> None: """ To destroy an autoscale pool and its associated resources (Droplets), send a @@ -332,14 +332,14 @@ def list_history( self, autoscale_pool_id: str, *, - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, + page: int | Omit = omit, + per_page: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AutoscaleListHistoryResponse: """ To list all of the scaling history events of an autoscale pool, send a GET @@ -387,14 +387,14 @@ def list_members( self, autoscale_pool_id: str, *, - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, + page: int | Omit = omit, + per_page: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AutoscaleListMembersResponse: """ To list the Droplets in an autoscale pool, send a GET request to @@ -471,7 +471,7 @@ async def create( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AutoscaleCreateResponse: """ To create a new autoscale pool, send a POST request to `/v2/droplets/autoscale` @@ -521,7 +521,7 @@ async def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AutoscaleRetrieveResponse: """ To show information about an individual autoscale pool, send a GET request to @@ -560,7 +560,7 @@ async def update( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AutoscaleUpdateResponse: """ To update the configuration of an existing autoscale pool, send a PUT request to @@ -604,15 +604,15 @@ async def update( async def list( self, *, - name: str | NotGiven = NOT_GIVEN, - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, + name: str | Omit = omit, + page: int | Omit = omit, + per_page: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AutoscaleListResponse: """ To list all autoscale pools in your team, send a GET request to @@ -665,7 +665,7 @@ async def delete( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> None: """ To destroy an autoscale pool, send a DELETE request to the @@ -705,7 +705,7 @@ async def delete_dangerous( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> None: """ To destroy an autoscale pool and its associated resources (Droplets), send a @@ -739,14 +739,14 @@ async def list_history( self, autoscale_pool_id: str, *, - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, + page: int | Omit = omit, + per_page: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AutoscaleListHistoryResponse: """ To list all of the scaling history events of an autoscale pool, send a GET @@ -794,14 +794,14 @@ async def list_members( self, autoscale_pool_id: str, *, - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, + page: int | Omit = omit, + per_page: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AutoscaleListMembersResponse: """ To list the Droplets in an autoscale pool, send a GET request to diff --git a/src/gradient/resources/gpu_droplets/backups.py b/src/gradient/resources/gpu_droplets/backups.py index 9f20a047..065aa3d1 100644 --- a/src/gradient/resources/gpu_droplets/backups.py +++ b/src/gradient/resources/gpu_droplets/backups.py @@ -4,7 +4,7 @@ import httpx -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from ..._utils import maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource @@ -48,14 +48,14 @@ def list( self, droplet_id: int, *, - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, + page: int | Omit = omit, + per_page: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> BackupListResponse: """ To retrieve any backups associated with a Droplet, send a GET request to @@ -101,14 +101,14 @@ def list( def list_policies( self, *, - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, + page: int | Omit = omit, + per_page: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> BackupListPoliciesResponse: """ To list information about the backup policies for all Droplets in the account, @@ -155,7 +155,7 @@ def list_supported_policies( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> BackupListSupportedPoliciesResponse: """ To retrieve a list of all supported Droplet backup policies, send a GET request @@ -180,7 +180,7 @@ def retrieve_policy( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> BackupRetrievePolicyResponse: """ To show information about an individual Droplet's backup policy, send a GET @@ -230,14 +230,14 @@ async def list( self, droplet_id: int, *, - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, + page: int | Omit = omit, + per_page: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> BackupListResponse: """ To retrieve any backups associated with a Droplet, send a GET request to @@ -283,14 +283,14 @@ async def list( async def list_policies( self, *, - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, + page: int | Omit = omit, + per_page: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> BackupListPoliciesResponse: """ To list information about the backup policies for all Droplets in the account, @@ -337,7 +337,7 @@ async def list_supported_policies( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> BackupListSupportedPoliciesResponse: """ To retrieve a list of all supported Droplet backup policies, send a GET request @@ -362,7 +362,7 @@ async def retrieve_policy( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> BackupRetrievePolicyResponse: """ To show information about an individual Droplet's backup policy, send a GET diff --git a/src/gradient/resources/gpu_droplets/destroy_with_associated_resources.py b/src/gradient/resources/gpu_droplets/destroy_with_associated_resources.py index 0d55cb48..2ccad852 100644 --- a/src/gradient/resources/gpu_droplets/destroy_with_associated_resources.py +++ b/src/gradient/resources/gpu_droplets/destroy_with_associated_resources.py @@ -4,7 +4,7 @@ import httpx -from ..._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven, SequenceNotStr +from ..._types import Body, Omit, Query, Headers, NoneType, NotGiven, SequenceNotStr, omit, not_given from ..._utils import maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource @@ -55,7 +55,7 @@ def list( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> DestroyWithAssociatedResourceListResponse: """ To list the associated billable resources that can be destroyed along with a @@ -97,7 +97,7 @@ def check_status( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> DestroyWithAssociatedResourceCheckStatusResponse: """ To check on the status of a request to destroy a Droplet with its associated @@ -133,7 +133,7 @@ def delete_dangerous( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> None: """ To destroy a Droplet along with all of its associated resources, send a DELETE @@ -172,17 +172,17 @@ def delete_selective( self, droplet_id: int, *, - floating_ips: SequenceNotStr[str] | NotGiven = NOT_GIVEN, - reserved_ips: SequenceNotStr[str] | NotGiven = NOT_GIVEN, - snapshots: SequenceNotStr[str] | NotGiven = NOT_GIVEN, - volume_snapshots: SequenceNotStr[str] | NotGiven = NOT_GIVEN, - volumes: SequenceNotStr[str] | NotGiven = NOT_GIVEN, + floating_ips: SequenceNotStr[str] | Omit = omit, + reserved_ips: SequenceNotStr[str] | Omit = omit, + snapshots: SequenceNotStr[str] | Omit = omit, + volume_snapshots: SequenceNotStr[str] | Omit = omit, + volumes: SequenceNotStr[str] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> None: """ To destroy a Droplet along with a sub-set of its associated resources, send a @@ -250,7 +250,7 @@ def retry( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> None: """ If the status of a request to destroy a Droplet with its associated resources @@ -311,7 +311,7 @@ async def list( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> DestroyWithAssociatedResourceListResponse: """ To list the associated billable resources that can be destroyed along with a @@ -353,7 +353,7 @@ async def check_status( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> DestroyWithAssociatedResourceCheckStatusResponse: """ To check on the status of a request to destroy a Droplet with its associated @@ -389,7 +389,7 @@ async def delete_dangerous( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> None: """ To destroy a Droplet along with all of its associated resources, send a DELETE @@ -428,17 +428,17 @@ async def delete_selective( self, droplet_id: int, *, - floating_ips: SequenceNotStr[str] | NotGiven = NOT_GIVEN, - reserved_ips: SequenceNotStr[str] | NotGiven = NOT_GIVEN, - snapshots: SequenceNotStr[str] | NotGiven = NOT_GIVEN, - volume_snapshots: SequenceNotStr[str] | NotGiven = NOT_GIVEN, - volumes: SequenceNotStr[str] | NotGiven = NOT_GIVEN, + floating_ips: SequenceNotStr[str] | Omit = omit, + reserved_ips: SequenceNotStr[str] | Omit = omit, + snapshots: SequenceNotStr[str] | Omit = omit, + volume_snapshots: SequenceNotStr[str] | Omit = omit, + volumes: SequenceNotStr[str] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> None: """ To destroy a Droplet along with a sub-set of its associated resources, send a @@ -506,7 +506,7 @@ async def retry( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> None: """ If the status of a request to destroy a Droplet with its associated resources diff --git a/src/gradient/resources/gpu_droplets/firewalls/droplets.py b/src/gradient/resources/gpu_droplets/firewalls/droplets.py index b25aa3e3..90bcb47e 100644 --- a/src/gradient/resources/gpu_droplets/firewalls/droplets.py +++ b/src/gradient/resources/gpu_droplets/firewalls/droplets.py @@ -6,7 +6,7 @@ import httpx -from ...._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven +from ...._types import Body, Query, Headers, NoneType, NotGiven, not_given from ...._utils import maybe_transform, async_maybe_transform from ...._compat import cached_property from ...._resource import SyncAPIResource, AsyncAPIResource @@ -52,7 +52,7 @@ def add( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> None: """ To assign a Droplet to a firewall, send a POST request to @@ -98,7 +98,7 @@ def remove( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> None: """ To remove a Droplet from a firewall, send a DELETE request to @@ -165,7 +165,7 @@ async def add( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> None: """ To assign a Droplet to a firewall, send a POST request to @@ -211,7 +211,7 @@ async def remove( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> None: """ To remove a Droplet from a firewall, send a DELETE request to diff --git a/src/gradient/resources/gpu_droplets/firewalls/firewalls.py b/src/gradient/resources/gpu_droplets/firewalls/firewalls.py index 116cde8d..a5fee406 100644 --- a/src/gradient/resources/gpu_droplets/firewalls/firewalls.py +++ b/src/gradient/resources/gpu_droplets/firewalls/firewalls.py @@ -28,7 +28,7 @@ DropletsResourceWithStreamingResponse, AsyncDropletsResourceWithStreamingResponse, ) -from ...._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven +from ...._types import Body, Omit, Query, Headers, NoneType, NotGiven, omit, not_given from ...._utils import maybe_transform, async_maybe_transform from ...._compat import cached_property from ...._resource import SyncAPIResource, AsyncAPIResource @@ -84,13 +84,13 @@ def with_streaming_response(self) -> FirewallsResourceWithStreamingResponse: def create( self, *, - body: firewall_create_params.Body | NotGiven = NOT_GIVEN, + body: firewall_create_params.Body | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> FirewallCreateResponse: """To create a new firewall, send a POST request to `/v2/firewalls`. @@ -124,7 +124,7 @@ def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> FirewallRetrieveResponse: """ To show information about an existing firewall, send a GET request to @@ -161,7 +161,7 @@ def update( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> FirewallUpdateResponse: """ To update the configuration of an existing firewall, send a PUT request to @@ -197,14 +197,14 @@ def update( def list( self, *, - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, + page: int | Omit = omit, + per_page: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> FirewallListResponse: """ To list all of the firewalls available on your account, send a GET request to @@ -250,7 +250,7 @@ def delete( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> None: """ To delete a firewall send a DELETE request to `/v2/firewalls/$FIREWALL_ID`. @@ -317,13 +317,13 @@ def with_streaming_response(self) -> AsyncFirewallsResourceWithStreamingResponse async def create( self, *, - body: firewall_create_params.Body | NotGiven = NOT_GIVEN, + body: firewall_create_params.Body | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> FirewallCreateResponse: """To create a new firewall, send a POST request to `/v2/firewalls`. @@ -357,7 +357,7 @@ async def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> FirewallRetrieveResponse: """ To show information about an existing firewall, send a GET request to @@ -394,7 +394,7 @@ async def update( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> FirewallUpdateResponse: """ To update the configuration of an existing firewall, send a PUT request to @@ -430,14 +430,14 @@ async def update( async def list( self, *, - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, + page: int | Omit = omit, + per_page: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> FirewallListResponse: """ To list all of the firewalls available on your account, send a GET request to @@ -483,7 +483,7 @@ async def delete( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> None: """ To delete a firewall send a DELETE request to `/v2/firewalls/$FIREWALL_ID`. diff --git a/src/gradient/resources/gpu_droplets/firewalls/rules.py b/src/gradient/resources/gpu_droplets/firewalls/rules.py index d3a77cd9..f669fc6d 100644 --- a/src/gradient/resources/gpu_droplets/firewalls/rules.py +++ b/src/gradient/resources/gpu_droplets/firewalls/rules.py @@ -6,7 +6,7 @@ import httpx -from ...._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven +from ...._types import Body, Omit, Query, Headers, NoneType, NotGiven, omit, not_given from ...._utils import maybe_transform, async_maybe_transform from ...._compat import cached_property from ...._resource import SyncAPIResource, AsyncAPIResource @@ -46,14 +46,14 @@ def add( self, firewall_id: str, *, - inbound_rules: Optional[Iterable[rule_add_params.InboundRule]] | NotGiven = NOT_GIVEN, - outbound_rules: Optional[Iterable[rule_add_params.OutboundRule]] | NotGiven = NOT_GIVEN, + inbound_rules: Optional[Iterable[rule_add_params.InboundRule]] | Omit = omit, + outbound_rules: Optional[Iterable[rule_add_params.OutboundRule]] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> None: """ To add additional access rules to a firewall, send a POST request to @@ -98,14 +98,14 @@ def remove( self, firewall_id: str, *, - inbound_rules: Optional[Iterable[rule_remove_params.InboundRule]] | NotGiven = NOT_GIVEN, - outbound_rules: Optional[Iterable[rule_remove_params.OutboundRule]] | NotGiven = NOT_GIVEN, + inbound_rules: Optional[Iterable[rule_remove_params.InboundRule]] | Omit = omit, + outbound_rules: Optional[Iterable[rule_remove_params.OutboundRule]] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> None: """ To remove access rules from a firewall, send a DELETE request to @@ -171,14 +171,14 @@ async def add( self, firewall_id: str, *, - inbound_rules: Optional[Iterable[rule_add_params.InboundRule]] | NotGiven = NOT_GIVEN, - outbound_rules: Optional[Iterable[rule_add_params.OutboundRule]] | NotGiven = NOT_GIVEN, + inbound_rules: Optional[Iterable[rule_add_params.InboundRule]] | Omit = omit, + outbound_rules: Optional[Iterable[rule_add_params.OutboundRule]] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> None: """ To add additional access rules to a firewall, send a POST request to @@ -223,14 +223,14 @@ async def remove( self, firewall_id: str, *, - inbound_rules: Optional[Iterable[rule_remove_params.InboundRule]] | NotGiven = NOT_GIVEN, - outbound_rules: Optional[Iterable[rule_remove_params.OutboundRule]] | NotGiven = NOT_GIVEN, + inbound_rules: Optional[Iterable[rule_remove_params.InboundRule]] | Omit = omit, + outbound_rules: Optional[Iterable[rule_remove_params.OutboundRule]] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> None: """ To remove access rules from a firewall, send a DELETE request to diff --git a/src/gradient/resources/gpu_droplets/firewalls/tags.py b/src/gradient/resources/gpu_droplets/firewalls/tags.py index ee13acd5..82d613fb 100644 --- a/src/gradient/resources/gpu_droplets/firewalls/tags.py +++ b/src/gradient/resources/gpu_droplets/firewalls/tags.py @@ -6,7 +6,7 @@ import httpx -from ...._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven, SequenceNotStr +from ...._types import Body, Query, Headers, NoneType, NotGiven, SequenceNotStr, not_given from ...._utils import maybe_transform, async_maybe_transform from ...._compat import cached_property from ...._resource import SyncAPIResource, AsyncAPIResource @@ -52,7 +52,7 @@ def add( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> None: """ To assign a tag representing a group of Droplets to a firewall, send a POST @@ -101,7 +101,7 @@ def remove( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> None: """ To remove a tag representing a group of Droplets from a firewall, send a DELETE @@ -171,7 +171,7 @@ async def add( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> None: """ To assign a tag representing a group of Droplets to a firewall, send a POST @@ -220,7 +220,7 @@ async def remove( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> None: """ To remove a tag representing a group of Droplets from a firewall, send a DELETE diff --git a/src/gradient/resources/gpu_droplets/floating_ips/actions.py b/src/gradient/resources/gpu_droplets/floating_ips/actions.py index ecf88993..f73d5707 100644 --- a/src/gradient/resources/gpu_droplets/floating_ips/actions.py +++ b/src/gradient/resources/gpu_droplets/floating_ips/actions.py @@ -6,7 +6,7 @@ import httpx -from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ...._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from ...._utils import required_args, maybe_transform, async_maybe_transform from ...._compat import cached_property from ...._resource import SyncAPIResource, AsyncAPIResource @@ -56,7 +56,7 @@ def create( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ActionCreateResponse: """ To initiate an action on a floating IP send a POST request to @@ -93,7 +93,7 @@ def create( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ActionCreateResponse: """ To initiate an action on a floating IP send a POST request to @@ -126,13 +126,13 @@ def create( floating_ip: str, *, type: Literal["assign", "unassign"], - droplet_id: int | NotGiven = NOT_GIVEN, + droplet_id: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ActionCreateResponse: if not floating_ip: raise ValueError(f"Expected a non-empty value for `floating_ip` but received {floating_ip!r}") @@ -163,7 +163,7 @@ def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ActionRetrieveResponse: """ To retrieve the status of a floating IP action, send a GET request to @@ -199,7 +199,7 @@ def list( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ActionListResponse: """ To retrieve all actions that have been executed on a floating IP, send a GET @@ -258,7 +258,7 @@ async def create( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ActionCreateResponse: """ To initiate an action on a floating IP send a POST request to @@ -295,7 +295,7 @@ async def create( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ActionCreateResponse: """ To initiate an action on a floating IP send a POST request to @@ -328,13 +328,13 @@ async def create( floating_ip: str, *, type: Literal["assign", "unassign"], - droplet_id: int | NotGiven = NOT_GIVEN, + droplet_id: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ActionCreateResponse: if not floating_ip: raise ValueError(f"Expected a non-empty value for `floating_ip` but received {floating_ip!r}") @@ -365,7 +365,7 @@ async def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ActionRetrieveResponse: """ To retrieve the status of a floating IP action, send a GET request to @@ -401,7 +401,7 @@ async def list( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ActionListResponse: """ To retrieve all actions that have been executed on a floating IP, send a GET diff --git a/src/gradient/resources/gpu_droplets/floating_ips/floating_ips.py b/src/gradient/resources/gpu_droplets/floating_ips/floating_ips.py index f70f153f..58b4bdb0 100644 --- a/src/gradient/resources/gpu_droplets/floating_ips/floating_ips.py +++ b/src/gradient/resources/gpu_droplets/floating_ips/floating_ips.py @@ -14,7 +14,7 @@ ActionsResourceWithStreamingResponse, AsyncActionsResourceWithStreamingResponse, ) -from ...._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven +from ...._types import Body, Omit, Query, Headers, NoneType, NotGiven, omit, not_given from ...._utils import required_args, maybe_transform, async_maybe_transform from ...._compat import cached_property from ...._resource import SyncAPIResource, AsyncAPIResource @@ -67,7 +67,7 @@ def create( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> FloatingIPCreateResponse: """ On creation, a floating IP must be either assigned to a Droplet or reserved to a @@ -100,13 +100,13 @@ def create( self, *, region: str, - project_id: str | NotGiven = NOT_GIVEN, + project_id: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> FloatingIPCreateResponse: """ On creation, a floating IP must be either assigned to a Droplet or reserved to a @@ -140,15 +140,15 @@ def create( def create( self, *, - droplet_id: int | NotGiven = NOT_GIVEN, - region: str | NotGiven = NOT_GIVEN, - project_id: str | NotGiven = NOT_GIVEN, + droplet_id: int | Omit = omit, + region: str | Omit = omit, + project_id: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> FloatingIPCreateResponse: return self._post( "/v2/floating_ips" if self._client._base_url_overridden else "https://api.digitalocean.com/v2/floating_ips", @@ -175,7 +175,7 @@ def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> FloatingIPRetrieveResponse: """ To show information about a floating IP, send a GET request to @@ -205,14 +205,14 @@ def retrieve( def list( self, *, - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, + page: int | Omit = omit, + per_page: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> FloatingIPListResponse: """ To list all of the floating IPs available on your account, send a GET request to @@ -258,7 +258,7 @@ def delete( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> None: """ To delete a floating IP and remove it from your account, send a DELETE request @@ -324,7 +324,7 @@ async def create( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> FloatingIPCreateResponse: """ On creation, a floating IP must be either assigned to a Droplet or reserved to a @@ -357,13 +357,13 @@ async def create( self, *, region: str, - project_id: str | NotGiven = NOT_GIVEN, + project_id: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> FloatingIPCreateResponse: """ On creation, a floating IP must be either assigned to a Droplet or reserved to a @@ -397,15 +397,15 @@ async def create( async def create( self, *, - droplet_id: int | NotGiven = NOT_GIVEN, - region: str | NotGiven = NOT_GIVEN, - project_id: str | NotGiven = NOT_GIVEN, + droplet_id: int | Omit = omit, + region: str | Omit = omit, + project_id: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> FloatingIPCreateResponse: return await self._post( "/v2/floating_ips" if self._client._base_url_overridden else "https://api.digitalocean.com/v2/floating_ips", @@ -432,7 +432,7 @@ async def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> FloatingIPRetrieveResponse: """ To show information about a floating IP, send a GET request to @@ -462,14 +462,14 @@ async def retrieve( async def list( self, *, - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, + page: int | Omit = omit, + per_page: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> FloatingIPListResponse: """ To list all of the floating IPs available on your account, send a GET request to @@ -515,7 +515,7 @@ async def delete( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> None: """ To delete a floating IP and remove it from your account, send a DELETE request diff --git a/src/gradient/resources/gpu_droplets/gpu_droplets.py b/src/gradient/resources/gpu_droplets/gpu_droplets.py index 48a9e5fe..c9f84747 100644 --- a/src/gradient/resources/gpu_droplets/gpu_droplets.py +++ b/src/gradient/resources/gpu_droplets/gpu_droplets.py @@ -39,7 +39,7 @@ BackupsResourceWithStreamingResponse, AsyncBackupsResourceWithStreamingResponse, ) -from ..._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven, SequenceNotStr +from ..._types import Body, Omit, Query, Headers, NoneType, NotGiven, SequenceNotStr, omit, not_given from ..._utils import required_args, maybe_transform, async_maybe_transform from ..._compat import cached_property from .autoscale import ( @@ -209,24 +209,24 @@ def create( image: Union[str, int], name: str, size: str, - backup_policy: DropletBackupPolicyParam | NotGiven = NOT_GIVEN, - backups: bool | NotGiven = NOT_GIVEN, - ipv6: bool | NotGiven = NOT_GIVEN, - monitoring: bool | NotGiven = NOT_GIVEN, - private_networking: bool | NotGiven = NOT_GIVEN, - region: str | NotGiven = NOT_GIVEN, - ssh_keys: SequenceNotStr[Union[str, int]] | NotGiven = NOT_GIVEN, - tags: Optional[SequenceNotStr[str]] | NotGiven = NOT_GIVEN, - user_data: str | NotGiven = NOT_GIVEN, - volumes: SequenceNotStr[str] | NotGiven = NOT_GIVEN, - vpc_uuid: str | NotGiven = NOT_GIVEN, - with_droplet_agent: bool | NotGiven = NOT_GIVEN, + backup_policy: DropletBackupPolicyParam | Omit = omit, + backups: bool | Omit = omit, + ipv6: bool | Omit = omit, + monitoring: bool | Omit = omit, + private_networking: bool | Omit = omit, + region: str | Omit = omit, + ssh_keys: SequenceNotStr[Union[str, int]] | Omit = omit, + tags: Optional[SequenceNotStr[str]] | Omit = omit, + user_data: str | Omit = omit, + volumes: SequenceNotStr[str] | Omit = omit, + vpc_uuid: str | Omit = omit, + with_droplet_agent: bool | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> GPUDropletCreateResponse: """ To create a new Droplet, send a POST request to `/v2/droplets` setting the @@ -330,24 +330,24 @@ def create( image: Union[str, int], names: SequenceNotStr[str], size: str, - backup_policy: DropletBackupPolicyParam | NotGiven = NOT_GIVEN, - backups: bool | NotGiven = NOT_GIVEN, - ipv6: bool | NotGiven = NOT_GIVEN, - monitoring: bool | NotGiven = NOT_GIVEN, - private_networking: bool | NotGiven = NOT_GIVEN, - region: str | NotGiven = NOT_GIVEN, - ssh_keys: SequenceNotStr[Union[str, int]] | NotGiven = NOT_GIVEN, - tags: Optional[SequenceNotStr[str]] | NotGiven = NOT_GIVEN, - user_data: str | NotGiven = NOT_GIVEN, - volumes: SequenceNotStr[str] | NotGiven = NOT_GIVEN, - vpc_uuid: str | NotGiven = NOT_GIVEN, - with_droplet_agent: bool | NotGiven = NOT_GIVEN, + backup_policy: DropletBackupPolicyParam | Omit = omit, + backups: bool | Omit = omit, + ipv6: bool | Omit = omit, + monitoring: bool | Omit = omit, + private_networking: bool | Omit = omit, + region: str | Omit = omit, + ssh_keys: SequenceNotStr[Union[str, int]] | Omit = omit, + tags: Optional[SequenceNotStr[str]] | Omit = omit, + user_data: str | Omit = omit, + volumes: SequenceNotStr[str] | Omit = omit, + vpc_uuid: str | Omit = omit, + with_droplet_agent: bool | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> GPUDropletCreateResponse: """ To create a new Droplet, send a POST request to `/v2/droplets` setting the @@ -450,27 +450,27 @@ def create( self, *, image: Union[str, int], - name: str | NotGiven = NOT_GIVEN, + name: str | Omit = omit, size: str, - backup_policy: DropletBackupPolicyParam | NotGiven = NOT_GIVEN, - backups: bool | NotGiven = NOT_GIVEN, - ipv6: bool | NotGiven = NOT_GIVEN, - monitoring: bool | NotGiven = NOT_GIVEN, - private_networking: bool | NotGiven = NOT_GIVEN, - region: str | NotGiven = NOT_GIVEN, - ssh_keys: SequenceNotStr[Union[str, int]] | NotGiven = NOT_GIVEN, - tags: Optional[SequenceNotStr[str]] | NotGiven = NOT_GIVEN, - user_data: str | NotGiven = NOT_GIVEN, - volumes: SequenceNotStr[str] | NotGiven = NOT_GIVEN, - vpc_uuid: str | NotGiven = NOT_GIVEN, - with_droplet_agent: bool | NotGiven = NOT_GIVEN, - names: SequenceNotStr[str] | NotGiven = NOT_GIVEN, + backup_policy: DropletBackupPolicyParam | Omit = omit, + backups: bool | Omit = omit, + ipv6: bool | Omit = omit, + monitoring: bool | Omit = omit, + private_networking: bool | Omit = omit, + region: str | Omit = omit, + ssh_keys: SequenceNotStr[Union[str, int]] | Omit = omit, + tags: Optional[SequenceNotStr[str]] | Omit = omit, + user_data: str | Omit = omit, + volumes: SequenceNotStr[str] | Omit = omit, + vpc_uuid: str | Omit = omit, + with_droplet_agent: bool | Omit = omit, + names: SequenceNotStr[str] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> GPUDropletCreateResponse: return cast( GPUDropletCreateResponse, @@ -515,7 +515,7 @@ def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> GPUDropletRetrieveResponse: """ To show information about an individual Droplet, send a GET request to @@ -543,17 +543,17 @@ def retrieve( def list( self, *, - name: str | NotGiven = NOT_GIVEN, - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, - tag_name: str | NotGiven = NOT_GIVEN, - type: Literal["droplets", "gpus"] | NotGiven = NOT_GIVEN, + name: str | Omit = omit, + page: int | Omit = omit, + per_page: int | Omit = omit, + tag_name: str | Omit = omit, + type: Literal["droplets", "gpus"] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> GPUDropletListResponse: """ To list all Droplets in your account, send a GET request to `/v2/droplets`. @@ -626,7 +626,7 @@ def delete( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> None: """ To delete a Droplet, send a DELETE request to `/v2/droplets/$DROPLET_ID`. @@ -663,7 +663,7 @@ def delete_by_tag( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> None: """ To delete **all** Droplets assigned to a specific tag, include the `tag_name` @@ -705,14 +705,14 @@ def list_firewalls( self, droplet_id: int, *, - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, + page: int | Omit = omit, + per_page: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> GPUDropletListFirewallsResponse: """ To retrieve a list of all firewalls available to a Droplet, send a GET request @@ -759,14 +759,14 @@ def list_kernels( self, droplet_id: int, *, - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, + page: int | Omit = omit, + per_page: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> GPUDropletListKernelsResponse: """ To retrieve a list of all kernels available to a Droplet, send a GET request to @@ -818,7 +818,7 @@ def list_neighbors( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> GPUDropletListNeighborsResponse: """To retrieve a list of any "neighbors" (i.e. @@ -854,14 +854,14 @@ def list_snapshots( self, droplet_id: int, *, - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, + page: int | Omit = omit, + per_page: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> GPUDropletListSnapshotsResponse: """ To retrieve the snapshots that have been created from a Droplet, send a GET @@ -980,24 +980,24 @@ async def create( image: Union[str, int], name: str, size: str, - backup_policy: DropletBackupPolicyParam | NotGiven = NOT_GIVEN, - backups: bool | NotGiven = NOT_GIVEN, - ipv6: bool | NotGiven = NOT_GIVEN, - monitoring: bool | NotGiven = NOT_GIVEN, - private_networking: bool | NotGiven = NOT_GIVEN, - region: str | NotGiven = NOT_GIVEN, - ssh_keys: SequenceNotStr[Union[str, int]] | NotGiven = NOT_GIVEN, - tags: Optional[SequenceNotStr[str]] | NotGiven = NOT_GIVEN, - user_data: str | NotGiven = NOT_GIVEN, - volumes: SequenceNotStr[str] | NotGiven = NOT_GIVEN, - vpc_uuid: str | NotGiven = NOT_GIVEN, - with_droplet_agent: bool | NotGiven = NOT_GIVEN, + backup_policy: DropletBackupPolicyParam | Omit = omit, + backups: bool | Omit = omit, + ipv6: bool | Omit = omit, + monitoring: bool | Omit = omit, + private_networking: bool | Omit = omit, + region: str | Omit = omit, + ssh_keys: SequenceNotStr[Union[str, int]] | Omit = omit, + tags: Optional[SequenceNotStr[str]] | Omit = omit, + user_data: str | Omit = omit, + volumes: SequenceNotStr[str] | Omit = omit, + vpc_uuid: str | Omit = omit, + with_droplet_agent: bool | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> GPUDropletCreateResponse: """ To create a new Droplet, send a POST request to `/v2/droplets` setting the @@ -1101,24 +1101,24 @@ async def create( image: Union[str, int], names: SequenceNotStr[str], size: str, - backup_policy: DropletBackupPolicyParam | NotGiven = NOT_GIVEN, - backups: bool | NotGiven = NOT_GIVEN, - ipv6: bool | NotGiven = NOT_GIVEN, - monitoring: bool | NotGiven = NOT_GIVEN, - private_networking: bool | NotGiven = NOT_GIVEN, - region: str | NotGiven = NOT_GIVEN, - ssh_keys: SequenceNotStr[Union[str, int]] | NotGiven = NOT_GIVEN, - tags: Optional[SequenceNotStr[str]] | NotGiven = NOT_GIVEN, - user_data: str | NotGiven = NOT_GIVEN, - volumes: SequenceNotStr[str] | NotGiven = NOT_GIVEN, - vpc_uuid: str | NotGiven = NOT_GIVEN, - with_droplet_agent: bool | NotGiven = NOT_GIVEN, + backup_policy: DropletBackupPolicyParam | Omit = omit, + backups: bool | Omit = omit, + ipv6: bool | Omit = omit, + monitoring: bool | Omit = omit, + private_networking: bool | Omit = omit, + region: str | Omit = omit, + ssh_keys: SequenceNotStr[Union[str, int]] | Omit = omit, + tags: Optional[SequenceNotStr[str]] | Omit = omit, + user_data: str | Omit = omit, + volumes: SequenceNotStr[str] | Omit = omit, + vpc_uuid: str | Omit = omit, + with_droplet_agent: bool | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> GPUDropletCreateResponse: """ To create a new Droplet, send a POST request to `/v2/droplets` setting the @@ -1221,27 +1221,27 @@ async def create( self, *, image: Union[str, int], - name: str | NotGiven = NOT_GIVEN, + name: str | Omit = omit, size: str, - backup_policy: DropletBackupPolicyParam | NotGiven = NOT_GIVEN, - backups: bool | NotGiven = NOT_GIVEN, - ipv6: bool | NotGiven = NOT_GIVEN, - monitoring: bool | NotGiven = NOT_GIVEN, - private_networking: bool | NotGiven = NOT_GIVEN, - region: str | NotGiven = NOT_GIVEN, - ssh_keys: SequenceNotStr[Union[str, int]] | NotGiven = NOT_GIVEN, - tags: Optional[SequenceNotStr[str]] | NotGiven = NOT_GIVEN, - user_data: str | NotGiven = NOT_GIVEN, - volumes: SequenceNotStr[str] | NotGiven = NOT_GIVEN, - vpc_uuid: str | NotGiven = NOT_GIVEN, - with_droplet_agent: bool | NotGiven = NOT_GIVEN, - names: SequenceNotStr[str] | NotGiven = NOT_GIVEN, + backup_policy: DropletBackupPolicyParam | Omit = omit, + backups: bool | Omit = omit, + ipv6: bool | Omit = omit, + monitoring: bool | Omit = omit, + private_networking: bool | Omit = omit, + region: str | Omit = omit, + ssh_keys: SequenceNotStr[Union[str, int]] | Omit = omit, + tags: Optional[SequenceNotStr[str]] | Omit = omit, + user_data: str | Omit = omit, + volumes: SequenceNotStr[str] | Omit = omit, + vpc_uuid: str | Omit = omit, + with_droplet_agent: bool | Omit = omit, + names: SequenceNotStr[str] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> GPUDropletCreateResponse: return cast( GPUDropletCreateResponse, @@ -1286,7 +1286,7 @@ async def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> GPUDropletRetrieveResponse: """ To show information about an individual Droplet, send a GET request to @@ -1314,17 +1314,17 @@ async def retrieve( async def list( self, *, - name: str | NotGiven = NOT_GIVEN, - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, - tag_name: str | NotGiven = NOT_GIVEN, - type: Literal["droplets", "gpus"] | NotGiven = NOT_GIVEN, + name: str | Omit = omit, + page: int | Omit = omit, + per_page: int | Omit = omit, + tag_name: str | Omit = omit, + type: Literal["droplets", "gpus"] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> GPUDropletListResponse: """ To list all Droplets in your account, send a GET request to `/v2/droplets`. @@ -1397,7 +1397,7 @@ async def delete( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> None: """ To delete a Droplet, send a DELETE request to `/v2/droplets/$DROPLET_ID`. @@ -1434,7 +1434,7 @@ async def delete_by_tag( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> None: """ To delete **all** Droplets assigned to a specific tag, include the `tag_name` @@ -1476,14 +1476,14 @@ async def list_firewalls( self, droplet_id: int, *, - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, + page: int | Omit = omit, + per_page: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> GPUDropletListFirewallsResponse: """ To retrieve a list of all firewalls available to a Droplet, send a GET request @@ -1530,14 +1530,14 @@ async def list_kernels( self, droplet_id: int, *, - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, + page: int | Omit = omit, + per_page: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> GPUDropletListKernelsResponse: """ To retrieve a list of all kernels available to a Droplet, send a GET request to @@ -1589,7 +1589,7 @@ async def list_neighbors( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> GPUDropletListNeighborsResponse: """To retrieve a list of any "neighbors" (i.e. @@ -1625,14 +1625,14 @@ async def list_snapshots( self, droplet_id: int, *, - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, + page: int | Omit = omit, + per_page: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> GPUDropletListSnapshotsResponse: """ To retrieve the snapshots that have been created from a Droplet, send a GET diff --git a/src/gradient/resources/gpu_droplets/images/actions.py b/src/gradient/resources/gpu_droplets/images/actions.py index 287558ca..d2d33f11 100644 --- a/src/gradient/resources/gpu_droplets/images/actions.py +++ b/src/gradient/resources/gpu_droplets/images/actions.py @@ -6,7 +6,7 @@ import httpx -from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ...._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from ...._utils import required_args, maybe_transform, async_maybe_transform from ...._compat import cached_property from ...._resource import SyncAPIResource, AsyncAPIResource @@ -55,7 +55,7 @@ def create( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> Action: """ The following actions are available on an Image. @@ -112,7 +112,7 @@ def create( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> Action: """ The following actions are available on an Image. @@ -167,13 +167,13 @@ def create( "tor1", "syd1", ] - | NotGiven = NOT_GIVEN, + | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> Action: return self._post( f"/v2/images/{image_id}/actions" @@ -202,7 +202,7 @@ def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> Action: """ To retrieve the status of an image action, send a GET request to @@ -236,7 +236,7 @@ def list( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ActionListResponse: """ To retrieve all actions that have been executed on an image, send a GET request @@ -293,7 +293,7 @@ async def create( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> Action: """ The following actions are available on an Image. @@ -350,7 +350,7 @@ async def create( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> Action: """ The following actions are available on an Image. @@ -405,13 +405,13 @@ async def create( "tor1", "syd1", ] - | NotGiven = NOT_GIVEN, + | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> Action: return await self._post( f"/v2/images/{image_id}/actions" @@ -440,7 +440,7 @@ async def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> Action: """ To retrieve the status of an image action, send a GET request to @@ -474,7 +474,7 @@ async def list( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ActionListResponse: """ To retrieve all actions that have been executed on an image, send a GET request diff --git a/src/gradient/resources/gpu_droplets/images/images.py b/src/gradient/resources/gpu_droplets/images/images.py index 1b00c024..83e04d13 100644 --- a/src/gradient/resources/gpu_droplets/images/images.py +++ b/src/gradient/resources/gpu_droplets/images/images.py @@ -15,7 +15,7 @@ ActionsResourceWithStreamingResponse, AsyncActionsResourceWithStreamingResponse, ) -from ...._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven, SequenceNotStr +from ...._types import Body, Omit, Query, Headers, NoneType, NotGiven, SequenceNotStr, omit, not_given from ...._utils import maybe_transform, async_maybe_transform from ...._compat import cached_property from ...._resource import SyncAPIResource, AsyncAPIResource @@ -62,7 +62,7 @@ def with_streaming_response(self) -> ImagesResourceWithStreamingResponse: def create( self, *, - description: str | NotGiven = NOT_GIVEN, + description: str | Omit = omit, distribution: Literal[ "Arch Linux", "CentOS", @@ -78,8 +78,8 @@ def create( "Ubuntu", "Unknown", ] - | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, + | Omit = omit, + name: str | Omit = omit, region: Literal[ "ams1", "ams2", @@ -97,15 +97,15 @@ def create( "tor1", "syd1", ] - | NotGiven = NOT_GIVEN, - tags: Optional[SequenceNotStr[str]] | NotGiven = NOT_GIVEN, - url: str | NotGiven = NOT_GIVEN, + | Omit = omit, + tags: Optional[SequenceNotStr[str]] | Omit = omit, + url: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ImageCreateResponse: """To create a new custom image, send a POST request to /v2/images. @@ -176,7 +176,7 @@ def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ImageRetrieveResponse: """ To retrieve information about an image, send a `GET` request to @@ -205,7 +205,7 @@ def update( self, image_id: int, *, - description: str | NotGiven = NOT_GIVEN, + description: str | Omit = omit, distribution: Literal[ "Arch Linux", "CentOS", @@ -221,14 +221,14 @@ def update( "Ubuntu", "Unknown", ] - | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, + | Omit = omit, + name: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ImageUpdateResponse: """To update an image, send a `PUT` request to `/v2/images/$IMAGE_ID`. @@ -277,17 +277,17 @@ def update( def list( self, *, - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, - private: bool | NotGiven = NOT_GIVEN, - tag_name: str | NotGiven = NOT_GIVEN, - type: Literal["application", "distribution"] | NotGiven = NOT_GIVEN, + page: int | Omit = omit, + per_page: int | Omit = omit, + private: bool | Omit = omit, + tag_name: str | Omit = omit, + type: Literal["application", "distribution"] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ImageListResponse: """ To list all of the images available on your account, send a GET request to @@ -374,7 +374,7 @@ def delete( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> None: """ To delete a snapshot or custom image, send a `DELETE` request to @@ -428,7 +428,7 @@ def with_streaming_response(self) -> AsyncImagesResourceWithStreamingResponse: async def create( self, *, - description: str | NotGiven = NOT_GIVEN, + description: str | Omit = omit, distribution: Literal[ "Arch Linux", "CentOS", @@ -444,8 +444,8 @@ async def create( "Ubuntu", "Unknown", ] - | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, + | Omit = omit, + name: str | Omit = omit, region: Literal[ "ams1", "ams2", @@ -463,15 +463,15 @@ async def create( "tor1", "syd1", ] - | NotGiven = NOT_GIVEN, - tags: Optional[SequenceNotStr[str]] | NotGiven = NOT_GIVEN, - url: str | NotGiven = NOT_GIVEN, + | Omit = omit, + tags: Optional[SequenceNotStr[str]] | Omit = omit, + url: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ImageCreateResponse: """To create a new custom image, send a POST request to /v2/images. @@ -542,7 +542,7 @@ async def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ImageRetrieveResponse: """ To retrieve information about an image, send a `GET` request to @@ -571,7 +571,7 @@ async def update( self, image_id: int, *, - description: str | NotGiven = NOT_GIVEN, + description: str | Omit = omit, distribution: Literal[ "Arch Linux", "CentOS", @@ -587,14 +587,14 @@ async def update( "Ubuntu", "Unknown", ] - | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, + | Omit = omit, + name: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ImageUpdateResponse: """To update an image, send a `PUT` request to `/v2/images/$IMAGE_ID`. @@ -643,17 +643,17 @@ async def update( async def list( self, *, - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, - private: bool | NotGiven = NOT_GIVEN, - tag_name: str | NotGiven = NOT_GIVEN, - type: Literal["application", "distribution"] | NotGiven = NOT_GIVEN, + page: int | Omit = omit, + per_page: int | Omit = omit, + private: bool | Omit = omit, + tag_name: str | Omit = omit, + type: Literal["application", "distribution"] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ImageListResponse: """ To list all of the images available on your account, send a GET request to @@ -740,7 +740,7 @@ async def delete( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> None: """ To delete a snapshot or custom image, send a `DELETE` request to diff --git a/src/gradient/resources/gpu_droplets/load_balancers/droplets.py b/src/gradient/resources/gpu_droplets/load_balancers/droplets.py index 4d8eb4c5..ddcdc63a 100644 --- a/src/gradient/resources/gpu_droplets/load_balancers/droplets.py +++ b/src/gradient/resources/gpu_droplets/load_balancers/droplets.py @@ -6,7 +6,7 @@ import httpx -from ...._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven +from ...._types import Body, Query, Headers, NoneType, NotGiven, not_given from ...._utils import maybe_transform, async_maybe_transform from ...._compat import cached_property from ...._resource import SyncAPIResource, AsyncAPIResource @@ -52,7 +52,7 @@ def add( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> None: """ To assign a Droplet to a load balancer instance, send a POST request to @@ -101,7 +101,7 @@ def remove( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> None: """ To remove a Droplet from a load balancer instance, send a DELETE request to @@ -168,7 +168,7 @@ async def add( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> None: """ To assign a Droplet to a load balancer instance, send a POST request to @@ -217,7 +217,7 @@ async def remove( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> None: """ To remove a Droplet from a load balancer instance, send a DELETE request to diff --git a/src/gradient/resources/gpu_droplets/load_balancers/forwarding_rules.py b/src/gradient/resources/gpu_droplets/load_balancers/forwarding_rules.py index c4be65e7..8f9092e0 100644 --- a/src/gradient/resources/gpu_droplets/load_balancers/forwarding_rules.py +++ b/src/gradient/resources/gpu_droplets/load_balancers/forwarding_rules.py @@ -6,7 +6,7 @@ import httpx -from ...._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven +from ...._types import Body, Query, Headers, NoneType, NotGiven, not_given from ...._utils import maybe_transform, async_maybe_transform from ...._compat import cached_property from ...._resource import SyncAPIResource, AsyncAPIResource @@ -53,7 +53,7 @@ def add( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> None: """ To add an additional forwarding rule to a load balancer instance, send a POST @@ -100,7 +100,7 @@ def remove( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> None: """ To remove forwarding rules from a load balancer instance, send a DELETE request @@ -168,7 +168,7 @@ async def add( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> None: """ To add an additional forwarding rule to a load balancer instance, send a POST @@ -215,7 +215,7 @@ async def remove( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> None: """ To remove forwarding rules from a load balancer instance, send a DELETE request diff --git a/src/gradient/resources/gpu_droplets/load_balancers/load_balancers.py b/src/gradient/resources/gpu_droplets/load_balancers/load_balancers.py index 8f11a5da..2a1e52d9 100644 --- a/src/gradient/resources/gpu_droplets/load_balancers/load_balancers.py +++ b/src/gradient/resources/gpu_droplets/load_balancers/load_balancers.py @@ -15,7 +15,7 @@ DropletsResourceWithStreamingResponse, AsyncDropletsResourceWithStreamingResponse, ) -from ...._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven, SequenceNotStr +from ...._types import Body, Omit, Query, Headers, NoneType, NotGiven, SequenceNotStr, omit, not_given from ...._utils import required_args, maybe_transform, async_maybe_transform from ...._compat import cached_property from ...._resource import SyncAPIResource, AsyncAPIResource @@ -86,21 +86,21 @@ def create( self, *, forwarding_rules: Iterable[ForwardingRuleParam], - algorithm: Literal["round_robin", "least_connections"] | NotGiven = NOT_GIVEN, - disable_lets_encrypt_dns_records: bool | NotGiven = NOT_GIVEN, - domains: Iterable[DomainsParam] | NotGiven = NOT_GIVEN, - droplet_ids: Iterable[int] | NotGiven = NOT_GIVEN, - enable_backend_keepalive: bool | NotGiven = NOT_GIVEN, - enable_proxy_protocol: bool | NotGiven = NOT_GIVEN, - firewall: LbFirewallParam | NotGiven = NOT_GIVEN, - glb_settings: GlbSettingsParam | NotGiven = NOT_GIVEN, - health_check: HealthCheckParam | NotGiven = NOT_GIVEN, - http_idle_timeout_seconds: int | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, - network: Literal["EXTERNAL", "INTERNAL"] | NotGiven = NOT_GIVEN, - network_stack: Literal["IPV4", "DUALSTACK"] | NotGiven = NOT_GIVEN, - project_id: str | NotGiven = NOT_GIVEN, - redirect_http_to_https: bool | NotGiven = NOT_GIVEN, + algorithm: Literal["round_robin", "least_connections"] | Omit = omit, + disable_lets_encrypt_dns_records: bool | Omit = omit, + domains: Iterable[DomainsParam] | Omit = omit, + droplet_ids: Iterable[int] | Omit = omit, + enable_backend_keepalive: bool | Omit = omit, + enable_proxy_protocol: bool | Omit = omit, + firewall: LbFirewallParam | Omit = omit, + glb_settings: GlbSettingsParam | Omit = omit, + health_check: HealthCheckParam | Omit = omit, + http_idle_timeout_seconds: int | Omit = omit, + name: str | Omit = omit, + network: Literal["EXTERNAL", "INTERNAL"] | Omit = omit, + network_stack: Literal["IPV4", "DUALSTACK"] | Omit = omit, + project_id: str | Omit = omit, + redirect_http_to_https: bool | Omit = omit, region: Literal[ "ams1", "ams2", @@ -118,20 +118,20 @@ def create( "tor1", "syd1", ] - | NotGiven = NOT_GIVEN, - size: Literal["lb-small", "lb-medium", "lb-large"] | NotGiven = NOT_GIVEN, - size_unit: int | NotGiven = NOT_GIVEN, - sticky_sessions: StickySessionsParam | NotGiven = NOT_GIVEN, - target_load_balancer_ids: SequenceNotStr[str] | NotGiven = NOT_GIVEN, - tls_cipher_policy: Literal["DEFAULT", "STRONG"] | NotGiven = NOT_GIVEN, - type: Literal["REGIONAL", "REGIONAL_NETWORK", "GLOBAL"] | NotGiven = NOT_GIVEN, - vpc_uuid: str | NotGiven = NOT_GIVEN, + | Omit = omit, + size: Literal["lb-small", "lb-medium", "lb-large"] | Omit = omit, + size_unit: int | Omit = omit, + sticky_sessions: StickySessionsParam | Omit = omit, + target_load_balancer_ids: SequenceNotStr[str] | Omit = omit, + tls_cipher_policy: Literal["DEFAULT", "STRONG"] | Omit = omit, + type: Literal["REGIONAL", "REGIONAL_NETWORK", "GLOBAL"] | Omit = omit, + vpc_uuid: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> LoadBalancerCreateResponse: """ To create a new load balancer instance, send a POST request to @@ -245,20 +245,20 @@ def create( self, *, forwarding_rules: Iterable[ForwardingRuleParam], - algorithm: Literal["round_robin", "least_connections"] | NotGiven = NOT_GIVEN, - disable_lets_encrypt_dns_records: bool | NotGiven = NOT_GIVEN, - domains: Iterable[DomainsParam] | NotGiven = NOT_GIVEN, - enable_backend_keepalive: bool | NotGiven = NOT_GIVEN, - enable_proxy_protocol: bool | NotGiven = NOT_GIVEN, - firewall: LbFirewallParam | NotGiven = NOT_GIVEN, - glb_settings: GlbSettingsParam | NotGiven = NOT_GIVEN, - health_check: HealthCheckParam | NotGiven = NOT_GIVEN, - http_idle_timeout_seconds: int | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, - network: Literal["EXTERNAL", "INTERNAL"] | NotGiven = NOT_GIVEN, - network_stack: Literal["IPV4", "DUALSTACK"] | NotGiven = NOT_GIVEN, - project_id: str | NotGiven = NOT_GIVEN, - redirect_http_to_https: bool | NotGiven = NOT_GIVEN, + algorithm: Literal["round_robin", "least_connections"] | Omit = omit, + disable_lets_encrypt_dns_records: bool | Omit = omit, + domains: Iterable[DomainsParam] | Omit = omit, + enable_backend_keepalive: bool | Omit = omit, + enable_proxy_protocol: bool | Omit = omit, + firewall: LbFirewallParam | Omit = omit, + glb_settings: GlbSettingsParam | Omit = omit, + health_check: HealthCheckParam | Omit = omit, + http_idle_timeout_seconds: int | Omit = omit, + name: str | Omit = omit, + network: Literal["EXTERNAL", "INTERNAL"] | Omit = omit, + network_stack: Literal["IPV4", "DUALSTACK"] | Omit = omit, + project_id: str | Omit = omit, + redirect_http_to_https: bool | Omit = omit, region: Literal[ "ams1", "ams2", @@ -276,21 +276,21 @@ def create( "tor1", "syd1", ] - | NotGiven = NOT_GIVEN, - size: Literal["lb-small", "lb-medium", "lb-large"] | NotGiven = NOT_GIVEN, - size_unit: int | NotGiven = NOT_GIVEN, - sticky_sessions: StickySessionsParam | NotGiven = NOT_GIVEN, - tag: str | NotGiven = NOT_GIVEN, - target_load_balancer_ids: SequenceNotStr[str] | NotGiven = NOT_GIVEN, - tls_cipher_policy: Literal["DEFAULT", "STRONG"] | NotGiven = NOT_GIVEN, - type: Literal["REGIONAL", "REGIONAL_NETWORK", "GLOBAL"] | NotGiven = NOT_GIVEN, - vpc_uuid: str | NotGiven = NOT_GIVEN, + | Omit = omit, + size: Literal["lb-small", "lb-medium", "lb-large"] | Omit = omit, + size_unit: int | Omit = omit, + sticky_sessions: StickySessionsParam | Omit = omit, + tag: str | Omit = omit, + target_load_balancer_ids: SequenceNotStr[str] | Omit = omit, + tls_cipher_policy: Literal["DEFAULT", "STRONG"] | Omit = omit, + type: Literal["REGIONAL", "REGIONAL_NETWORK", "GLOBAL"] | Omit = omit, + vpc_uuid: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> LoadBalancerCreateResponse: """ To create a new load balancer instance, send a POST request to @@ -405,21 +405,21 @@ def create( self, *, forwarding_rules: Iterable[ForwardingRuleParam], - algorithm: Literal["round_robin", "least_connections"] | NotGiven = NOT_GIVEN, - disable_lets_encrypt_dns_records: bool | NotGiven = NOT_GIVEN, - domains: Iterable[DomainsParam] | NotGiven = NOT_GIVEN, - droplet_ids: Iterable[int] | NotGiven = NOT_GIVEN, - enable_backend_keepalive: bool | NotGiven = NOT_GIVEN, - enable_proxy_protocol: bool | NotGiven = NOT_GIVEN, - firewall: LbFirewallParam | NotGiven = NOT_GIVEN, - glb_settings: GlbSettingsParam | NotGiven = NOT_GIVEN, - health_check: HealthCheckParam | NotGiven = NOT_GIVEN, - http_idle_timeout_seconds: int | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, - network: Literal["EXTERNAL", "INTERNAL"] | NotGiven = NOT_GIVEN, - network_stack: Literal["IPV4", "DUALSTACK"] | NotGiven = NOT_GIVEN, - project_id: str | NotGiven = NOT_GIVEN, - redirect_http_to_https: bool | NotGiven = NOT_GIVEN, + algorithm: Literal["round_robin", "least_connections"] | Omit = omit, + disable_lets_encrypt_dns_records: bool | Omit = omit, + domains: Iterable[DomainsParam] | Omit = omit, + droplet_ids: Iterable[int] | Omit = omit, + enable_backend_keepalive: bool | Omit = omit, + enable_proxy_protocol: bool | Omit = omit, + firewall: LbFirewallParam | Omit = omit, + glb_settings: GlbSettingsParam | Omit = omit, + health_check: HealthCheckParam | Omit = omit, + http_idle_timeout_seconds: int | Omit = omit, + name: str | Omit = omit, + network: Literal["EXTERNAL", "INTERNAL"] | Omit = omit, + network_stack: Literal["IPV4", "DUALSTACK"] | Omit = omit, + project_id: str | Omit = omit, + redirect_http_to_https: bool | Omit = omit, region: Literal[ "ams1", "ams2", @@ -437,21 +437,21 @@ def create( "tor1", "syd1", ] - | NotGiven = NOT_GIVEN, - size: Literal["lb-small", "lb-medium", "lb-large"] | NotGiven = NOT_GIVEN, - size_unit: int | NotGiven = NOT_GIVEN, - sticky_sessions: StickySessionsParam | NotGiven = NOT_GIVEN, - target_load_balancer_ids: SequenceNotStr[str] | NotGiven = NOT_GIVEN, - tls_cipher_policy: Literal["DEFAULT", "STRONG"] | NotGiven = NOT_GIVEN, - type: Literal["REGIONAL", "REGIONAL_NETWORK", "GLOBAL"] | NotGiven = NOT_GIVEN, - vpc_uuid: str | NotGiven = NOT_GIVEN, - tag: str | NotGiven = NOT_GIVEN, + | Omit = omit, + size: Literal["lb-small", "lb-medium", "lb-large"] | Omit = omit, + size_unit: int | Omit = omit, + sticky_sessions: StickySessionsParam | Omit = omit, + target_load_balancer_ids: SequenceNotStr[str] | Omit = omit, + tls_cipher_policy: Literal["DEFAULT", "STRONG"] | Omit = omit, + type: Literal["REGIONAL", "REGIONAL_NETWORK", "GLOBAL"] | Omit = omit, + vpc_uuid: str | Omit = omit, + tag: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> LoadBalancerCreateResponse: return self._post( "/v2/load_balancers" @@ -502,7 +502,7 @@ def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> LoadBalancerRetrieveResponse: """ To show information about a load balancer instance, send a GET request to @@ -535,21 +535,21 @@ def update( lb_id: str, *, forwarding_rules: Iterable[ForwardingRuleParam], - algorithm: Literal["round_robin", "least_connections"] | NotGiven = NOT_GIVEN, - disable_lets_encrypt_dns_records: bool | NotGiven = NOT_GIVEN, - domains: Iterable[DomainsParam] | NotGiven = NOT_GIVEN, - droplet_ids: Iterable[int] | NotGiven = NOT_GIVEN, - enable_backend_keepalive: bool | NotGiven = NOT_GIVEN, - enable_proxy_protocol: bool | NotGiven = NOT_GIVEN, - firewall: LbFirewallParam | NotGiven = NOT_GIVEN, - glb_settings: GlbSettingsParam | NotGiven = NOT_GIVEN, - health_check: HealthCheckParam | NotGiven = NOT_GIVEN, - http_idle_timeout_seconds: int | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, - network: Literal["EXTERNAL", "INTERNAL"] | NotGiven = NOT_GIVEN, - network_stack: Literal["IPV4", "DUALSTACK"] | NotGiven = NOT_GIVEN, - project_id: str | NotGiven = NOT_GIVEN, - redirect_http_to_https: bool | NotGiven = NOT_GIVEN, + algorithm: Literal["round_robin", "least_connections"] | Omit = omit, + disable_lets_encrypt_dns_records: bool | Omit = omit, + domains: Iterable[DomainsParam] | Omit = omit, + droplet_ids: Iterable[int] | Omit = omit, + enable_backend_keepalive: bool | Omit = omit, + enable_proxy_protocol: bool | Omit = omit, + firewall: LbFirewallParam | Omit = omit, + glb_settings: GlbSettingsParam | Omit = omit, + health_check: HealthCheckParam | Omit = omit, + http_idle_timeout_seconds: int | Omit = omit, + name: str | Omit = omit, + network: Literal["EXTERNAL", "INTERNAL"] | Omit = omit, + network_stack: Literal["IPV4", "DUALSTACK"] | Omit = omit, + project_id: str | Omit = omit, + redirect_http_to_https: bool | Omit = omit, region: Literal[ "ams1", "ams2", @@ -567,20 +567,20 @@ def update( "tor1", "syd1", ] - | NotGiven = NOT_GIVEN, - size: Literal["lb-small", "lb-medium", "lb-large"] | NotGiven = NOT_GIVEN, - size_unit: int | NotGiven = NOT_GIVEN, - sticky_sessions: StickySessionsParam | NotGiven = NOT_GIVEN, - target_load_balancer_ids: SequenceNotStr[str] | NotGiven = NOT_GIVEN, - tls_cipher_policy: Literal["DEFAULT", "STRONG"] | NotGiven = NOT_GIVEN, - type: Literal["REGIONAL", "REGIONAL_NETWORK", "GLOBAL"] | NotGiven = NOT_GIVEN, - vpc_uuid: str | NotGiven = NOT_GIVEN, + | Omit = omit, + size: Literal["lb-small", "lb-medium", "lb-large"] | Omit = omit, + size_unit: int | Omit = omit, + sticky_sessions: StickySessionsParam | Omit = omit, + target_load_balancer_ids: SequenceNotStr[str] | Omit = omit, + tls_cipher_policy: Literal["DEFAULT", "STRONG"] | Omit = omit, + type: Literal["REGIONAL", "REGIONAL_NETWORK", "GLOBAL"] | Omit = omit, + vpc_uuid: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> LoadBalancerUpdateResponse: """ To update a load balancer's settings, send a PUT request to @@ -689,20 +689,20 @@ def update( lb_id: str, *, forwarding_rules: Iterable[ForwardingRuleParam], - algorithm: Literal["round_robin", "least_connections"] | NotGiven = NOT_GIVEN, - disable_lets_encrypt_dns_records: bool | NotGiven = NOT_GIVEN, - domains: Iterable[DomainsParam] | NotGiven = NOT_GIVEN, - enable_backend_keepalive: bool | NotGiven = NOT_GIVEN, - enable_proxy_protocol: bool | NotGiven = NOT_GIVEN, - firewall: LbFirewallParam | NotGiven = NOT_GIVEN, - glb_settings: GlbSettingsParam | NotGiven = NOT_GIVEN, - health_check: HealthCheckParam | NotGiven = NOT_GIVEN, - http_idle_timeout_seconds: int | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, - network: Literal["EXTERNAL", "INTERNAL"] | NotGiven = NOT_GIVEN, - network_stack: Literal["IPV4", "DUALSTACK"] | NotGiven = NOT_GIVEN, - project_id: str | NotGiven = NOT_GIVEN, - redirect_http_to_https: bool | NotGiven = NOT_GIVEN, + algorithm: Literal["round_robin", "least_connections"] | Omit = omit, + disable_lets_encrypt_dns_records: bool | Omit = omit, + domains: Iterable[DomainsParam] | Omit = omit, + enable_backend_keepalive: bool | Omit = omit, + enable_proxy_protocol: bool | Omit = omit, + firewall: LbFirewallParam | Omit = omit, + glb_settings: GlbSettingsParam | Omit = omit, + health_check: HealthCheckParam | Omit = omit, + http_idle_timeout_seconds: int | Omit = omit, + name: str | Omit = omit, + network: Literal["EXTERNAL", "INTERNAL"] | Omit = omit, + network_stack: Literal["IPV4", "DUALSTACK"] | Omit = omit, + project_id: str | Omit = omit, + redirect_http_to_https: bool | Omit = omit, region: Literal[ "ams1", "ams2", @@ -720,21 +720,21 @@ def update( "tor1", "syd1", ] - | NotGiven = NOT_GIVEN, - size: Literal["lb-small", "lb-medium", "lb-large"] | NotGiven = NOT_GIVEN, - size_unit: int | NotGiven = NOT_GIVEN, - sticky_sessions: StickySessionsParam | NotGiven = NOT_GIVEN, - tag: str | NotGiven = NOT_GIVEN, - target_load_balancer_ids: SequenceNotStr[str] | NotGiven = NOT_GIVEN, - tls_cipher_policy: Literal["DEFAULT", "STRONG"] | NotGiven = NOT_GIVEN, - type: Literal["REGIONAL", "REGIONAL_NETWORK", "GLOBAL"] | NotGiven = NOT_GIVEN, - vpc_uuid: str | NotGiven = NOT_GIVEN, + | Omit = omit, + size: Literal["lb-small", "lb-medium", "lb-large"] | Omit = omit, + size_unit: int | Omit = omit, + sticky_sessions: StickySessionsParam | Omit = omit, + tag: str | Omit = omit, + target_load_balancer_ids: SequenceNotStr[str] | Omit = omit, + tls_cipher_policy: Literal["DEFAULT", "STRONG"] | Omit = omit, + type: Literal["REGIONAL", "REGIONAL_NETWORK", "GLOBAL"] | Omit = omit, + vpc_uuid: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> LoadBalancerUpdateResponse: """ To update a load balancer's settings, send a PUT request to @@ -844,21 +844,21 @@ def update( lb_id: str, *, forwarding_rules: Iterable[ForwardingRuleParam], - algorithm: Literal["round_robin", "least_connections"] | NotGiven = NOT_GIVEN, - disable_lets_encrypt_dns_records: bool | NotGiven = NOT_GIVEN, - domains: Iterable[DomainsParam] | NotGiven = NOT_GIVEN, - droplet_ids: Iterable[int] | NotGiven = NOT_GIVEN, - enable_backend_keepalive: bool | NotGiven = NOT_GIVEN, - enable_proxy_protocol: bool | NotGiven = NOT_GIVEN, - firewall: LbFirewallParam | NotGiven = NOT_GIVEN, - glb_settings: GlbSettingsParam | NotGiven = NOT_GIVEN, - health_check: HealthCheckParam | NotGiven = NOT_GIVEN, - http_idle_timeout_seconds: int | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, - network: Literal["EXTERNAL", "INTERNAL"] | NotGiven = NOT_GIVEN, - network_stack: Literal["IPV4", "DUALSTACK"] | NotGiven = NOT_GIVEN, - project_id: str | NotGiven = NOT_GIVEN, - redirect_http_to_https: bool | NotGiven = NOT_GIVEN, + algorithm: Literal["round_robin", "least_connections"] | Omit = omit, + disable_lets_encrypt_dns_records: bool | Omit = omit, + domains: Iterable[DomainsParam] | Omit = omit, + droplet_ids: Iterable[int] | Omit = omit, + enable_backend_keepalive: bool | Omit = omit, + enable_proxy_protocol: bool | Omit = omit, + firewall: LbFirewallParam | Omit = omit, + glb_settings: GlbSettingsParam | Omit = omit, + health_check: HealthCheckParam | Omit = omit, + http_idle_timeout_seconds: int | Omit = omit, + name: str | Omit = omit, + network: Literal["EXTERNAL", "INTERNAL"] | Omit = omit, + network_stack: Literal["IPV4", "DUALSTACK"] | Omit = omit, + project_id: str | Omit = omit, + redirect_http_to_https: bool | Omit = omit, region: Literal[ "ams1", "ams2", @@ -876,21 +876,21 @@ def update( "tor1", "syd1", ] - | NotGiven = NOT_GIVEN, - size: Literal["lb-small", "lb-medium", "lb-large"] | NotGiven = NOT_GIVEN, - size_unit: int | NotGiven = NOT_GIVEN, - sticky_sessions: StickySessionsParam | NotGiven = NOT_GIVEN, - target_load_balancer_ids: SequenceNotStr[str] | NotGiven = NOT_GIVEN, - tls_cipher_policy: Literal["DEFAULT", "STRONG"] | NotGiven = NOT_GIVEN, - type: Literal["REGIONAL", "REGIONAL_NETWORK", "GLOBAL"] | NotGiven = NOT_GIVEN, - vpc_uuid: str | NotGiven = NOT_GIVEN, - tag: str | NotGiven = NOT_GIVEN, + | Omit = omit, + size: Literal["lb-small", "lb-medium", "lb-large"] | Omit = omit, + size_unit: int | Omit = omit, + sticky_sessions: StickySessionsParam | Omit = omit, + target_load_balancer_ids: SequenceNotStr[str] | Omit = omit, + tls_cipher_policy: Literal["DEFAULT", "STRONG"] | Omit = omit, + type: Literal["REGIONAL", "REGIONAL_NETWORK", "GLOBAL"] | Omit = omit, + vpc_uuid: str | Omit = omit, + tag: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> LoadBalancerUpdateResponse: if not lb_id: raise ValueError(f"Expected a non-empty value for `lb_id` but received {lb_id!r}") @@ -937,14 +937,14 @@ def update( def list( self, *, - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, + page: int | Omit = omit, + per_page: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> LoadBalancerListResponse: """ To list all of the load balancer instances on your account, send a GET request @@ -992,7 +992,7 @@ def delete( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> None: """ To delete a load balancer instance, disassociating any Droplets assigned to it @@ -1033,7 +1033,7 @@ def delete_cache( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> None: """ To delete a Global load balancer CDN cache, send a DELETE request to @@ -1098,21 +1098,21 @@ async def create( self, *, forwarding_rules: Iterable[ForwardingRuleParam], - algorithm: Literal["round_robin", "least_connections"] | NotGiven = NOT_GIVEN, - disable_lets_encrypt_dns_records: bool | NotGiven = NOT_GIVEN, - domains: Iterable[DomainsParam] | NotGiven = NOT_GIVEN, - droplet_ids: Iterable[int] | NotGiven = NOT_GIVEN, - enable_backend_keepalive: bool | NotGiven = NOT_GIVEN, - enable_proxy_protocol: bool | NotGiven = NOT_GIVEN, - firewall: LbFirewallParam | NotGiven = NOT_GIVEN, - glb_settings: GlbSettingsParam | NotGiven = NOT_GIVEN, - health_check: HealthCheckParam | NotGiven = NOT_GIVEN, - http_idle_timeout_seconds: int | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, - network: Literal["EXTERNAL", "INTERNAL"] | NotGiven = NOT_GIVEN, - network_stack: Literal["IPV4", "DUALSTACK"] | NotGiven = NOT_GIVEN, - project_id: str | NotGiven = NOT_GIVEN, - redirect_http_to_https: bool | NotGiven = NOT_GIVEN, + algorithm: Literal["round_robin", "least_connections"] | Omit = omit, + disable_lets_encrypt_dns_records: bool | Omit = omit, + domains: Iterable[DomainsParam] | Omit = omit, + droplet_ids: Iterable[int] | Omit = omit, + enable_backend_keepalive: bool | Omit = omit, + enable_proxy_protocol: bool | Omit = omit, + firewall: LbFirewallParam | Omit = omit, + glb_settings: GlbSettingsParam | Omit = omit, + health_check: HealthCheckParam | Omit = omit, + http_idle_timeout_seconds: int | Omit = omit, + name: str | Omit = omit, + network: Literal["EXTERNAL", "INTERNAL"] | Omit = omit, + network_stack: Literal["IPV4", "DUALSTACK"] | Omit = omit, + project_id: str | Omit = omit, + redirect_http_to_https: bool | Omit = omit, region: Literal[ "ams1", "ams2", @@ -1130,20 +1130,20 @@ async def create( "tor1", "syd1", ] - | NotGiven = NOT_GIVEN, - size: Literal["lb-small", "lb-medium", "lb-large"] | NotGiven = NOT_GIVEN, - size_unit: int | NotGiven = NOT_GIVEN, - sticky_sessions: StickySessionsParam | NotGiven = NOT_GIVEN, - target_load_balancer_ids: SequenceNotStr[str] | NotGiven = NOT_GIVEN, - tls_cipher_policy: Literal["DEFAULT", "STRONG"] | NotGiven = NOT_GIVEN, - type: Literal["REGIONAL", "REGIONAL_NETWORK", "GLOBAL"] | NotGiven = NOT_GIVEN, - vpc_uuid: str | NotGiven = NOT_GIVEN, + | Omit = omit, + size: Literal["lb-small", "lb-medium", "lb-large"] | Omit = omit, + size_unit: int | Omit = omit, + sticky_sessions: StickySessionsParam | Omit = omit, + target_load_balancer_ids: SequenceNotStr[str] | Omit = omit, + tls_cipher_policy: Literal["DEFAULT", "STRONG"] | Omit = omit, + type: Literal["REGIONAL", "REGIONAL_NETWORK", "GLOBAL"] | Omit = omit, + vpc_uuid: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> LoadBalancerCreateResponse: """ To create a new load balancer instance, send a POST request to @@ -1257,20 +1257,20 @@ async def create( self, *, forwarding_rules: Iterable[ForwardingRuleParam], - algorithm: Literal["round_robin", "least_connections"] | NotGiven = NOT_GIVEN, - disable_lets_encrypt_dns_records: bool | NotGiven = NOT_GIVEN, - domains: Iterable[DomainsParam] | NotGiven = NOT_GIVEN, - enable_backend_keepalive: bool | NotGiven = NOT_GIVEN, - enable_proxy_protocol: bool | NotGiven = NOT_GIVEN, - firewall: LbFirewallParam | NotGiven = NOT_GIVEN, - glb_settings: GlbSettingsParam | NotGiven = NOT_GIVEN, - health_check: HealthCheckParam | NotGiven = NOT_GIVEN, - http_idle_timeout_seconds: int | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, - network: Literal["EXTERNAL", "INTERNAL"] | NotGiven = NOT_GIVEN, - network_stack: Literal["IPV4", "DUALSTACK"] | NotGiven = NOT_GIVEN, - project_id: str | NotGiven = NOT_GIVEN, - redirect_http_to_https: bool | NotGiven = NOT_GIVEN, + algorithm: Literal["round_robin", "least_connections"] | Omit = omit, + disable_lets_encrypt_dns_records: bool | Omit = omit, + domains: Iterable[DomainsParam] | Omit = omit, + enable_backend_keepalive: bool | Omit = omit, + enable_proxy_protocol: bool | Omit = omit, + firewall: LbFirewallParam | Omit = omit, + glb_settings: GlbSettingsParam | Omit = omit, + health_check: HealthCheckParam | Omit = omit, + http_idle_timeout_seconds: int | Omit = omit, + name: str | Omit = omit, + network: Literal["EXTERNAL", "INTERNAL"] | Omit = omit, + network_stack: Literal["IPV4", "DUALSTACK"] | Omit = omit, + project_id: str | Omit = omit, + redirect_http_to_https: bool | Omit = omit, region: Literal[ "ams1", "ams2", @@ -1288,21 +1288,21 @@ async def create( "tor1", "syd1", ] - | NotGiven = NOT_GIVEN, - size: Literal["lb-small", "lb-medium", "lb-large"] | NotGiven = NOT_GIVEN, - size_unit: int | NotGiven = NOT_GIVEN, - sticky_sessions: StickySessionsParam | NotGiven = NOT_GIVEN, - tag: str | NotGiven = NOT_GIVEN, - target_load_balancer_ids: SequenceNotStr[str] | NotGiven = NOT_GIVEN, - tls_cipher_policy: Literal["DEFAULT", "STRONG"] | NotGiven = NOT_GIVEN, - type: Literal["REGIONAL", "REGIONAL_NETWORK", "GLOBAL"] | NotGiven = NOT_GIVEN, - vpc_uuid: str | NotGiven = NOT_GIVEN, + | Omit = omit, + size: Literal["lb-small", "lb-medium", "lb-large"] | Omit = omit, + size_unit: int | Omit = omit, + sticky_sessions: StickySessionsParam | Omit = omit, + tag: str | Omit = omit, + target_load_balancer_ids: SequenceNotStr[str] | Omit = omit, + tls_cipher_policy: Literal["DEFAULT", "STRONG"] | Omit = omit, + type: Literal["REGIONAL", "REGIONAL_NETWORK", "GLOBAL"] | Omit = omit, + vpc_uuid: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> LoadBalancerCreateResponse: """ To create a new load balancer instance, send a POST request to @@ -1417,21 +1417,21 @@ async def create( self, *, forwarding_rules: Iterable[ForwardingRuleParam], - algorithm: Literal["round_robin", "least_connections"] | NotGiven = NOT_GIVEN, - disable_lets_encrypt_dns_records: bool | NotGiven = NOT_GIVEN, - domains: Iterable[DomainsParam] | NotGiven = NOT_GIVEN, - droplet_ids: Iterable[int] | NotGiven = NOT_GIVEN, - enable_backend_keepalive: bool | NotGiven = NOT_GIVEN, - enable_proxy_protocol: bool | NotGiven = NOT_GIVEN, - firewall: LbFirewallParam | NotGiven = NOT_GIVEN, - glb_settings: GlbSettingsParam | NotGiven = NOT_GIVEN, - health_check: HealthCheckParam | NotGiven = NOT_GIVEN, - http_idle_timeout_seconds: int | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, - network: Literal["EXTERNAL", "INTERNAL"] | NotGiven = NOT_GIVEN, - network_stack: Literal["IPV4", "DUALSTACK"] | NotGiven = NOT_GIVEN, - project_id: str | NotGiven = NOT_GIVEN, - redirect_http_to_https: bool | NotGiven = NOT_GIVEN, + algorithm: Literal["round_robin", "least_connections"] | Omit = omit, + disable_lets_encrypt_dns_records: bool | Omit = omit, + domains: Iterable[DomainsParam] | Omit = omit, + droplet_ids: Iterable[int] | Omit = omit, + enable_backend_keepalive: bool | Omit = omit, + enable_proxy_protocol: bool | Omit = omit, + firewall: LbFirewallParam | Omit = omit, + glb_settings: GlbSettingsParam | Omit = omit, + health_check: HealthCheckParam | Omit = omit, + http_idle_timeout_seconds: int | Omit = omit, + name: str | Omit = omit, + network: Literal["EXTERNAL", "INTERNAL"] | Omit = omit, + network_stack: Literal["IPV4", "DUALSTACK"] | Omit = omit, + project_id: str | Omit = omit, + redirect_http_to_https: bool | Omit = omit, region: Literal[ "ams1", "ams2", @@ -1449,21 +1449,21 @@ async def create( "tor1", "syd1", ] - | NotGiven = NOT_GIVEN, - size: Literal["lb-small", "lb-medium", "lb-large"] | NotGiven = NOT_GIVEN, - size_unit: int | NotGiven = NOT_GIVEN, - sticky_sessions: StickySessionsParam | NotGiven = NOT_GIVEN, - target_load_balancer_ids: SequenceNotStr[str] | NotGiven = NOT_GIVEN, - tls_cipher_policy: Literal["DEFAULT", "STRONG"] | NotGiven = NOT_GIVEN, - type: Literal["REGIONAL", "REGIONAL_NETWORK", "GLOBAL"] | NotGiven = NOT_GIVEN, - vpc_uuid: str | NotGiven = NOT_GIVEN, - tag: str | NotGiven = NOT_GIVEN, + | Omit = omit, + size: Literal["lb-small", "lb-medium", "lb-large"] | Omit = omit, + size_unit: int | Omit = omit, + sticky_sessions: StickySessionsParam | Omit = omit, + target_load_balancer_ids: SequenceNotStr[str] | Omit = omit, + tls_cipher_policy: Literal["DEFAULT", "STRONG"] | Omit = omit, + type: Literal["REGIONAL", "REGIONAL_NETWORK", "GLOBAL"] | Omit = omit, + vpc_uuid: str | Omit = omit, + tag: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> LoadBalancerCreateResponse: return await self._post( "/v2/load_balancers" @@ -1514,7 +1514,7 @@ async def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> LoadBalancerRetrieveResponse: """ To show information about a load balancer instance, send a GET request to @@ -1547,21 +1547,21 @@ async def update( lb_id: str, *, forwarding_rules: Iterable[ForwardingRuleParam], - algorithm: Literal["round_robin", "least_connections"] | NotGiven = NOT_GIVEN, - disable_lets_encrypt_dns_records: bool | NotGiven = NOT_GIVEN, - domains: Iterable[DomainsParam] | NotGiven = NOT_GIVEN, - droplet_ids: Iterable[int] | NotGiven = NOT_GIVEN, - enable_backend_keepalive: bool | NotGiven = NOT_GIVEN, - enable_proxy_protocol: bool | NotGiven = NOT_GIVEN, - firewall: LbFirewallParam | NotGiven = NOT_GIVEN, - glb_settings: GlbSettingsParam | NotGiven = NOT_GIVEN, - health_check: HealthCheckParam | NotGiven = NOT_GIVEN, - http_idle_timeout_seconds: int | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, - network: Literal["EXTERNAL", "INTERNAL"] | NotGiven = NOT_GIVEN, - network_stack: Literal["IPV4", "DUALSTACK"] | NotGiven = NOT_GIVEN, - project_id: str | NotGiven = NOT_GIVEN, - redirect_http_to_https: bool | NotGiven = NOT_GIVEN, + algorithm: Literal["round_robin", "least_connections"] | Omit = omit, + disable_lets_encrypt_dns_records: bool | Omit = omit, + domains: Iterable[DomainsParam] | Omit = omit, + droplet_ids: Iterable[int] | Omit = omit, + enable_backend_keepalive: bool | Omit = omit, + enable_proxy_protocol: bool | Omit = omit, + firewall: LbFirewallParam | Omit = omit, + glb_settings: GlbSettingsParam | Omit = omit, + health_check: HealthCheckParam | Omit = omit, + http_idle_timeout_seconds: int | Omit = omit, + name: str | Omit = omit, + network: Literal["EXTERNAL", "INTERNAL"] | Omit = omit, + network_stack: Literal["IPV4", "DUALSTACK"] | Omit = omit, + project_id: str | Omit = omit, + redirect_http_to_https: bool | Omit = omit, region: Literal[ "ams1", "ams2", @@ -1579,20 +1579,20 @@ async def update( "tor1", "syd1", ] - | NotGiven = NOT_GIVEN, - size: Literal["lb-small", "lb-medium", "lb-large"] | NotGiven = NOT_GIVEN, - size_unit: int | NotGiven = NOT_GIVEN, - sticky_sessions: StickySessionsParam | NotGiven = NOT_GIVEN, - target_load_balancer_ids: SequenceNotStr[str] | NotGiven = NOT_GIVEN, - tls_cipher_policy: Literal["DEFAULT", "STRONG"] | NotGiven = NOT_GIVEN, - type: Literal["REGIONAL", "REGIONAL_NETWORK", "GLOBAL"] | NotGiven = NOT_GIVEN, - vpc_uuid: str | NotGiven = NOT_GIVEN, + | Omit = omit, + size: Literal["lb-small", "lb-medium", "lb-large"] | Omit = omit, + size_unit: int | Omit = omit, + sticky_sessions: StickySessionsParam | Omit = omit, + target_load_balancer_ids: SequenceNotStr[str] | Omit = omit, + tls_cipher_policy: Literal["DEFAULT", "STRONG"] | Omit = omit, + type: Literal["REGIONAL", "REGIONAL_NETWORK", "GLOBAL"] | Omit = omit, + vpc_uuid: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> LoadBalancerUpdateResponse: """ To update a load balancer's settings, send a PUT request to @@ -1701,20 +1701,20 @@ async def update( lb_id: str, *, forwarding_rules: Iterable[ForwardingRuleParam], - algorithm: Literal["round_robin", "least_connections"] | NotGiven = NOT_GIVEN, - disable_lets_encrypt_dns_records: bool | NotGiven = NOT_GIVEN, - domains: Iterable[DomainsParam] | NotGiven = NOT_GIVEN, - enable_backend_keepalive: bool | NotGiven = NOT_GIVEN, - enable_proxy_protocol: bool | NotGiven = NOT_GIVEN, - firewall: LbFirewallParam | NotGiven = NOT_GIVEN, - glb_settings: GlbSettingsParam | NotGiven = NOT_GIVEN, - health_check: HealthCheckParam | NotGiven = NOT_GIVEN, - http_idle_timeout_seconds: int | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, - network: Literal["EXTERNAL", "INTERNAL"] | NotGiven = NOT_GIVEN, - network_stack: Literal["IPV4", "DUALSTACK"] | NotGiven = NOT_GIVEN, - project_id: str | NotGiven = NOT_GIVEN, - redirect_http_to_https: bool | NotGiven = NOT_GIVEN, + algorithm: Literal["round_robin", "least_connections"] | Omit = omit, + disable_lets_encrypt_dns_records: bool | Omit = omit, + domains: Iterable[DomainsParam] | Omit = omit, + enable_backend_keepalive: bool | Omit = omit, + enable_proxy_protocol: bool | Omit = omit, + firewall: LbFirewallParam | Omit = omit, + glb_settings: GlbSettingsParam | Omit = omit, + health_check: HealthCheckParam | Omit = omit, + http_idle_timeout_seconds: int | Omit = omit, + name: str | Omit = omit, + network: Literal["EXTERNAL", "INTERNAL"] | Omit = omit, + network_stack: Literal["IPV4", "DUALSTACK"] | Omit = omit, + project_id: str | Omit = omit, + redirect_http_to_https: bool | Omit = omit, region: Literal[ "ams1", "ams2", @@ -1732,21 +1732,21 @@ async def update( "tor1", "syd1", ] - | NotGiven = NOT_GIVEN, - size: Literal["lb-small", "lb-medium", "lb-large"] | NotGiven = NOT_GIVEN, - size_unit: int | NotGiven = NOT_GIVEN, - sticky_sessions: StickySessionsParam | NotGiven = NOT_GIVEN, - tag: str | NotGiven = NOT_GIVEN, - target_load_balancer_ids: SequenceNotStr[str] | NotGiven = NOT_GIVEN, - tls_cipher_policy: Literal["DEFAULT", "STRONG"] | NotGiven = NOT_GIVEN, - type: Literal["REGIONAL", "REGIONAL_NETWORK", "GLOBAL"] | NotGiven = NOT_GIVEN, - vpc_uuid: str | NotGiven = NOT_GIVEN, + | Omit = omit, + size: Literal["lb-small", "lb-medium", "lb-large"] | Omit = omit, + size_unit: int | Omit = omit, + sticky_sessions: StickySessionsParam | Omit = omit, + tag: str | Omit = omit, + target_load_balancer_ids: SequenceNotStr[str] | Omit = omit, + tls_cipher_policy: Literal["DEFAULT", "STRONG"] | Omit = omit, + type: Literal["REGIONAL", "REGIONAL_NETWORK", "GLOBAL"] | Omit = omit, + vpc_uuid: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> LoadBalancerUpdateResponse: """ To update a load balancer's settings, send a PUT request to @@ -1856,21 +1856,21 @@ async def update( lb_id: str, *, forwarding_rules: Iterable[ForwardingRuleParam], - algorithm: Literal["round_robin", "least_connections"] | NotGiven = NOT_GIVEN, - disable_lets_encrypt_dns_records: bool | NotGiven = NOT_GIVEN, - domains: Iterable[DomainsParam] | NotGiven = NOT_GIVEN, - droplet_ids: Iterable[int] | NotGiven = NOT_GIVEN, - enable_backend_keepalive: bool | NotGiven = NOT_GIVEN, - enable_proxy_protocol: bool | NotGiven = NOT_GIVEN, - firewall: LbFirewallParam | NotGiven = NOT_GIVEN, - glb_settings: GlbSettingsParam | NotGiven = NOT_GIVEN, - health_check: HealthCheckParam | NotGiven = NOT_GIVEN, - http_idle_timeout_seconds: int | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, - network: Literal["EXTERNAL", "INTERNAL"] | NotGiven = NOT_GIVEN, - network_stack: Literal["IPV4", "DUALSTACK"] | NotGiven = NOT_GIVEN, - project_id: str | NotGiven = NOT_GIVEN, - redirect_http_to_https: bool | NotGiven = NOT_GIVEN, + algorithm: Literal["round_robin", "least_connections"] | Omit = omit, + disable_lets_encrypt_dns_records: bool | Omit = omit, + domains: Iterable[DomainsParam] | Omit = omit, + droplet_ids: Iterable[int] | Omit = omit, + enable_backend_keepalive: bool | Omit = omit, + enable_proxy_protocol: bool | Omit = omit, + firewall: LbFirewallParam | Omit = omit, + glb_settings: GlbSettingsParam | Omit = omit, + health_check: HealthCheckParam | Omit = omit, + http_idle_timeout_seconds: int | Omit = omit, + name: str | Omit = omit, + network: Literal["EXTERNAL", "INTERNAL"] | Omit = omit, + network_stack: Literal["IPV4", "DUALSTACK"] | Omit = omit, + project_id: str | Omit = omit, + redirect_http_to_https: bool | Omit = omit, region: Literal[ "ams1", "ams2", @@ -1888,21 +1888,21 @@ async def update( "tor1", "syd1", ] - | NotGiven = NOT_GIVEN, - size: Literal["lb-small", "lb-medium", "lb-large"] | NotGiven = NOT_GIVEN, - size_unit: int | NotGiven = NOT_GIVEN, - sticky_sessions: StickySessionsParam | NotGiven = NOT_GIVEN, - target_load_balancer_ids: SequenceNotStr[str] | NotGiven = NOT_GIVEN, - tls_cipher_policy: Literal["DEFAULT", "STRONG"] | NotGiven = NOT_GIVEN, - type: Literal["REGIONAL", "REGIONAL_NETWORK", "GLOBAL"] | NotGiven = NOT_GIVEN, - vpc_uuid: str | NotGiven = NOT_GIVEN, - tag: str | NotGiven = NOT_GIVEN, + | Omit = omit, + size: Literal["lb-small", "lb-medium", "lb-large"] | Omit = omit, + size_unit: int | Omit = omit, + sticky_sessions: StickySessionsParam | Omit = omit, + target_load_balancer_ids: SequenceNotStr[str] | Omit = omit, + tls_cipher_policy: Literal["DEFAULT", "STRONG"] | Omit = omit, + type: Literal["REGIONAL", "REGIONAL_NETWORK", "GLOBAL"] | Omit = omit, + vpc_uuid: str | Omit = omit, + tag: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> LoadBalancerUpdateResponse: if not lb_id: raise ValueError(f"Expected a non-empty value for `lb_id` but received {lb_id!r}") @@ -1949,14 +1949,14 @@ async def update( async def list( self, *, - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, + page: int | Omit = omit, + per_page: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> LoadBalancerListResponse: """ To list all of the load balancer instances on your account, send a GET request @@ -2004,7 +2004,7 @@ async def delete( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> None: """ To delete a load balancer instance, disassociating any Droplets assigned to it @@ -2045,7 +2045,7 @@ async def delete_cache( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> None: """ To delete a Global load balancer CDN cache, send a DELETE request to diff --git a/src/gradient/resources/gpu_droplets/sizes.py b/src/gradient/resources/gpu_droplets/sizes.py index 7cfc5629..9893903f 100644 --- a/src/gradient/resources/gpu_droplets/sizes.py +++ b/src/gradient/resources/gpu_droplets/sizes.py @@ -4,7 +4,7 @@ import httpx -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from ..._utils import maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource @@ -44,14 +44,14 @@ def with_streaming_response(self) -> SizesResourceWithStreamingResponse: def list( self, *, - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, + page: int | Omit = omit, + per_page: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SizeListResponse: """To list all of available Droplet sizes, send a GET request to `/v2/sizes`. @@ -115,14 +115,14 @@ def with_streaming_response(self) -> AsyncSizesResourceWithStreamingResponse: async def list( self, *, - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, + page: int | Omit = omit, + per_page: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SizeListResponse: """To list all of available Droplet sizes, send a GET request to `/v2/sizes`. diff --git a/src/gradient/resources/gpu_droplets/snapshots.py b/src/gradient/resources/gpu_droplets/snapshots.py index eed93cfd..78bd01ac 100644 --- a/src/gradient/resources/gpu_droplets/snapshots.py +++ b/src/gradient/resources/gpu_droplets/snapshots.py @@ -7,7 +7,7 @@ import httpx -from ..._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven +from ..._types import Body, Omit, Query, Headers, NoneType, NotGiven, omit, not_given from ..._utils import maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource @@ -54,7 +54,7 @@ def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SnapshotRetrieveResponse: """ To retrieve information about a snapshot, send a GET request to @@ -87,15 +87,15 @@ def retrieve( def list( self, *, - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, - resource_type: Literal["droplet", "volume"] | NotGiven = NOT_GIVEN, + page: int | Omit = omit, + per_page: int | Omit = omit, + resource_type: Literal["droplet", "volume"] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SnapshotListResponse: """ To list all of the snapshots available on your account, send a GET request to @@ -162,7 +162,7 @@ def delete( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> None: """ Both Droplet and volume snapshots are managed through the `/v2/snapshots/` @@ -224,7 +224,7 @@ async def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SnapshotRetrieveResponse: """ To retrieve information about a snapshot, send a GET request to @@ -257,15 +257,15 @@ async def retrieve( async def list( self, *, - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, - resource_type: Literal["droplet", "volume"] | NotGiven = NOT_GIVEN, + page: int | Omit = omit, + per_page: int | Omit = omit, + resource_type: Literal["droplet", "volume"] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SnapshotListResponse: """ To list all of the snapshots available on your account, send a GET request to @@ -332,7 +332,7 @@ async def delete( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> None: """ Both Droplet and volume snapshots are managed through the `/v2/snapshots/` diff --git a/src/gradient/resources/gpu_droplets/volumes/actions.py b/src/gradient/resources/gpu_droplets/volumes/actions.py index c648beaa..1c0c66a0 100644 --- a/src/gradient/resources/gpu_droplets/volumes/actions.py +++ b/src/gradient/resources/gpu_droplets/volumes/actions.py @@ -7,7 +7,7 @@ import httpx -from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven, SequenceNotStr +from ...._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given from ...._utils import required_args, maybe_transform, async_maybe_transform from ...._compat import cached_property from ...._resource import SyncAPIResource, AsyncAPIResource @@ -57,14 +57,14 @@ def retrieve( action_id: int, *, volume_id: str, - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, + page: int | Omit = omit, + per_page: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ActionRetrieveResponse: """ To retrieve the status of a volume action, send a GET request to @@ -109,14 +109,14 @@ def list( self, volume_id: str, *, - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, + page: int | Omit = omit, + per_page: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ActionListResponse: """ To retrieve all actions that have been executed on a volume, send a GET request @@ -164,8 +164,8 @@ def initiate_by_id( *, droplet_id: int, type: Literal["attach", "detach", "resize"], - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, + page: int | Omit = omit, + per_page: int | Omit = omit, region: Literal[ "ams1", "ams2", @@ -183,14 +183,14 @@ def initiate_by_id( "tor1", "syd1", ] - | NotGiven = NOT_GIVEN, - tags: Optional[SequenceNotStr[str]] | NotGiven = NOT_GIVEN, + | Omit = omit, + tags: Optional[SequenceNotStr[str]] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ActionInitiateByIDResponse: """ To initiate an action on a block storage volume by Id, send a POST request to @@ -265,8 +265,8 @@ def initiate_by_id( *, droplet_id: int, type: Literal["attach", "detach", "resize"], - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, + page: int | Omit = omit, + per_page: int | Omit = omit, region: Literal[ "ams1", "ams2", @@ -284,13 +284,13 @@ def initiate_by_id( "tor1", "syd1", ] - | NotGiven = NOT_GIVEN, + | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ActionInitiateByIDResponse: """ To initiate an action on a block storage volume by Id, send a POST request to @@ -360,8 +360,8 @@ def initiate_by_id( *, size_gigabytes: int, type: Literal["attach", "detach", "resize"], - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, + page: int | Omit = omit, + per_page: int | Omit = omit, region: Literal[ "ams1", "ams2", @@ -379,13 +379,13 @@ def initiate_by_id( "tor1", "syd1", ] - | NotGiven = NOT_GIVEN, + | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ActionInitiateByIDResponse: """ To initiate an action on a block storage volume by Id, send a POST request to @@ -452,10 +452,10 @@ def initiate_by_id( self, volume_id: str, *, - droplet_id: int | NotGiven = NOT_GIVEN, + droplet_id: int | Omit = omit, type: Literal["attach", "detach", "resize"], - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, + page: int | Omit = omit, + per_page: int | Omit = omit, region: Literal[ "ams1", "ams2", @@ -473,15 +473,15 @@ def initiate_by_id( "tor1", "syd1", ] - | NotGiven = NOT_GIVEN, - tags: Optional[SequenceNotStr[str]] | NotGiven = NOT_GIVEN, - size_gigabytes: int | NotGiven = NOT_GIVEN, + | Omit = omit, + tags: Optional[SequenceNotStr[str]] | Omit = omit, + size_gigabytes: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ActionInitiateByIDResponse: if not volume_id: raise ValueError(f"Expected a non-empty value for `volume_id` but received {volume_id!r}") @@ -521,8 +521,8 @@ def initiate_by_name( *, droplet_id: int, type: Literal["attach", "detach", "resize"], - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, + page: int | Omit = omit, + per_page: int | Omit = omit, region: Literal[ "ams1", "ams2", @@ -540,14 +540,14 @@ def initiate_by_name( "tor1", "syd1", ] - | NotGiven = NOT_GIVEN, - tags: Optional[SequenceNotStr[str]] | NotGiven = NOT_GIVEN, + | Omit = omit, + tags: Optional[SequenceNotStr[str]] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ActionInitiateByNameResponse: """ To initiate an action on a block storage volume by Name, send a POST request to @@ -613,8 +613,8 @@ def initiate_by_name( *, droplet_id: int, type: Literal["attach", "detach", "resize"], - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, + page: int | Omit = omit, + per_page: int | Omit = omit, region: Literal[ "ams1", "ams2", @@ -632,13 +632,13 @@ def initiate_by_name( "tor1", "syd1", ] - | NotGiven = NOT_GIVEN, + | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ActionInitiateByNameResponse: """ To initiate an action on a block storage volume by Name, send a POST request to @@ -699,8 +699,8 @@ def initiate_by_name( *, droplet_id: int, type: Literal["attach", "detach", "resize"], - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, + page: int | Omit = omit, + per_page: int | Omit = omit, region: Literal[ "ams1", "ams2", @@ -718,14 +718,14 @@ def initiate_by_name( "tor1", "syd1", ] - | NotGiven = NOT_GIVEN, - tags: Optional[SequenceNotStr[str]] | NotGiven = NOT_GIVEN, + | Omit = omit, + tags: Optional[SequenceNotStr[str]] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ActionInitiateByNameResponse: return self._post( "/v2/volumes/actions" @@ -782,14 +782,14 @@ async def retrieve( action_id: int, *, volume_id: str, - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, + page: int | Omit = omit, + per_page: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ActionRetrieveResponse: """ To retrieve the status of a volume action, send a GET request to @@ -834,14 +834,14 @@ async def list( self, volume_id: str, *, - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, + page: int | Omit = omit, + per_page: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ActionListResponse: """ To retrieve all actions that have been executed on a volume, send a GET request @@ -889,8 +889,8 @@ async def initiate_by_id( *, droplet_id: int, type: Literal["attach", "detach", "resize"], - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, + page: int | Omit = omit, + per_page: int | Omit = omit, region: Literal[ "ams1", "ams2", @@ -908,14 +908,14 @@ async def initiate_by_id( "tor1", "syd1", ] - | NotGiven = NOT_GIVEN, - tags: Optional[SequenceNotStr[str]] | NotGiven = NOT_GIVEN, + | Omit = omit, + tags: Optional[SequenceNotStr[str]] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ActionInitiateByIDResponse: """ To initiate an action on a block storage volume by Id, send a POST request to @@ -990,8 +990,8 @@ async def initiate_by_id( *, droplet_id: int, type: Literal["attach", "detach", "resize"], - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, + page: int | Omit = omit, + per_page: int | Omit = omit, region: Literal[ "ams1", "ams2", @@ -1009,13 +1009,13 @@ async def initiate_by_id( "tor1", "syd1", ] - | NotGiven = NOT_GIVEN, + | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ActionInitiateByIDResponse: """ To initiate an action on a block storage volume by Id, send a POST request to @@ -1085,8 +1085,8 @@ async def initiate_by_id( *, size_gigabytes: int, type: Literal["attach", "detach", "resize"], - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, + page: int | Omit = omit, + per_page: int | Omit = omit, region: Literal[ "ams1", "ams2", @@ -1104,13 +1104,13 @@ async def initiate_by_id( "tor1", "syd1", ] - | NotGiven = NOT_GIVEN, + | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ActionInitiateByIDResponse: """ To initiate an action on a block storage volume by Id, send a POST request to @@ -1177,10 +1177,10 @@ async def initiate_by_id( self, volume_id: str, *, - droplet_id: int | NotGiven = NOT_GIVEN, + droplet_id: int | Omit = omit, type: Literal["attach", "detach", "resize"], - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, + page: int | Omit = omit, + per_page: int | Omit = omit, region: Literal[ "ams1", "ams2", @@ -1198,15 +1198,15 @@ async def initiate_by_id( "tor1", "syd1", ] - | NotGiven = NOT_GIVEN, - tags: Optional[SequenceNotStr[str]] | NotGiven = NOT_GIVEN, - size_gigabytes: int | NotGiven = NOT_GIVEN, + | Omit = omit, + tags: Optional[SequenceNotStr[str]] | Omit = omit, + size_gigabytes: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ActionInitiateByIDResponse: if not volume_id: raise ValueError(f"Expected a non-empty value for `volume_id` but received {volume_id!r}") @@ -1246,8 +1246,8 @@ async def initiate_by_name( *, droplet_id: int, type: Literal["attach", "detach", "resize"], - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, + page: int | Omit = omit, + per_page: int | Omit = omit, region: Literal[ "ams1", "ams2", @@ -1265,14 +1265,14 @@ async def initiate_by_name( "tor1", "syd1", ] - | NotGiven = NOT_GIVEN, - tags: Optional[SequenceNotStr[str]] | NotGiven = NOT_GIVEN, + | Omit = omit, + tags: Optional[SequenceNotStr[str]] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ActionInitiateByNameResponse: """ To initiate an action on a block storage volume by Name, send a POST request to @@ -1338,8 +1338,8 @@ async def initiate_by_name( *, droplet_id: int, type: Literal["attach", "detach", "resize"], - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, + page: int | Omit = omit, + per_page: int | Omit = omit, region: Literal[ "ams1", "ams2", @@ -1357,13 +1357,13 @@ async def initiate_by_name( "tor1", "syd1", ] - | NotGiven = NOT_GIVEN, + | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ActionInitiateByNameResponse: """ To initiate an action on a block storage volume by Name, send a POST request to @@ -1424,8 +1424,8 @@ async def initiate_by_name( *, droplet_id: int, type: Literal["attach", "detach", "resize"], - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, + page: int | Omit = omit, + per_page: int | Omit = omit, region: Literal[ "ams1", "ams2", @@ -1443,14 +1443,14 @@ async def initiate_by_name( "tor1", "syd1", ] - | NotGiven = NOT_GIVEN, - tags: Optional[SequenceNotStr[str]] | NotGiven = NOT_GIVEN, + | Omit = omit, + tags: Optional[SequenceNotStr[str]] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ActionInitiateByNameResponse: return await self._post( "/v2/volumes/actions" diff --git a/src/gradient/resources/gpu_droplets/volumes/snapshots.py b/src/gradient/resources/gpu_droplets/volumes/snapshots.py index 7e925264..694de074 100644 --- a/src/gradient/resources/gpu_droplets/volumes/snapshots.py +++ b/src/gradient/resources/gpu_droplets/volumes/snapshots.py @@ -6,7 +6,7 @@ import httpx -from ...._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven, SequenceNotStr +from ...._types import Body, Omit, Query, Headers, NoneType, NotGiven, SequenceNotStr, omit, not_given from ...._utils import maybe_transform, async_maybe_transform from ...._compat import cached_property from ...._resource import SyncAPIResource, AsyncAPIResource @@ -50,13 +50,13 @@ def create( volume_id: str, *, name: str, - tags: Optional[SequenceNotStr[str]] | NotGiven = NOT_GIVEN, + tags: Optional[SequenceNotStr[str]] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SnapshotCreateResponse: """ To create a snapshot from a volume, sent a POST request to @@ -106,7 +106,7 @@ def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SnapshotRetrieveResponse: """ To retrieve the details of a snapshot that has been created from a volume, send @@ -137,14 +137,14 @@ def list( self, volume_id: str, *, - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, + page: int | Omit = omit, + per_page: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SnapshotListResponse: """ To retrieve the snapshots that have been created from a volume, send a GET @@ -194,7 +194,7 @@ def delete( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> None: """ To delete a volume snapshot, send a DELETE request to @@ -251,13 +251,13 @@ async def create( volume_id: str, *, name: str, - tags: Optional[SequenceNotStr[str]] | NotGiven = NOT_GIVEN, + tags: Optional[SequenceNotStr[str]] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SnapshotCreateResponse: """ To create a snapshot from a volume, sent a POST request to @@ -307,7 +307,7 @@ async def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SnapshotRetrieveResponse: """ To retrieve the details of a snapshot that has been created from a volume, send @@ -338,14 +338,14 @@ async def list( self, volume_id: str, *, - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, + page: int | Omit = omit, + per_page: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SnapshotListResponse: """ To retrieve the snapshots that have been created from a volume, send a GET @@ -395,7 +395,7 @@ async def delete( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> None: """ To delete a volume snapshot, send a DELETE request to diff --git a/src/gradient/resources/gpu_droplets/volumes/volumes.py b/src/gradient/resources/gpu_droplets/volumes/volumes.py index ee980a10..fb86c288 100644 --- a/src/gradient/resources/gpu_droplets/volumes/volumes.py +++ b/src/gradient/resources/gpu_droplets/volumes/volumes.py @@ -15,7 +15,7 @@ ActionsResourceWithStreamingResponse, AsyncActionsResourceWithStreamingResponse, ) -from ...._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven, SequenceNotStr +from ...._types import Body, Omit, Query, Headers, NoneType, NotGiven, SequenceNotStr, omit, not_given from ...._utils import required_args, maybe_transform, async_maybe_transform from .snapshots import ( SnapshotsResource, @@ -93,17 +93,17 @@ def create( "syd1", ], size_gigabytes: int, - description: str | NotGiven = NOT_GIVEN, - filesystem_label: str | NotGiven = NOT_GIVEN, - filesystem_type: str | NotGiven = NOT_GIVEN, - snapshot_id: str | NotGiven = NOT_GIVEN, - tags: Optional[SequenceNotStr[str]] | NotGiven = NOT_GIVEN, + description: str | Omit = omit, + filesystem_label: str | Omit = omit, + filesystem_type: str | Omit = omit, + snapshot_id: str | Omit = omit, + tags: Optional[SequenceNotStr[str]] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> VolumeCreateResponse: """To create a new volume, send a POST request to `/v2/volumes`. @@ -178,17 +178,17 @@ def create( "syd1", ], size_gigabytes: int, - description: str | NotGiven = NOT_GIVEN, - filesystem_label: str | NotGiven = NOT_GIVEN, - filesystem_type: str | NotGiven = NOT_GIVEN, - snapshot_id: str | NotGiven = NOT_GIVEN, - tags: Optional[SequenceNotStr[str]] | NotGiven = NOT_GIVEN, + description: str | Omit = omit, + filesystem_label: str | Omit = omit, + filesystem_type: str | Omit = omit, + snapshot_id: str | Omit = omit, + tags: Optional[SequenceNotStr[str]] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> VolumeCreateResponse: """To create a new volume, send a POST request to `/v2/volumes`. @@ -263,17 +263,17 @@ def create( "syd1", ], size_gigabytes: int, - description: str | NotGiven = NOT_GIVEN, - filesystem_label: str | NotGiven = NOT_GIVEN, - filesystem_type: str | NotGiven = NOT_GIVEN, - snapshot_id: str | NotGiven = NOT_GIVEN, - tags: Optional[SequenceNotStr[str]] | NotGiven = NOT_GIVEN, + description: str | Omit = omit, + filesystem_label: str | Omit = omit, + filesystem_type: str | Omit = omit, + snapshot_id: str | Omit = omit, + tags: Optional[SequenceNotStr[str]] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> VolumeCreateResponse: return self._post( "/v2/volumes" if self._client._base_url_overridden else "https://api.digitalocean.com/v2/volumes", @@ -305,7 +305,7 @@ def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> VolumeRetrieveResponse: """ To show information about a block storage volume, send a GET request to @@ -335,9 +335,9 @@ def retrieve( def list( self, *, - name: str | NotGiven = NOT_GIVEN, - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, + name: str | Omit = omit, + page: int | Omit = omit, + per_page: int | Omit = omit, region: Literal[ "ams1", "ams2", @@ -355,13 +355,13 @@ def list( "tor1", "syd1", ] - | NotGiven = NOT_GIVEN, + | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> VolumeListResponse: """ To list all of the block storage volumes available on your account, send a GET @@ -434,7 +434,7 @@ def delete( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> None: """ To delete a block storage volume, destroying all data and removing it from your @@ -468,7 +468,7 @@ def delete( def delete_by_name( self, *, - name: str | NotGiven = NOT_GIVEN, + name: str | Omit = omit, region: Literal[ "ams1", "ams2", @@ -486,13 +486,13 @@ def delete_by_name( "tor1", "syd1", ] - | NotGiven = NOT_GIVEN, + | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> None: """ Block storage volumes may also be deleted by name by sending a DELETE request @@ -586,17 +586,17 @@ async def create( "syd1", ], size_gigabytes: int, - description: str | NotGiven = NOT_GIVEN, - filesystem_label: str | NotGiven = NOT_GIVEN, - filesystem_type: str | NotGiven = NOT_GIVEN, - snapshot_id: str | NotGiven = NOT_GIVEN, - tags: Optional[SequenceNotStr[str]] | NotGiven = NOT_GIVEN, + description: str | Omit = omit, + filesystem_label: str | Omit = omit, + filesystem_type: str | Omit = omit, + snapshot_id: str | Omit = omit, + tags: Optional[SequenceNotStr[str]] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> VolumeCreateResponse: """To create a new volume, send a POST request to `/v2/volumes`. @@ -671,17 +671,17 @@ async def create( "syd1", ], size_gigabytes: int, - description: str | NotGiven = NOT_GIVEN, - filesystem_label: str | NotGiven = NOT_GIVEN, - filesystem_type: str | NotGiven = NOT_GIVEN, - snapshot_id: str | NotGiven = NOT_GIVEN, - tags: Optional[SequenceNotStr[str]] | NotGiven = NOT_GIVEN, + description: str | Omit = omit, + filesystem_label: str | Omit = omit, + filesystem_type: str | Omit = omit, + snapshot_id: str | Omit = omit, + tags: Optional[SequenceNotStr[str]] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> VolumeCreateResponse: """To create a new volume, send a POST request to `/v2/volumes`. @@ -756,17 +756,17 @@ async def create( "syd1", ], size_gigabytes: int, - description: str | NotGiven = NOT_GIVEN, - filesystem_label: str | NotGiven = NOT_GIVEN, - filesystem_type: str | NotGiven = NOT_GIVEN, - snapshot_id: str | NotGiven = NOT_GIVEN, - tags: Optional[SequenceNotStr[str]] | NotGiven = NOT_GIVEN, + description: str | Omit = omit, + filesystem_label: str | Omit = omit, + filesystem_type: str | Omit = omit, + snapshot_id: str | Omit = omit, + tags: Optional[SequenceNotStr[str]] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> VolumeCreateResponse: return await self._post( "/v2/volumes" if self._client._base_url_overridden else "https://api.digitalocean.com/v2/volumes", @@ -798,7 +798,7 @@ async def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> VolumeRetrieveResponse: """ To show information about a block storage volume, send a GET request to @@ -828,9 +828,9 @@ async def retrieve( async def list( self, *, - name: str | NotGiven = NOT_GIVEN, - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, + name: str | Omit = omit, + page: int | Omit = omit, + per_page: int | Omit = omit, region: Literal[ "ams1", "ams2", @@ -848,13 +848,13 @@ async def list( "tor1", "syd1", ] - | NotGiven = NOT_GIVEN, + | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> VolumeListResponse: """ To list all of the block storage volumes available on your account, send a GET @@ -927,7 +927,7 @@ async def delete( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> None: """ To delete a block storage volume, destroying all data and removing it from your @@ -961,7 +961,7 @@ async def delete( async def delete_by_name( self, *, - name: str | NotGiven = NOT_GIVEN, + name: str | Omit = omit, region: Literal[ "ams1", "ams2", @@ -979,13 +979,13 @@ async def delete_by_name( "tor1", "syd1", ] - | NotGiven = NOT_GIVEN, + | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> None: """ Block storage volumes may also be deleted by name by sending a DELETE request diff --git a/src/gradient/resources/inference/api_keys.py b/src/gradient/resources/inference/api_keys.py index fa7f86dc..8dfa54e1 100644 --- a/src/gradient/resources/inference/api_keys.py +++ b/src/gradient/resources/inference/api_keys.py @@ -4,7 +4,7 @@ import httpx -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from ..._utils import maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource @@ -48,13 +48,13 @@ def with_streaming_response(self) -> APIKeysResourceWithStreamingResponse: def create( self, *, - name: str | NotGiven = NOT_GIVEN, + name: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> APIKeyCreateResponse: """ To create a model API key, send a POST request to `/v2/gen-ai/models/api_keys`. @@ -85,14 +85,14 @@ def update( self, path_api_key_uuid: str, *, - body_api_key_uuid: str | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, + body_api_key_uuid: str | Omit = omit, + name: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> APIKeyUpdateResponse: """ To update a model API key, send a PUT request to @@ -133,14 +133,14 @@ def update( def list( self, *, - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, + page: int | Omit = omit, + per_page: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> APIKeyListResponse: """ To list all model API keys, send a GET request to `/v2/gen-ai/models/api_keys`. @@ -187,7 +187,7 @@ def delete( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> APIKeyDeleteResponse: """ To delete an API key for a model, send a DELETE request to @@ -223,7 +223,7 @@ def update_regenerate( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> APIKeyUpdateRegenerateResponse: """ To regenerate a model API key, send a PUT request to @@ -274,13 +274,13 @@ def with_streaming_response(self) -> AsyncAPIKeysResourceWithStreamingResponse: async def create( self, *, - name: str | NotGiven = NOT_GIVEN, + name: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> APIKeyCreateResponse: """ To create a model API key, send a POST request to `/v2/gen-ai/models/api_keys`. @@ -311,14 +311,14 @@ async def update( self, path_api_key_uuid: str, *, - body_api_key_uuid: str | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, + body_api_key_uuid: str | Omit = omit, + name: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> APIKeyUpdateResponse: """ To update a model API key, send a PUT request to @@ -359,14 +359,14 @@ async def update( async def list( self, *, - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, + page: int | Omit = omit, + per_page: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> APIKeyListResponse: """ To list all model API keys, send a GET request to `/v2/gen-ai/models/api_keys`. @@ -413,7 +413,7 @@ async def delete( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> APIKeyDeleteResponse: """ To delete an API key for a model, send a DELETE request to @@ -449,7 +449,7 @@ async def update_regenerate( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> APIKeyUpdateRegenerateResponse: """ To regenerate a model API key, send a PUT request to diff --git a/src/gradient/resources/knowledge_bases/data_sources.py b/src/gradient/resources/knowledge_bases/data_sources.py index 16252324..083ea45f 100644 --- a/src/gradient/resources/knowledge_bases/data_sources.py +++ b/src/gradient/resources/knowledge_bases/data_sources.py @@ -4,7 +4,7 @@ import httpx -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from ..._utils import maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource @@ -53,16 +53,16 @@ def create( self, path_knowledge_base_uuid: str, *, - aws_data_source: AwsDataSourceParam | NotGiven = NOT_GIVEN, - body_knowledge_base_uuid: str | NotGiven = NOT_GIVEN, - spaces_data_source: APISpacesDataSourceParam | NotGiven = NOT_GIVEN, - web_crawler_data_source: APIWebCrawlerDataSourceParam | NotGiven = NOT_GIVEN, + aws_data_source: AwsDataSourceParam | Omit = omit, + body_knowledge_base_uuid: str | Omit = omit, + spaces_data_source: APISpacesDataSourceParam | Omit = omit, + web_crawler_data_source: APIWebCrawlerDataSourceParam | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> DataSourceCreateResponse: """ To add a data source to a knowledge base, send a POST request to @@ -112,14 +112,14 @@ def list( self, knowledge_base_uuid: str, *, - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, + page: int | Omit = omit, + per_page: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> DataSourceListResponse: """ To list all data sources for a knowledge base, send a GET request to @@ -172,7 +172,7 @@ def delete( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> DataSourceDeleteResponse: """ To delete a data source from a knowledge base, send a DELETE request to @@ -228,16 +228,16 @@ async def create( self, path_knowledge_base_uuid: str, *, - aws_data_source: AwsDataSourceParam | NotGiven = NOT_GIVEN, - body_knowledge_base_uuid: str | NotGiven = NOT_GIVEN, - spaces_data_source: APISpacesDataSourceParam | NotGiven = NOT_GIVEN, - web_crawler_data_source: APIWebCrawlerDataSourceParam | NotGiven = NOT_GIVEN, + aws_data_source: AwsDataSourceParam | Omit = omit, + body_knowledge_base_uuid: str | Omit = omit, + spaces_data_source: APISpacesDataSourceParam | Omit = omit, + web_crawler_data_source: APIWebCrawlerDataSourceParam | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> DataSourceCreateResponse: """ To add a data source to a knowledge base, send a POST request to @@ -287,14 +287,14 @@ async def list( self, knowledge_base_uuid: str, *, - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, + page: int | Omit = omit, + per_page: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> DataSourceListResponse: """ To list all data sources for a knowledge base, send a GET request to @@ -347,7 +347,7 @@ async def delete( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> DataSourceDeleteResponse: """ To delete a data source from a knowledge base, send a DELETE request to diff --git a/src/gradient/resources/knowledge_bases/indexing_jobs.py b/src/gradient/resources/knowledge_bases/indexing_jobs.py index 41e7da76..95898c2a 100644 --- a/src/gradient/resources/knowledge_bases/indexing_jobs.py +++ b/src/gradient/resources/knowledge_bases/indexing_jobs.py @@ -4,7 +4,7 @@ import httpx -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven, SequenceNotStr +from ..._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given from ..._utils import maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource @@ -52,14 +52,14 @@ def with_streaming_response(self) -> IndexingJobsResourceWithStreamingResponse: def create( self, *, - data_source_uuids: SequenceNotStr[str] | NotGiven = NOT_GIVEN, - knowledge_base_uuid: str | NotGiven = NOT_GIVEN, + data_source_uuids: SequenceNotStr[str] | Omit = omit, + knowledge_base_uuid: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> IndexingJobCreateResponse: """ To start an indexing job for a knowledge base, send a POST request to @@ -105,7 +105,7 @@ def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> IndexingJobRetrieveResponse: """ To get status of an indexing Job for a knowledge base, send a GET request to @@ -135,14 +135,14 @@ def retrieve( def list( self, *, - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, + page: int | Omit = omit, + per_page: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> IndexingJobListResponse: """ To list all indexing jobs for a knowledge base, send a GET request to @@ -190,7 +190,7 @@ def retrieve_data_sources( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> IndexingJobRetrieveDataSourcesResponse: """ To list all datasources for an indexing job, send a GET request to @@ -221,13 +221,13 @@ def update_cancel( self, path_uuid: str, *, - body_uuid: str | NotGiven = NOT_GIVEN, + body_uuid: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> IndexingJobUpdateCancelResponse: """ To cancel an indexing job for a knowledge base, send a PUT request to @@ -283,14 +283,14 @@ def with_streaming_response(self) -> AsyncIndexingJobsResourceWithStreamingRespo async def create( self, *, - data_source_uuids: SequenceNotStr[str] | NotGiven = NOT_GIVEN, - knowledge_base_uuid: str | NotGiven = NOT_GIVEN, + data_source_uuids: SequenceNotStr[str] | Omit = omit, + knowledge_base_uuid: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> IndexingJobCreateResponse: """ To start an indexing job for a knowledge base, send a POST request to @@ -336,7 +336,7 @@ async def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> IndexingJobRetrieveResponse: """ To get status of an indexing Job for a knowledge base, send a GET request to @@ -366,14 +366,14 @@ async def retrieve( async def list( self, *, - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, + page: int | Omit = omit, + per_page: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> IndexingJobListResponse: """ To list all indexing jobs for a knowledge base, send a GET request to @@ -421,7 +421,7 @@ async def retrieve_data_sources( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> IndexingJobRetrieveDataSourcesResponse: """ To list all datasources for an indexing job, send a GET request to @@ -452,13 +452,13 @@ async def update_cancel( self, path_uuid: str, *, - body_uuid: str | NotGiven = NOT_GIVEN, + body_uuid: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> IndexingJobUpdateCancelResponse: """ To cancel an indexing job for a knowledge base, send a PUT request to diff --git a/src/gradient/resources/knowledge_bases/knowledge_bases.py b/src/gradient/resources/knowledge_bases/knowledge_bases.py index 61fc85a8..00fa0659 100644 --- a/src/gradient/resources/knowledge_bases/knowledge_bases.py +++ b/src/gradient/resources/knowledge_bases/knowledge_bases.py @@ -7,7 +7,7 @@ import httpx from ...types import knowledge_base_list_params, knowledge_base_create_params, knowledge_base_update_params -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven, SequenceNotStr +from ..._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given from ..._utils import maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource @@ -74,20 +74,20 @@ def with_streaming_response(self) -> KnowledgeBasesResourceWithStreamingResponse def create( self, *, - database_id: str | NotGiven = NOT_GIVEN, - datasources: Iterable[knowledge_base_create_params.Datasource] | NotGiven = NOT_GIVEN, - embedding_model_uuid: str | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, - project_id: str | NotGiven = NOT_GIVEN, - region: str | NotGiven = NOT_GIVEN, - tags: SequenceNotStr[str] | NotGiven = NOT_GIVEN, - vpc_uuid: str | NotGiven = NOT_GIVEN, + database_id: str | Omit = omit, + datasources: Iterable[knowledge_base_create_params.Datasource] | Omit = omit, + embedding_model_uuid: str | Omit = omit, + name: str | Omit = omit, + project_id: str | Omit = omit, + region: str | Omit = omit, + tags: SequenceNotStr[str] | Omit = omit, + vpc_uuid: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> KnowledgeBaseCreateResponse: """ To create a knowledge base, send a POST request to `/v2/gen-ai/knowledge_bases`. @@ -154,7 +154,7 @@ def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> KnowledgeBaseRetrieveResponse: """ To retrive information about an existing knowledge base, send a GET request to @@ -185,18 +185,18 @@ def update( self, path_uuid: str, *, - database_id: str | NotGiven = NOT_GIVEN, - embedding_model_uuid: str | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, - project_id: str | NotGiven = NOT_GIVEN, - tags: SequenceNotStr[str] | NotGiven = NOT_GIVEN, - body_uuid: str | NotGiven = NOT_GIVEN, + database_id: str | Omit = omit, + embedding_model_uuid: str | Omit = omit, + name: str | Omit = omit, + project_id: str | Omit = omit, + tags: SequenceNotStr[str] | Omit = omit, + body_uuid: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> KnowledgeBaseUpdateResponse: """ To update a knowledge base, send a PUT request to @@ -249,14 +249,14 @@ def update( def list( self, *, - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, + page: int | Omit = omit, + per_page: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> KnowledgeBaseListResponse: """ To list all knowledge bases, send a GET request to `/v2/gen-ai/knowledge_bases`. @@ -303,7 +303,7 @@ def delete( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> KnowledgeBaseDeleteResponse: """ To delete a knowledge base, send a DELETE request to @@ -362,20 +362,20 @@ def with_streaming_response(self) -> AsyncKnowledgeBasesResourceWithStreamingRes async def create( self, *, - database_id: str | NotGiven = NOT_GIVEN, - datasources: Iterable[knowledge_base_create_params.Datasource] | NotGiven = NOT_GIVEN, - embedding_model_uuid: str | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, - project_id: str | NotGiven = NOT_GIVEN, - region: str | NotGiven = NOT_GIVEN, - tags: SequenceNotStr[str] | NotGiven = NOT_GIVEN, - vpc_uuid: str | NotGiven = NOT_GIVEN, + database_id: str | Omit = omit, + datasources: Iterable[knowledge_base_create_params.Datasource] | Omit = omit, + embedding_model_uuid: str | Omit = omit, + name: str | Omit = omit, + project_id: str | Omit = omit, + region: str | Omit = omit, + tags: SequenceNotStr[str] | Omit = omit, + vpc_uuid: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> KnowledgeBaseCreateResponse: """ To create a knowledge base, send a POST request to `/v2/gen-ai/knowledge_bases`. @@ -442,7 +442,7 @@ async def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> KnowledgeBaseRetrieveResponse: """ To retrive information about an existing knowledge base, send a GET request to @@ -473,18 +473,18 @@ async def update( self, path_uuid: str, *, - database_id: str | NotGiven = NOT_GIVEN, - embedding_model_uuid: str | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, - project_id: str | NotGiven = NOT_GIVEN, - tags: SequenceNotStr[str] | NotGiven = NOT_GIVEN, - body_uuid: str | NotGiven = NOT_GIVEN, + database_id: str | Omit = omit, + embedding_model_uuid: str | Omit = omit, + name: str | Omit = omit, + project_id: str | Omit = omit, + tags: SequenceNotStr[str] | Omit = omit, + body_uuid: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> KnowledgeBaseUpdateResponse: """ To update a knowledge base, send a PUT request to @@ -537,14 +537,14 @@ async def update( async def list( self, *, - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, + page: int | Omit = omit, + per_page: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> KnowledgeBaseListResponse: """ To list all knowledge bases, send a GET request to `/v2/gen-ai/knowledge_bases`. @@ -591,7 +591,7 @@ async def delete( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> KnowledgeBaseDeleteResponse: """ To delete a knowledge base, send a DELETE request to diff --git a/src/gradient/resources/models/models.py b/src/gradient/resources/models/models.py index ffb5fea9..650c49c9 100644 --- a/src/gradient/resources/models/models.py +++ b/src/gradient/resources/models/models.py @@ -8,7 +8,7 @@ import httpx from ...types import model_list_params -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from ..._utils import maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource @@ -59,9 +59,9 @@ def with_streaming_response(self) -> ModelsResourceWithStreamingResponse: def list( self, *, - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, - public_only: bool | NotGiven = NOT_GIVEN, + page: int | Omit = omit, + per_page: int | Omit = omit, + public_only: bool | Omit = omit, usecases: List[ Literal[ "MODEL_USECASE_UNKNOWN", @@ -73,13 +73,13 @@ def list( "MODEL_USECASE_SERVERLESS", ] ] - | NotGiven = NOT_GIVEN, + | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ModelListResponse: """ To list all models, send a GET request to `/v2/gen-ai/models`. @@ -160,9 +160,9 @@ def with_streaming_response(self) -> AsyncModelsResourceWithStreamingResponse: async def list( self, *, - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, - public_only: bool | NotGiven = NOT_GIVEN, + page: int | Omit = omit, + per_page: int | Omit = omit, + public_only: bool | Omit = omit, usecases: List[ Literal[ "MODEL_USECASE_UNKNOWN", @@ -174,13 +174,13 @@ async def list( "MODEL_USECASE_SERVERLESS", ] ] - | NotGiven = NOT_GIVEN, + | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ModelListResponse: """ To list all models, send a GET request to `/v2/gen-ai/models`. diff --git a/src/gradient/resources/models/providers/anthropic.py b/src/gradient/resources/models/providers/anthropic.py index ddb0eef8..33b2ec80 100644 --- a/src/gradient/resources/models/providers/anthropic.py +++ b/src/gradient/resources/models/providers/anthropic.py @@ -4,7 +4,7 @@ import httpx -from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ...._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from ...._utils import maybe_transform, async_maybe_transform from ...._compat import cached_property from ...._resource import SyncAPIResource, AsyncAPIResource @@ -54,14 +54,14 @@ def with_streaming_response(self) -> AnthropicResourceWithStreamingResponse: def create( self, *, - api_key: str | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, + api_key: str | Omit = omit, + name: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AnthropicCreateResponse: """ To create an Anthropic API key, send a POST request to @@ -106,7 +106,7 @@ def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AnthropicRetrieveResponse: """ To retrieve details of an Anthropic API key, send a GET request to @@ -137,15 +137,15 @@ def update( self, path_api_key_uuid: str, *, - api_key: str | NotGiven = NOT_GIVEN, - body_api_key_uuid: str | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, + api_key: str | Omit = omit, + body_api_key_uuid: str | Omit = omit, + name: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AnthropicUpdateResponse: """ To update an Anthropic API key, send a PUT request to @@ -189,14 +189,14 @@ def update( def list( self, *, - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, + page: int | Omit = omit, + per_page: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AnthropicListResponse: """ To list all Anthropic API keys, send a GET request to @@ -244,7 +244,7 @@ def delete( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AnthropicDeleteResponse: """ To delete an Anthropic API key, send a DELETE request to @@ -275,14 +275,14 @@ def list_agents( self, uuid: str, *, - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, + page: int | Omit = omit, + per_page: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AnthropicListAgentsResponse: """ List Agents by Anthropic Key. @@ -346,14 +346,14 @@ def with_streaming_response(self) -> AsyncAnthropicResourceWithStreamingResponse async def create( self, *, - api_key: str | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, + api_key: str | Omit = omit, + name: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AnthropicCreateResponse: """ To create an Anthropic API key, send a POST request to @@ -398,7 +398,7 @@ async def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AnthropicRetrieveResponse: """ To retrieve details of an Anthropic API key, send a GET request to @@ -429,15 +429,15 @@ async def update( self, path_api_key_uuid: str, *, - api_key: str | NotGiven = NOT_GIVEN, - body_api_key_uuid: str | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, + api_key: str | Omit = omit, + body_api_key_uuid: str | Omit = omit, + name: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AnthropicUpdateResponse: """ To update an Anthropic API key, send a PUT request to @@ -481,14 +481,14 @@ async def update( async def list( self, *, - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, + page: int | Omit = omit, + per_page: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AnthropicListResponse: """ To list all Anthropic API keys, send a GET request to @@ -536,7 +536,7 @@ async def delete( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AnthropicDeleteResponse: """ To delete an Anthropic API key, send a DELETE request to @@ -567,14 +567,14 @@ async def list_agents( self, uuid: str, *, - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, + page: int | Omit = omit, + per_page: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AnthropicListAgentsResponse: """ List Agents by Anthropic Key. diff --git a/src/gradient/resources/models/providers/openai.py b/src/gradient/resources/models/providers/openai.py index 166e284d..5bdc3f20 100644 --- a/src/gradient/resources/models/providers/openai.py +++ b/src/gradient/resources/models/providers/openai.py @@ -4,7 +4,7 @@ import httpx -from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ...._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from ...._utils import maybe_transform, async_maybe_transform from ...._compat import cached_property from ...._resource import SyncAPIResource, AsyncAPIResource @@ -54,14 +54,14 @@ def with_streaming_response(self) -> OpenAIResourceWithStreamingResponse: def create( self, *, - api_key: str | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, + api_key: str | Omit = omit, + name: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> OpenAICreateResponse: """ To create an OpenAI API key, send a POST request to `/v2/gen-ai/openai/keys`. @@ -105,7 +105,7 @@ def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> OpenAIRetrieveResponse: """ To retrieve details of an OpenAI API key, send a GET request to @@ -136,15 +136,15 @@ def update( self, path_api_key_uuid: str, *, - api_key: str | NotGiven = NOT_GIVEN, - body_api_key_uuid: str | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, + api_key: str | Omit = omit, + body_api_key_uuid: str | Omit = omit, + name: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> OpenAIUpdateResponse: """ To update an OpenAI API key, send a PUT request to @@ -188,14 +188,14 @@ def update( def list( self, *, - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, + page: int | Omit = omit, + per_page: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> OpenAIListResponse: """ To list all OpenAI API keys, send a GET request to `/v2/gen-ai/openai/keys`. @@ -242,7 +242,7 @@ def delete( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> OpenAIDeleteResponse: """ To delete an OpenAI API key, send a DELETE request to @@ -273,14 +273,14 @@ def retrieve_agents( self, uuid: str, *, - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, + page: int | Omit = omit, + per_page: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> OpenAIRetrieveAgentsResponse: """ List Agents by OpenAI Key. @@ -344,14 +344,14 @@ def with_streaming_response(self) -> AsyncOpenAIResourceWithStreamingResponse: async def create( self, *, - api_key: str | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, + api_key: str | Omit = omit, + name: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> OpenAICreateResponse: """ To create an OpenAI API key, send a POST request to `/v2/gen-ai/openai/keys`. @@ -395,7 +395,7 @@ async def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> OpenAIRetrieveResponse: """ To retrieve details of an OpenAI API key, send a GET request to @@ -426,15 +426,15 @@ async def update( self, path_api_key_uuid: str, *, - api_key: str | NotGiven = NOT_GIVEN, - body_api_key_uuid: str | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, + api_key: str | Omit = omit, + body_api_key_uuid: str | Omit = omit, + name: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> OpenAIUpdateResponse: """ To update an OpenAI API key, send a PUT request to @@ -478,14 +478,14 @@ async def update( async def list( self, *, - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, + page: int | Omit = omit, + per_page: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> OpenAIListResponse: """ To list all OpenAI API keys, send a GET request to `/v2/gen-ai/openai/keys`. @@ -532,7 +532,7 @@ async def delete( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> OpenAIDeleteResponse: """ To delete an OpenAI API key, send a DELETE request to @@ -563,14 +563,14 @@ async def retrieve_agents( self, uuid: str, *, - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, + page: int | Omit = omit, + per_page: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> OpenAIRetrieveAgentsResponse: """ List Agents by OpenAI Key. diff --git a/src/gradient/resources/regions.py b/src/gradient/resources/regions.py index 779bd4dd..3b0f22fa 100644 --- a/src/gradient/resources/regions.py +++ b/src/gradient/resources/regions.py @@ -5,7 +5,7 @@ import httpx from ..types import region_list_params -from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource @@ -44,14 +44,14 @@ def with_streaming_response(self) -> RegionsResourceWithStreamingResponse: def list( self, *, - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, + page: int | Omit = omit, + per_page: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> RegionListResponse: """ To list all of the regions that are available, send a GET request to @@ -114,14 +114,14 @@ def with_streaming_response(self) -> AsyncRegionsResourceWithStreamingResponse: async def list( self, *, - page: int | NotGiven = NOT_GIVEN, - per_page: int | NotGiven = NOT_GIVEN, + page: int | Omit = omit, + per_page: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> RegionListResponse: """ To list all of the regions that are available, send a GET request to diff --git a/tests/test_transform.py b/tests/test_transform.py index db909f25..098015a9 100644 --- a/tests/test_transform.py +++ b/tests/test_transform.py @@ -8,7 +8,7 @@ import pytest -from gradient._types import NOT_GIVEN, Base64FileInput +from gradient._types import Base64FileInput, omit, not_given from gradient._utils import ( PropertyInfo, transform as _transform, @@ -450,4 +450,11 @@ async def test_transform_skipping(use_async: bool) -> None: @pytest.mark.asyncio async def test_strips_notgiven(use_async: bool) -> None: assert await transform({"foo_bar": "bar"}, Foo1, use_async) == {"fooBar": "bar"} - assert await transform({"foo_bar": NOT_GIVEN}, Foo1, use_async) == {} + assert await transform({"foo_bar": not_given}, Foo1, use_async) == {} + + +@parametrize +@pytest.mark.asyncio +async def test_strips_omit(use_async: bool) -> None: + assert await transform({"foo_bar": "bar"}, Foo1, use_async) == {"fooBar": "bar"} + assert await transform({"foo_bar": omit}, Foo1, use_async) == {} From d83b77a943d7beb3373eebc543cdc787371753a5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 20 Sep 2025 03:46:01 +0000 Subject: [PATCH 2/5] chore: do not install brew dependencies in ./scripts/bootstrap by default --- scripts/bootstrap | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/scripts/bootstrap b/scripts/bootstrap index e84fe62c..b430fee3 100755 --- a/scripts/bootstrap +++ b/scripts/bootstrap @@ -4,10 +4,18 @@ set -e cd "$(dirname "$0")/.." -if ! command -v rye >/dev/null 2>&1 && [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ]; then +if [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ] && [ "$SKIP_BREW" != "1" ] && [ -t 0 ]; then brew bundle check >/dev/null 2>&1 || { - echo "==> Installing Homebrew dependencies…" - brew bundle + echo -n "==> Install Homebrew dependencies? (y/N): " + read -r response + case "$response" in + [yY][eE][sS]|[yY]) + brew bundle + ;; + *) + ;; + esac + echo } fi From 8f3a107935a7ef0aa7e0e93161a24c7ecf24a272 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 23 Sep 2025 03:07:55 +0000 Subject: [PATCH 3/5] chore: improve example values --- .../evaluation_metrics/anthropic/test_keys.py | 24 ++++++------- .../evaluation_metrics/openai/test_keys.py | 24 ++++++------- .../evaluation_metrics/test_workspaces.py | 36 +++++++++---------- .../agents/test_evaluation_runs.py | 12 +++---- .../agents/test_knowledge_bases.py | 12 +++---- tests/api_resources/agents/test_routes.py | 12 +++---- .../databases/schema_registry/test_config.py | 12 +++---- .../gpu_droplets/floating_ips/test_actions.py | 12 +++---- .../gpu_droplets/images/test_actions.py | 12 +++---- .../gpu_droplets/test_autoscale.py | 24 ++++++------- .../gpu_droplets/test_backups.py | 12 +++---- .../test_destroy_with_associated_resources.py | 36 +++++++++---------- .../gpu_droplets/test_firewalls.py | 24 ++++++------- .../gpu_droplets/test_floating_ips.py | 24 ++++++------- .../api_resources/gpu_droplets/test_images.py | 12 +++---- .../gpu_droplets/test_load_balancers.py | 36 +++++++++---------- .../gpu_droplets/test_volumes.py | 24 ++++++------- .../gpu_droplets/volumes/test_snapshots.py | 24 ++++++------- .../api_resources/inference/test_api_keys.py | 24 ++++++------- .../knowledge_bases/test_indexing_jobs.py | 24 ++++++------- .../models/providers/test_anthropic.py | 24 ++++++------- .../models/providers/test_openai.py | 24 ++++++------- tests/api_resources/test_agents.py | 24 ++++++------- tests/api_resources/test_gpu_droplets.py | 36 +++++++++---------- tests/api_resources/test_knowledge_bases.py | 24 ++++++------- 25 files changed, 276 insertions(+), 276 deletions(-) diff --git a/tests/api_resources/agents/evaluation_metrics/anthropic/test_keys.py b/tests/api_resources/agents/evaluation_metrics/anthropic/test_keys.py index b6b461e6..5028698c 100644 --- a/tests/api_resources/agents/evaluation_metrics/anthropic/test_keys.py +++ b/tests/api_resources/agents/evaluation_metrics/anthropic/test_keys.py @@ -65,7 +65,7 @@ def test_streaming_response_create(self, client: Gradient) -> None: @parametrize def test_method_retrieve(self, client: Gradient) -> None: key = client.agents.evaluation_metrics.anthropic.keys.retrieve( - "api_key_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) assert_matches_type(KeyRetrieveResponse, key, path=["response"]) @@ -73,7 +73,7 @@ def test_method_retrieve(self, client: Gradient) -> None: @parametrize def test_raw_response_retrieve(self, client: Gradient) -> None: response = client.agents.evaluation_metrics.anthropic.keys.with_raw_response.retrieve( - "api_key_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) assert response.is_closed is True @@ -85,7 +85,7 @@ def test_raw_response_retrieve(self, client: Gradient) -> None: @parametrize def test_streaming_response_retrieve(self, client: Gradient) -> None: with client.agents.evaluation_metrics.anthropic.keys.with_streaming_response.retrieve( - "api_key_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -197,7 +197,7 @@ def test_streaming_response_list(self, client: Gradient) -> None: @parametrize def test_method_delete(self, client: Gradient) -> None: key = client.agents.evaluation_metrics.anthropic.keys.delete( - "api_key_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) assert_matches_type(KeyDeleteResponse, key, path=["response"]) @@ -205,7 +205,7 @@ def test_method_delete(self, client: Gradient) -> None: @parametrize def test_raw_response_delete(self, client: Gradient) -> None: response = client.agents.evaluation_metrics.anthropic.keys.with_raw_response.delete( - "api_key_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) assert response.is_closed is True @@ -217,7 +217,7 @@ def test_raw_response_delete(self, client: Gradient) -> None: @parametrize def test_streaming_response_delete(self, client: Gradient) -> None: with client.agents.evaluation_metrics.anthropic.keys.with_streaming_response.delete( - "api_key_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -334,7 +334,7 @@ async def test_streaming_response_create(self, async_client: AsyncGradient) -> N @parametrize async def test_method_retrieve(self, async_client: AsyncGradient) -> None: key = await async_client.agents.evaluation_metrics.anthropic.keys.retrieve( - "api_key_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) assert_matches_type(KeyRetrieveResponse, key, path=["response"]) @@ -342,7 +342,7 @@ async def test_method_retrieve(self, async_client: AsyncGradient) -> None: @parametrize async def test_raw_response_retrieve(self, async_client: AsyncGradient) -> None: response = await async_client.agents.evaluation_metrics.anthropic.keys.with_raw_response.retrieve( - "api_key_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) assert response.is_closed is True @@ -354,7 +354,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncGradient) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncGradient) -> None: async with async_client.agents.evaluation_metrics.anthropic.keys.with_streaming_response.retrieve( - "api_key_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -466,7 +466,7 @@ async def test_streaming_response_list(self, async_client: AsyncGradient) -> Non @parametrize async def test_method_delete(self, async_client: AsyncGradient) -> None: key = await async_client.agents.evaluation_metrics.anthropic.keys.delete( - "api_key_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) assert_matches_type(KeyDeleteResponse, key, path=["response"]) @@ -474,7 +474,7 @@ async def test_method_delete(self, async_client: AsyncGradient) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncGradient) -> None: response = await async_client.agents.evaluation_metrics.anthropic.keys.with_raw_response.delete( - "api_key_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) assert response.is_closed is True @@ -486,7 +486,7 @@ async def test_raw_response_delete(self, async_client: AsyncGradient) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncGradient) -> None: async with async_client.agents.evaluation_metrics.anthropic.keys.with_streaming_response.delete( - "api_key_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/agents/evaluation_metrics/openai/test_keys.py b/tests/api_resources/agents/evaluation_metrics/openai/test_keys.py index da5cf8e1..7da165c2 100644 --- a/tests/api_resources/agents/evaluation_metrics/openai/test_keys.py +++ b/tests/api_resources/agents/evaluation_metrics/openai/test_keys.py @@ -65,7 +65,7 @@ def test_streaming_response_create(self, client: Gradient) -> None: @parametrize def test_method_retrieve(self, client: Gradient) -> None: key = client.agents.evaluation_metrics.openai.keys.retrieve( - "api_key_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) assert_matches_type(KeyRetrieveResponse, key, path=["response"]) @@ -73,7 +73,7 @@ def test_method_retrieve(self, client: Gradient) -> None: @parametrize def test_raw_response_retrieve(self, client: Gradient) -> None: response = client.agents.evaluation_metrics.openai.keys.with_raw_response.retrieve( - "api_key_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) assert response.is_closed is True @@ -85,7 +85,7 @@ def test_raw_response_retrieve(self, client: Gradient) -> None: @parametrize def test_streaming_response_retrieve(self, client: Gradient) -> None: with client.agents.evaluation_metrics.openai.keys.with_streaming_response.retrieve( - "api_key_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -197,7 +197,7 @@ def test_streaming_response_list(self, client: Gradient) -> None: @parametrize def test_method_delete(self, client: Gradient) -> None: key = client.agents.evaluation_metrics.openai.keys.delete( - "api_key_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) assert_matches_type(KeyDeleteResponse, key, path=["response"]) @@ -205,7 +205,7 @@ def test_method_delete(self, client: Gradient) -> None: @parametrize def test_raw_response_delete(self, client: Gradient) -> None: response = client.agents.evaluation_metrics.openai.keys.with_raw_response.delete( - "api_key_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) assert response.is_closed is True @@ -217,7 +217,7 @@ def test_raw_response_delete(self, client: Gradient) -> None: @parametrize def test_streaming_response_delete(self, client: Gradient) -> None: with client.agents.evaluation_metrics.openai.keys.with_streaming_response.delete( - "api_key_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -334,7 +334,7 @@ async def test_streaming_response_create(self, async_client: AsyncGradient) -> N @parametrize async def test_method_retrieve(self, async_client: AsyncGradient) -> None: key = await async_client.agents.evaluation_metrics.openai.keys.retrieve( - "api_key_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) assert_matches_type(KeyRetrieveResponse, key, path=["response"]) @@ -342,7 +342,7 @@ async def test_method_retrieve(self, async_client: AsyncGradient) -> None: @parametrize async def test_raw_response_retrieve(self, async_client: AsyncGradient) -> None: response = await async_client.agents.evaluation_metrics.openai.keys.with_raw_response.retrieve( - "api_key_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) assert response.is_closed is True @@ -354,7 +354,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncGradient) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncGradient) -> None: async with async_client.agents.evaluation_metrics.openai.keys.with_streaming_response.retrieve( - "api_key_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -466,7 +466,7 @@ async def test_streaming_response_list(self, async_client: AsyncGradient) -> Non @parametrize async def test_method_delete(self, async_client: AsyncGradient) -> None: key = await async_client.agents.evaluation_metrics.openai.keys.delete( - "api_key_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) assert_matches_type(KeyDeleteResponse, key, path=["response"]) @@ -474,7 +474,7 @@ async def test_method_delete(self, async_client: AsyncGradient) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncGradient) -> None: response = await async_client.agents.evaluation_metrics.openai.keys.with_raw_response.delete( - "api_key_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) assert response.is_closed is True @@ -486,7 +486,7 @@ async def test_raw_response_delete(self, async_client: AsyncGradient) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncGradient) -> None: async with async_client.agents.evaluation_metrics.openai.keys.with_streaming_response.delete( - "api_key_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/agents/evaluation_metrics/test_workspaces.py b/tests/api_resources/agents/evaluation_metrics/test_workspaces.py index 3acede09..4f85212d 100644 --- a/tests/api_resources/agents/evaluation_metrics/test_workspaces.py +++ b/tests/api_resources/agents/evaluation_metrics/test_workspaces.py @@ -66,7 +66,7 @@ def test_streaming_response_create(self, client: Gradient) -> None: @parametrize def test_method_retrieve(self, client: Gradient) -> None: workspace = client.agents.evaluation_metrics.workspaces.retrieve( - "workspace_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) assert_matches_type(WorkspaceRetrieveResponse, workspace, path=["response"]) @@ -74,7 +74,7 @@ def test_method_retrieve(self, client: Gradient) -> None: @parametrize def test_raw_response_retrieve(self, client: Gradient) -> None: response = client.agents.evaluation_metrics.workspaces.with_raw_response.retrieve( - "workspace_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) assert response.is_closed is True @@ -86,7 +86,7 @@ def test_raw_response_retrieve(self, client: Gradient) -> None: @parametrize def test_streaming_response_retrieve(self, client: Gradient) -> None: with client.agents.evaluation_metrics.workspaces.with_streaming_response.retrieve( - "workspace_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -189,7 +189,7 @@ def test_streaming_response_list(self, client: Gradient) -> None: @parametrize def test_method_delete(self, client: Gradient) -> None: workspace = client.agents.evaluation_metrics.workspaces.delete( - "workspace_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) assert_matches_type(WorkspaceDeleteResponse, workspace, path=["response"]) @@ -197,7 +197,7 @@ def test_method_delete(self, client: Gradient) -> None: @parametrize def test_raw_response_delete(self, client: Gradient) -> None: response = client.agents.evaluation_metrics.workspaces.with_raw_response.delete( - "workspace_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) assert response.is_closed is True @@ -209,7 +209,7 @@ def test_raw_response_delete(self, client: Gradient) -> None: @parametrize def test_streaming_response_delete(self, client: Gradient) -> None: with client.agents.evaluation_metrics.workspaces.with_streaming_response.delete( - "workspace_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -231,7 +231,7 @@ def test_path_params_delete(self, client: Gradient) -> None: @parametrize def test_method_list_evaluation_test_cases(self, client: Gradient) -> None: workspace = client.agents.evaluation_metrics.workspaces.list_evaluation_test_cases( - "workspace_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) assert_matches_type(WorkspaceListEvaluationTestCasesResponse, workspace, path=["response"]) @@ -239,7 +239,7 @@ def test_method_list_evaluation_test_cases(self, client: Gradient) -> None: @parametrize def test_raw_response_list_evaluation_test_cases(self, client: Gradient) -> None: response = client.agents.evaluation_metrics.workspaces.with_raw_response.list_evaluation_test_cases( - "workspace_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) assert response.is_closed is True @@ -251,7 +251,7 @@ def test_raw_response_list_evaluation_test_cases(self, client: Gradient) -> None @parametrize def test_streaming_response_list_evaluation_test_cases(self, client: Gradient) -> None: with client.agents.evaluation_metrics.workspaces.with_streaming_response.list_evaluation_test_cases( - "workspace_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -317,7 +317,7 @@ async def test_streaming_response_create(self, async_client: AsyncGradient) -> N @parametrize async def test_method_retrieve(self, async_client: AsyncGradient) -> None: workspace = await async_client.agents.evaluation_metrics.workspaces.retrieve( - "workspace_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) assert_matches_type(WorkspaceRetrieveResponse, workspace, path=["response"]) @@ -325,7 +325,7 @@ async def test_method_retrieve(self, async_client: AsyncGradient) -> None: @parametrize async def test_raw_response_retrieve(self, async_client: AsyncGradient) -> None: response = await async_client.agents.evaluation_metrics.workspaces.with_raw_response.retrieve( - "workspace_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) assert response.is_closed is True @@ -337,7 +337,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncGradient) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncGradient) -> None: async with async_client.agents.evaluation_metrics.workspaces.with_streaming_response.retrieve( - "workspace_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -440,7 +440,7 @@ async def test_streaming_response_list(self, async_client: AsyncGradient) -> Non @parametrize async def test_method_delete(self, async_client: AsyncGradient) -> None: workspace = await async_client.agents.evaluation_metrics.workspaces.delete( - "workspace_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) assert_matches_type(WorkspaceDeleteResponse, workspace, path=["response"]) @@ -448,7 +448,7 @@ async def test_method_delete(self, async_client: AsyncGradient) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncGradient) -> None: response = await async_client.agents.evaluation_metrics.workspaces.with_raw_response.delete( - "workspace_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) assert response.is_closed is True @@ -460,7 +460,7 @@ async def test_raw_response_delete(self, async_client: AsyncGradient) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncGradient) -> None: async with async_client.agents.evaluation_metrics.workspaces.with_streaming_response.delete( - "workspace_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -482,7 +482,7 @@ async def test_path_params_delete(self, async_client: AsyncGradient) -> None: @parametrize async def test_method_list_evaluation_test_cases(self, async_client: AsyncGradient) -> None: workspace = await async_client.agents.evaluation_metrics.workspaces.list_evaluation_test_cases( - "workspace_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) assert_matches_type(WorkspaceListEvaluationTestCasesResponse, workspace, path=["response"]) @@ -490,7 +490,7 @@ async def test_method_list_evaluation_test_cases(self, async_client: AsyncGradie @parametrize async def test_raw_response_list_evaluation_test_cases(self, async_client: AsyncGradient) -> None: response = await async_client.agents.evaluation_metrics.workspaces.with_raw_response.list_evaluation_test_cases( - "workspace_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) assert response.is_closed is True @@ -502,7 +502,7 @@ async def test_raw_response_list_evaluation_test_cases(self, async_client: Async @parametrize async def test_streaming_response_list_evaluation_test_cases(self, async_client: AsyncGradient) -> None: async with async_client.agents.evaluation_metrics.workspaces.with_streaming_response.list_evaluation_test_cases( - "workspace_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/agents/test_evaluation_runs.py b/tests/api_resources/agents/test_evaluation_runs.py index 8d7e1826..c6acaf82 100644 --- a/tests/api_resources/agents/test_evaluation_runs.py +++ b/tests/api_resources/agents/test_evaluation_runs.py @@ -64,7 +64,7 @@ def test_streaming_response_create(self, client: Gradient) -> None: @parametrize def test_method_retrieve(self, client: Gradient) -> None: evaluation_run = client.agents.evaluation_runs.retrieve( - "evaluation_run_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) assert_matches_type(EvaluationRunRetrieveResponse, evaluation_run, path=["response"]) @@ -72,7 +72,7 @@ def test_method_retrieve(self, client: Gradient) -> None: @parametrize def test_raw_response_retrieve(self, client: Gradient) -> None: response = client.agents.evaluation_runs.with_raw_response.retrieve( - "evaluation_run_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) assert response.is_closed is True @@ -84,7 +84,7 @@ def test_raw_response_retrieve(self, client: Gradient) -> None: @parametrize def test_streaming_response_retrieve(self, client: Gradient) -> None: with client.agents.evaluation_runs.with_streaming_response.retrieve( - "evaluation_run_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -248,7 +248,7 @@ async def test_streaming_response_create(self, async_client: AsyncGradient) -> N @parametrize async def test_method_retrieve(self, async_client: AsyncGradient) -> None: evaluation_run = await async_client.agents.evaluation_runs.retrieve( - "evaluation_run_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) assert_matches_type(EvaluationRunRetrieveResponse, evaluation_run, path=["response"]) @@ -256,7 +256,7 @@ async def test_method_retrieve(self, async_client: AsyncGradient) -> None: @parametrize async def test_raw_response_retrieve(self, async_client: AsyncGradient) -> None: response = await async_client.agents.evaluation_runs.with_raw_response.retrieve( - "evaluation_run_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) assert response.is_closed is True @@ -268,7 +268,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncGradient) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncGradient) -> None: async with async_client.agents.evaluation_runs.with_streaming_response.retrieve( - "evaluation_run_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/agents/test_knowledge_bases.py b/tests/api_resources/agents/test_knowledge_bases.py index 60dae7d0..2cf09753 100644 --- a/tests/api_resources/agents/test_knowledge_bases.py +++ b/tests/api_resources/agents/test_knowledge_bases.py @@ -21,7 +21,7 @@ class TestKnowledgeBases: @parametrize def test_method_attach(self, client: Gradient) -> None: knowledge_base = client.agents.knowledge_bases.attach( - "agent_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) assert_matches_type(APILinkKnowledgeBaseOutput, knowledge_base, path=["response"]) @@ -29,7 +29,7 @@ def test_method_attach(self, client: Gradient) -> None: @parametrize def test_raw_response_attach(self, client: Gradient) -> None: response = client.agents.knowledge_bases.with_raw_response.attach( - "agent_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) assert response.is_closed is True @@ -41,7 +41,7 @@ def test_raw_response_attach(self, client: Gradient) -> None: @parametrize def test_streaming_response_attach(self, client: Gradient) -> None: with client.agents.knowledge_bases.with_streaming_response.attach( - "agent_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -173,7 +173,7 @@ class TestAsyncKnowledgeBases: @parametrize async def test_method_attach(self, async_client: AsyncGradient) -> None: knowledge_base = await async_client.agents.knowledge_bases.attach( - "agent_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) assert_matches_type(APILinkKnowledgeBaseOutput, knowledge_base, path=["response"]) @@ -181,7 +181,7 @@ async def test_method_attach(self, async_client: AsyncGradient) -> None: @parametrize async def test_raw_response_attach(self, async_client: AsyncGradient) -> None: response = await async_client.agents.knowledge_bases.with_raw_response.attach( - "agent_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) assert response.is_closed is True @@ -193,7 +193,7 @@ async def test_raw_response_attach(self, async_client: AsyncGradient) -> None: @parametrize async def test_streaming_response_attach(self, async_client: AsyncGradient) -> None: async with async_client.agents.knowledge_bases.with_streaming_response.attach( - "agent_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/agents/test_routes.py b/tests/api_resources/agents/test_routes.py index 37bc4eac..3444dcc7 100644 --- a/tests/api_resources/agents/test_routes.py +++ b/tests/api_resources/agents/test_routes.py @@ -213,7 +213,7 @@ def test_path_params_add(self, client: Gradient) -> None: @parametrize def test_method_view(self, client: Gradient) -> None: route = client.agents.routes.view( - "uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) assert_matches_type(RouteViewResponse, route, path=["response"]) @@ -221,7 +221,7 @@ def test_method_view(self, client: Gradient) -> None: @parametrize def test_raw_response_view(self, client: Gradient) -> None: response = client.agents.routes.with_raw_response.view( - "uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) assert response.is_closed is True @@ -233,7 +233,7 @@ def test_raw_response_view(self, client: Gradient) -> None: @parametrize def test_streaming_response_view(self, client: Gradient) -> None: with client.agents.routes.with_streaming_response.view( - "uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -448,7 +448,7 @@ async def test_path_params_add(self, async_client: AsyncGradient) -> None: @parametrize async def test_method_view(self, async_client: AsyncGradient) -> None: route = await async_client.agents.routes.view( - "uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) assert_matches_type(RouteViewResponse, route, path=["response"]) @@ -456,7 +456,7 @@ async def test_method_view(self, async_client: AsyncGradient) -> None: @parametrize async def test_raw_response_view(self, async_client: AsyncGradient) -> None: response = await async_client.agents.routes.with_raw_response.view( - "uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) assert response.is_closed is True @@ -468,7 +468,7 @@ async def test_raw_response_view(self, async_client: AsyncGradient) -> None: @parametrize async def test_streaming_response_view(self, async_client: AsyncGradient) -> None: async with async_client.agents.routes.with_streaming_response.view( - "uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/databases/schema_registry/test_config.py b/tests/api_resources/databases/schema_registry/test_config.py index b1d21f62..ebd60c4c 100644 --- a/tests/api_resources/databases/schema_registry/test_config.py +++ b/tests/api_resources/databases/schema_registry/test_config.py @@ -26,7 +26,7 @@ class TestConfig: @parametrize def test_method_retrieve(self, client: Gradient) -> None: config = client.databases.schema_registry.config.retrieve( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + "9cc10173-e9ea-4176-9dbc-a4cee4c4ff30", ) assert_matches_type(ConfigRetrieveResponse, config, path=["response"]) @@ -34,7 +34,7 @@ def test_method_retrieve(self, client: Gradient) -> None: @parametrize def test_raw_response_retrieve(self, client: Gradient) -> None: response = client.databases.schema_registry.config.with_raw_response.retrieve( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + "9cc10173-e9ea-4176-9dbc-a4cee4c4ff30", ) assert response.is_closed is True @@ -46,7 +46,7 @@ def test_raw_response_retrieve(self, client: Gradient) -> None: @parametrize def test_streaming_response_retrieve(self, client: Gradient) -> None: with client.databases.schema_registry.config.with_streaming_response.retrieve( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + "9cc10173-e9ea-4176-9dbc-a4cee4c4ff30", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -229,7 +229,7 @@ class TestAsyncConfig: @parametrize async def test_method_retrieve(self, async_client: AsyncGradient) -> None: config = await async_client.databases.schema_registry.config.retrieve( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + "9cc10173-e9ea-4176-9dbc-a4cee4c4ff30", ) assert_matches_type(ConfigRetrieveResponse, config, path=["response"]) @@ -237,7 +237,7 @@ async def test_method_retrieve(self, async_client: AsyncGradient) -> None: @parametrize async def test_raw_response_retrieve(self, async_client: AsyncGradient) -> None: response = await async_client.databases.schema_registry.config.with_raw_response.retrieve( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + "9cc10173-e9ea-4176-9dbc-a4cee4c4ff30", ) assert response.is_closed is True @@ -249,7 +249,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncGradient) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncGradient) -> None: async with async_client.databases.schema_registry.config.with_streaming_response.retrieve( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + "9cc10173-e9ea-4176-9dbc-a4cee4c4ff30", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/gpu_droplets/floating_ips/test_actions.py b/tests/api_resources/gpu_droplets/floating_ips/test_actions.py index 0d678103..7f7ab06a 100644 --- a/tests/api_resources/gpu_droplets/floating_ips/test_actions.py +++ b/tests/api_resources/gpu_droplets/floating_ips/test_actions.py @@ -167,7 +167,7 @@ def test_path_params_retrieve(self, client: Gradient) -> None: @parametrize def test_method_list(self, client: Gradient) -> None: action = client.gpu_droplets.floating_ips.actions.list( - "192.168.1.1", + "45.55.96.47", ) assert_matches_type(ActionListResponse, action, path=["response"]) @@ -175,7 +175,7 @@ def test_method_list(self, client: Gradient) -> None: @parametrize def test_raw_response_list(self, client: Gradient) -> None: response = client.gpu_droplets.floating_ips.actions.with_raw_response.list( - "192.168.1.1", + "45.55.96.47", ) assert response.is_closed is True @@ -187,7 +187,7 @@ def test_raw_response_list(self, client: Gradient) -> None: @parametrize def test_streaming_response_list(self, client: Gradient) -> None: with client.gpu_droplets.floating_ips.actions.with_streaming_response.list( - "192.168.1.1", + "45.55.96.47", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -357,7 +357,7 @@ async def test_path_params_retrieve(self, async_client: AsyncGradient) -> None: @parametrize async def test_method_list(self, async_client: AsyncGradient) -> None: action = await async_client.gpu_droplets.floating_ips.actions.list( - "192.168.1.1", + "45.55.96.47", ) assert_matches_type(ActionListResponse, action, path=["response"]) @@ -365,7 +365,7 @@ async def test_method_list(self, async_client: AsyncGradient) -> None: @parametrize async def test_raw_response_list(self, async_client: AsyncGradient) -> None: response = await async_client.gpu_droplets.floating_ips.actions.with_raw_response.list( - "192.168.1.1", + "45.55.96.47", ) assert response.is_closed is True @@ -377,7 +377,7 @@ async def test_raw_response_list(self, async_client: AsyncGradient) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncGradient) -> None: async with async_client.gpu_droplets.floating_ips.actions.with_streaming_response.list( - "192.168.1.1", + "45.55.96.47", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/gpu_droplets/images/test_actions.py b/tests/api_resources/gpu_droplets/images/test_actions.py index ad8b9585..ad5d4892 100644 --- a/tests/api_resources/gpu_droplets/images/test_actions.py +++ b/tests/api_resources/gpu_droplets/images/test_actions.py @@ -136,7 +136,7 @@ def test_streaming_response_retrieve(self, client: Gradient) -> None: @parametrize def test_method_list(self, client: Gradient) -> None: action = client.gpu_droplets.images.actions.list( - 0, + 62137902, ) assert_matches_type(ActionListResponse, action, path=["response"]) @@ -144,7 +144,7 @@ def test_method_list(self, client: Gradient) -> None: @parametrize def test_raw_response_list(self, client: Gradient) -> None: response = client.gpu_droplets.images.actions.with_raw_response.list( - 0, + 62137902, ) assert response.is_closed is True @@ -156,7 +156,7 @@ def test_raw_response_list(self, client: Gradient) -> None: @parametrize def test_streaming_response_list(self, client: Gradient) -> None: with client.gpu_droplets.images.actions.with_streaming_response.list( - 0, + 62137902, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -290,7 +290,7 @@ async def test_streaming_response_retrieve(self, async_client: AsyncGradient) -> @parametrize async def test_method_list(self, async_client: AsyncGradient) -> None: action = await async_client.gpu_droplets.images.actions.list( - 0, + 62137902, ) assert_matches_type(ActionListResponse, action, path=["response"]) @@ -298,7 +298,7 @@ async def test_method_list(self, async_client: AsyncGradient) -> None: @parametrize async def test_raw_response_list(self, async_client: AsyncGradient) -> None: response = await async_client.gpu_droplets.images.actions.with_raw_response.list( - 0, + 62137902, ) assert response.is_closed is True @@ -310,7 +310,7 @@ async def test_raw_response_list(self, async_client: AsyncGradient) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncGradient) -> None: async with async_client.gpu_droplets.images.actions.with_streaming_response.list( - 0, + 62137902, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/gpu_droplets/test_autoscale.py b/tests/api_resources/gpu_droplets/test_autoscale.py index cbf67b19..bbb0c2e4 100644 --- a/tests/api_resources/gpu_droplets/test_autoscale.py +++ b/tests/api_resources/gpu_droplets/test_autoscale.py @@ -120,7 +120,7 @@ def test_streaming_response_create(self, client: Gradient) -> None: @parametrize def test_method_retrieve(self, client: Gradient) -> None: autoscale = client.gpu_droplets.autoscale.retrieve( - "autoscale_pool_id", + "0d3db13e-a604-4944-9827-7ec2642d32ac", ) assert_matches_type(AutoscaleRetrieveResponse, autoscale, path=["response"]) @@ -128,7 +128,7 @@ def test_method_retrieve(self, client: Gradient) -> None: @parametrize def test_raw_response_retrieve(self, client: Gradient) -> None: response = client.gpu_droplets.autoscale.with_raw_response.retrieve( - "autoscale_pool_id", + "0d3db13e-a604-4944-9827-7ec2642d32ac", ) assert response.is_closed is True @@ -140,7 +140,7 @@ def test_raw_response_retrieve(self, client: Gradient) -> None: @parametrize def test_streaming_response_retrieve(self, client: Gradient) -> None: with client.gpu_droplets.autoscale.with_streaming_response.retrieve( - "autoscale_pool_id", + "0d3db13e-a604-4944-9827-7ec2642d32ac", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -297,7 +297,7 @@ def test_streaming_response_list(self, client: Gradient) -> None: @parametrize def test_method_delete(self, client: Gradient) -> None: autoscale = client.gpu_droplets.autoscale.delete( - "autoscale_pool_id", + "0d3db13e-a604-4944-9827-7ec2642d32ac", ) assert autoscale is None @@ -305,7 +305,7 @@ def test_method_delete(self, client: Gradient) -> None: @parametrize def test_raw_response_delete(self, client: Gradient) -> None: response = client.gpu_droplets.autoscale.with_raw_response.delete( - "autoscale_pool_id", + "0d3db13e-a604-4944-9827-7ec2642d32ac", ) assert response.is_closed is True @@ -317,7 +317,7 @@ def test_raw_response_delete(self, client: Gradient) -> None: @parametrize def test_streaming_response_delete(self, client: Gradient) -> None: with client.gpu_droplets.autoscale.with_streaming_response.delete( - "autoscale_pool_id", + "0d3db13e-a604-4944-9827-7ec2642d32ac", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -587,7 +587,7 @@ async def test_streaming_response_create(self, async_client: AsyncGradient) -> N @parametrize async def test_method_retrieve(self, async_client: AsyncGradient) -> None: autoscale = await async_client.gpu_droplets.autoscale.retrieve( - "autoscale_pool_id", + "0d3db13e-a604-4944-9827-7ec2642d32ac", ) assert_matches_type(AutoscaleRetrieveResponse, autoscale, path=["response"]) @@ -595,7 +595,7 @@ async def test_method_retrieve(self, async_client: AsyncGradient) -> None: @parametrize async def test_raw_response_retrieve(self, async_client: AsyncGradient) -> None: response = await async_client.gpu_droplets.autoscale.with_raw_response.retrieve( - "autoscale_pool_id", + "0d3db13e-a604-4944-9827-7ec2642d32ac", ) assert response.is_closed is True @@ -607,7 +607,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncGradient) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncGradient) -> None: async with async_client.gpu_droplets.autoscale.with_streaming_response.retrieve( - "autoscale_pool_id", + "0d3db13e-a604-4944-9827-7ec2642d32ac", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -764,7 +764,7 @@ async def test_streaming_response_list(self, async_client: AsyncGradient) -> Non @parametrize async def test_method_delete(self, async_client: AsyncGradient) -> None: autoscale = await async_client.gpu_droplets.autoscale.delete( - "autoscale_pool_id", + "0d3db13e-a604-4944-9827-7ec2642d32ac", ) assert autoscale is None @@ -772,7 +772,7 @@ async def test_method_delete(self, async_client: AsyncGradient) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncGradient) -> None: response = await async_client.gpu_droplets.autoscale.with_raw_response.delete( - "autoscale_pool_id", + "0d3db13e-a604-4944-9827-7ec2642d32ac", ) assert response.is_closed is True @@ -784,7 +784,7 @@ async def test_raw_response_delete(self, async_client: AsyncGradient) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncGradient) -> None: async with async_client.gpu_droplets.autoscale.with_streaming_response.delete( - "autoscale_pool_id", + "0d3db13e-a604-4944-9827-7ec2642d32ac", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/gpu_droplets/test_backups.py b/tests/api_resources/gpu_droplets/test_backups.py index 4a0d36b9..c6e854e4 100644 --- a/tests/api_resources/gpu_droplets/test_backups.py +++ b/tests/api_resources/gpu_droplets/test_backups.py @@ -135,7 +135,7 @@ def test_streaming_response_list_supported_policies(self, client: Gradient) -> N @parametrize def test_method_retrieve_policy(self, client: Gradient) -> None: backup = client.gpu_droplets.backups.retrieve_policy( - 1, + 3164444, ) assert_matches_type(BackupRetrievePolicyResponse, backup, path=["response"]) @@ -143,7 +143,7 @@ def test_method_retrieve_policy(self, client: Gradient) -> None: @parametrize def test_raw_response_retrieve_policy(self, client: Gradient) -> None: response = client.gpu_droplets.backups.with_raw_response.retrieve_policy( - 1, + 3164444, ) assert response.is_closed is True @@ -155,7 +155,7 @@ def test_raw_response_retrieve_policy(self, client: Gradient) -> None: @parametrize def test_streaming_response_retrieve_policy(self, client: Gradient) -> None: with client.gpu_droplets.backups.with_streaming_response.retrieve_policy( - 1, + 3164444, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -284,7 +284,7 @@ async def test_streaming_response_list_supported_policies(self, async_client: As @parametrize async def test_method_retrieve_policy(self, async_client: AsyncGradient) -> None: backup = await async_client.gpu_droplets.backups.retrieve_policy( - 1, + 3164444, ) assert_matches_type(BackupRetrievePolicyResponse, backup, path=["response"]) @@ -292,7 +292,7 @@ async def test_method_retrieve_policy(self, async_client: AsyncGradient) -> None @parametrize async def test_raw_response_retrieve_policy(self, async_client: AsyncGradient) -> None: response = await async_client.gpu_droplets.backups.with_raw_response.retrieve_policy( - 1, + 3164444, ) assert response.is_closed is True @@ -304,7 +304,7 @@ async def test_raw_response_retrieve_policy(self, async_client: AsyncGradient) - @parametrize async def test_streaming_response_retrieve_policy(self, async_client: AsyncGradient) -> None: async with async_client.gpu_droplets.backups.with_streaming_response.retrieve_policy( - 1, + 3164444, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/gpu_droplets/test_destroy_with_associated_resources.py b/tests/api_resources/gpu_droplets/test_destroy_with_associated_resources.py index 166206d2..80f1bd7c 100644 --- a/tests/api_resources/gpu_droplets/test_destroy_with_associated_resources.py +++ b/tests/api_resources/gpu_droplets/test_destroy_with_associated_resources.py @@ -24,7 +24,7 @@ class TestDestroyWithAssociatedResources: @parametrize def test_method_list(self, client: Gradient) -> None: destroy_with_associated_resource = client.gpu_droplets.destroy_with_associated_resources.list( - 1, + 3164444, ) assert_matches_type( DestroyWithAssociatedResourceListResponse, destroy_with_associated_resource, path=["response"] @@ -34,7 +34,7 @@ def test_method_list(self, client: Gradient) -> None: @parametrize def test_raw_response_list(self, client: Gradient) -> None: response = client.gpu_droplets.destroy_with_associated_resources.with_raw_response.list( - 1, + 3164444, ) assert response.is_closed is True @@ -48,7 +48,7 @@ def test_raw_response_list(self, client: Gradient) -> None: @parametrize def test_streaming_response_list(self, client: Gradient) -> None: with client.gpu_droplets.destroy_with_associated_resources.with_streaming_response.list( - 1, + 3164444, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -64,7 +64,7 @@ def test_streaming_response_list(self, client: Gradient) -> None: @parametrize def test_method_check_status(self, client: Gradient) -> None: destroy_with_associated_resource = client.gpu_droplets.destroy_with_associated_resources.check_status( - 1, + 3164444, ) assert_matches_type( DestroyWithAssociatedResourceCheckStatusResponse, destroy_with_associated_resource, path=["response"] @@ -74,7 +74,7 @@ def test_method_check_status(self, client: Gradient) -> None: @parametrize def test_raw_response_check_status(self, client: Gradient) -> None: response = client.gpu_droplets.destroy_with_associated_resources.with_raw_response.check_status( - 1, + 3164444, ) assert response.is_closed is True @@ -88,7 +88,7 @@ def test_raw_response_check_status(self, client: Gradient) -> None: @parametrize def test_streaming_response_check_status(self, client: Gradient) -> None: with client.gpu_droplets.destroy_with_associated_resources.with_streaming_response.check_status( - 1, + 3164444, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -188,7 +188,7 @@ def test_streaming_response_delete_selective(self, client: Gradient) -> None: @parametrize def test_method_retry(self, client: Gradient) -> None: destroy_with_associated_resource = client.gpu_droplets.destroy_with_associated_resources.retry( - 1, + 3164444, ) assert destroy_with_associated_resource is None @@ -196,7 +196,7 @@ def test_method_retry(self, client: Gradient) -> None: @parametrize def test_raw_response_retry(self, client: Gradient) -> None: response = client.gpu_droplets.destroy_with_associated_resources.with_raw_response.retry( - 1, + 3164444, ) assert response.is_closed is True @@ -208,7 +208,7 @@ def test_raw_response_retry(self, client: Gradient) -> None: @parametrize def test_streaming_response_retry(self, client: Gradient) -> None: with client.gpu_droplets.destroy_with_associated_resources.with_streaming_response.retry( - 1, + 3164444, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -228,7 +228,7 @@ class TestAsyncDestroyWithAssociatedResources: @parametrize async def test_method_list(self, async_client: AsyncGradient) -> None: destroy_with_associated_resource = await async_client.gpu_droplets.destroy_with_associated_resources.list( - 1, + 3164444, ) assert_matches_type( DestroyWithAssociatedResourceListResponse, destroy_with_associated_resource, path=["response"] @@ -238,7 +238,7 @@ async def test_method_list(self, async_client: AsyncGradient) -> None: @parametrize async def test_raw_response_list(self, async_client: AsyncGradient) -> None: response = await async_client.gpu_droplets.destroy_with_associated_resources.with_raw_response.list( - 1, + 3164444, ) assert response.is_closed is True @@ -252,7 +252,7 @@ async def test_raw_response_list(self, async_client: AsyncGradient) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncGradient) -> None: async with async_client.gpu_droplets.destroy_with_associated_resources.with_streaming_response.list( - 1, + 3164444, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -269,7 +269,7 @@ async def test_streaming_response_list(self, async_client: AsyncGradient) -> Non async def test_method_check_status(self, async_client: AsyncGradient) -> None: destroy_with_associated_resource = ( await async_client.gpu_droplets.destroy_with_associated_resources.check_status( - 1, + 3164444, ) ) assert_matches_type( @@ -280,7 +280,7 @@ async def test_method_check_status(self, async_client: AsyncGradient) -> None: @parametrize async def test_raw_response_check_status(self, async_client: AsyncGradient) -> None: response = await async_client.gpu_droplets.destroy_with_associated_resources.with_raw_response.check_status( - 1, + 3164444, ) assert response.is_closed is True @@ -294,7 +294,7 @@ async def test_raw_response_check_status(self, async_client: AsyncGradient) -> N @parametrize async def test_streaming_response_check_status(self, async_client: AsyncGradient) -> None: async with async_client.gpu_droplets.destroy_with_associated_resources.with_streaming_response.check_status( - 1, + 3164444, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -400,7 +400,7 @@ async def test_streaming_response_delete_selective(self, async_client: AsyncGrad @parametrize async def test_method_retry(self, async_client: AsyncGradient) -> None: destroy_with_associated_resource = await async_client.gpu_droplets.destroy_with_associated_resources.retry( - 1, + 3164444, ) assert destroy_with_associated_resource is None @@ -408,7 +408,7 @@ async def test_method_retry(self, async_client: AsyncGradient) -> None: @parametrize async def test_raw_response_retry(self, async_client: AsyncGradient) -> None: response = await async_client.gpu_droplets.destroy_with_associated_resources.with_raw_response.retry( - 1, + 3164444, ) assert response.is_closed is True @@ -420,7 +420,7 @@ async def test_raw_response_retry(self, async_client: AsyncGradient) -> None: @parametrize async def test_streaming_response_retry(self, async_client: AsyncGradient) -> None: async with async_client.gpu_droplets.destroy_with_associated_resources.with_streaming_response.retry( - 1, + 3164444, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/gpu_droplets/test_firewalls.py b/tests/api_resources/gpu_droplets/test_firewalls.py index 83142b93..3d8469b3 100644 --- a/tests/api_resources/gpu_droplets/test_firewalls.py +++ b/tests/api_resources/gpu_droplets/test_firewalls.py @@ -103,7 +103,7 @@ def test_streaming_response_create(self, client: Gradient) -> None: @parametrize def test_method_retrieve(self, client: Gradient) -> None: firewall = client.gpu_droplets.firewalls.retrieve( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + "bb4b2611-3d72-467b-8602-280330ecd65c", ) assert_matches_type(FirewallRetrieveResponse, firewall, path=["response"]) @@ -111,7 +111,7 @@ def test_method_retrieve(self, client: Gradient) -> None: @parametrize def test_raw_response_retrieve(self, client: Gradient) -> None: response = client.gpu_droplets.firewalls.with_raw_response.retrieve( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + "bb4b2611-3d72-467b-8602-280330ecd65c", ) assert response.is_closed is True @@ -123,7 +123,7 @@ def test_raw_response_retrieve(self, client: Gradient) -> None: @parametrize def test_streaming_response_retrieve(self, client: Gradient) -> None: with client.gpu_droplets.firewalls.with_streaming_response.retrieve( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + "bb4b2611-3d72-467b-8602-280330ecd65c", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -278,7 +278,7 @@ def test_streaming_response_list(self, client: Gradient) -> None: @parametrize def test_method_delete(self, client: Gradient) -> None: firewall = client.gpu_droplets.firewalls.delete( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + "bb4b2611-3d72-467b-8602-280330ecd65c", ) assert firewall is None @@ -286,7 +286,7 @@ def test_method_delete(self, client: Gradient) -> None: @parametrize def test_raw_response_delete(self, client: Gradient) -> None: response = client.gpu_droplets.firewalls.with_raw_response.delete( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + "bb4b2611-3d72-467b-8602-280330ecd65c", ) assert response.is_closed is True @@ -298,7 +298,7 @@ def test_raw_response_delete(self, client: Gradient) -> None: @parametrize def test_streaming_response_delete(self, client: Gradient) -> None: with client.gpu_droplets.firewalls.with_streaming_response.delete( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + "bb4b2611-3d72-467b-8602-280330ecd65c", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -403,7 +403,7 @@ async def test_streaming_response_create(self, async_client: AsyncGradient) -> N @parametrize async def test_method_retrieve(self, async_client: AsyncGradient) -> None: firewall = await async_client.gpu_droplets.firewalls.retrieve( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + "bb4b2611-3d72-467b-8602-280330ecd65c", ) assert_matches_type(FirewallRetrieveResponse, firewall, path=["response"]) @@ -411,7 +411,7 @@ async def test_method_retrieve(self, async_client: AsyncGradient) -> None: @parametrize async def test_raw_response_retrieve(self, async_client: AsyncGradient) -> None: response = await async_client.gpu_droplets.firewalls.with_raw_response.retrieve( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + "bb4b2611-3d72-467b-8602-280330ecd65c", ) assert response.is_closed is True @@ -423,7 +423,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncGradient) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncGradient) -> None: async with async_client.gpu_droplets.firewalls.with_streaming_response.retrieve( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + "bb4b2611-3d72-467b-8602-280330ecd65c", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -578,7 +578,7 @@ async def test_streaming_response_list(self, async_client: AsyncGradient) -> Non @parametrize async def test_method_delete(self, async_client: AsyncGradient) -> None: firewall = await async_client.gpu_droplets.firewalls.delete( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + "bb4b2611-3d72-467b-8602-280330ecd65c", ) assert firewall is None @@ -586,7 +586,7 @@ async def test_method_delete(self, async_client: AsyncGradient) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncGradient) -> None: response = await async_client.gpu_droplets.firewalls.with_raw_response.delete( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + "bb4b2611-3d72-467b-8602-280330ecd65c", ) assert response.is_closed is True @@ -598,7 +598,7 @@ async def test_raw_response_delete(self, async_client: AsyncGradient) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncGradient) -> None: async with async_client.gpu_droplets.firewalls.with_streaming_response.delete( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + "bb4b2611-3d72-467b-8602-280330ecd65c", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/gpu_droplets/test_floating_ips.py b/tests/api_resources/gpu_droplets/test_floating_ips.py index c252a24a..3119bf28 100644 --- a/tests/api_resources/gpu_droplets/test_floating_ips.py +++ b/tests/api_resources/gpu_droplets/test_floating_ips.py @@ -102,7 +102,7 @@ def test_streaming_response_create_overload_2(self, client: Gradient) -> None: @parametrize def test_method_retrieve(self, client: Gradient) -> None: floating_ip = client.gpu_droplets.floating_ips.retrieve( - "192.168.1.1", + "45.55.96.47", ) assert_matches_type(FloatingIPRetrieveResponse, floating_ip, path=["response"]) @@ -110,7 +110,7 @@ def test_method_retrieve(self, client: Gradient) -> None: @parametrize def test_raw_response_retrieve(self, client: Gradient) -> None: response = client.gpu_droplets.floating_ips.with_raw_response.retrieve( - "192.168.1.1", + "45.55.96.47", ) assert response.is_closed is True @@ -122,7 +122,7 @@ def test_raw_response_retrieve(self, client: Gradient) -> None: @parametrize def test_streaming_response_retrieve(self, client: Gradient) -> None: with client.gpu_droplets.floating_ips.with_streaming_response.retrieve( - "192.168.1.1", + "45.55.96.47", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -181,7 +181,7 @@ def test_streaming_response_list(self, client: Gradient) -> None: @parametrize def test_method_delete(self, client: Gradient) -> None: floating_ip = client.gpu_droplets.floating_ips.delete( - "192.168.1.1", + "45.55.96.47", ) assert floating_ip is None @@ -189,7 +189,7 @@ def test_method_delete(self, client: Gradient) -> None: @parametrize def test_raw_response_delete(self, client: Gradient) -> None: response = client.gpu_droplets.floating_ips.with_raw_response.delete( - "192.168.1.1", + "45.55.96.47", ) assert response.is_closed is True @@ -201,7 +201,7 @@ def test_raw_response_delete(self, client: Gradient) -> None: @parametrize def test_streaming_response_delete(self, client: Gradient) -> None: with client.gpu_droplets.floating_ips.with_streaming_response.delete( - "192.168.1.1", + "45.55.96.47", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -306,7 +306,7 @@ async def test_streaming_response_create_overload_2(self, async_client: AsyncGra @parametrize async def test_method_retrieve(self, async_client: AsyncGradient) -> None: floating_ip = await async_client.gpu_droplets.floating_ips.retrieve( - "192.168.1.1", + "45.55.96.47", ) assert_matches_type(FloatingIPRetrieveResponse, floating_ip, path=["response"]) @@ -314,7 +314,7 @@ async def test_method_retrieve(self, async_client: AsyncGradient) -> None: @parametrize async def test_raw_response_retrieve(self, async_client: AsyncGradient) -> None: response = await async_client.gpu_droplets.floating_ips.with_raw_response.retrieve( - "192.168.1.1", + "45.55.96.47", ) assert response.is_closed is True @@ -326,7 +326,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncGradient) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncGradient) -> None: async with async_client.gpu_droplets.floating_ips.with_streaming_response.retrieve( - "192.168.1.1", + "45.55.96.47", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -385,7 +385,7 @@ async def test_streaming_response_list(self, async_client: AsyncGradient) -> Non @parametrize async def test_method_delete(self, async_client: AsyncGradient) -> None: floating_ip = await async_client.gpu_droplets.floating_ips.delete( - "192.168.1.1", + "45.55.96.47", ) assert floating_ip is None @@ -393,7 +393,7 @@ async def test_method_delete(self, async_client: AsyncGradient) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncGradient) -> None: response = await async_client.gpu_droplets.floating_ips.with_raw_response.delete( - "192.168.1.1", + "45.55.96.47", ) assert response.is_closed is True @@ -405,7 +405,7 @@ async def test_raw_response_delete(self, async_client: AsyncGradient) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncGradient) -> None: async with async_client.gpu_droplets.floating_ips.with_streaming_response.delete( - "192.168.1.1", + "45.55.96.47", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/gpu_droplets/test_images.py b/tests/api_resources/gpu_droplets/test_images.py index 8f81912d..4c4146e2 100644 --- a/tests/api_resources/gpu_droplets/test_images.py +++ b/tests/api_resources/gpu_droplets/test_images.py @@ -186,7 +186,7 @@ def test_streaming_response_list(self, client: Gradient) -> None: @parametrize def test_method_delete(self, client: Gradient) -> None: image = client.gpu_droplets.images.delete( - 0, + 62137902, ) assert image is None @@ -194,7 +194,7 @@ def test_method_delete(self, client: Gradient) -> None: @parametrize def test_raw_response_delete(self, client: Gradient) -> None: response = client.gpu_droplets.images.with_raw_response.delete( - 0, + 62137902, ) assert response.is_closed is True @@ -206,7 +206,7 @@ def test_raw_response_delete(self, client: Gradient) -> None: @parametrize def test_streaming_response_delete(self, client: Gradient) -> None: with client.gpu_droplets.images.with_streaming_response.delete( - 0, + 62137902, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -386,7 +386,7 @@ async def test_streaming_response_list(self, async_client: AsyncGradient) -> Non @parametrize async def test_method_delete(self, async_client: AsyncGradient) -> None: image = await async_client.gpu_droplets.images.delete( - 0, + 62137902, ) assert image is None @@ -394,7 +394,7 @@ async def test_method_delete(self, async_client: AsyncGradient) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncGradient) -> None: response = await async_client.gpu_droplets.images.with_raw_response.delete( - 0, + 62137902, ) assert response.is_closed is True @@ -406,7 +406,7 @@ async def test_raw_response_delete(self, async_client: AsyncGradient) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncGradient) -> None: async with async_client.gpu_droplets.images.with_streaming_response.delete( - 0, + 62137902, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/gpu_droplets/test_load_balancers.py b/tests/api_resources/gpu_droplets/test_load_balancers.py index 5db3c20b..363520e4 100644 --- a/tests/api_resources/gpu_droplets/test_load_balancers.py +++ b/tests/api_resources/gpu_droplets/test_load_balancers.py @@ -278,7 +278,7 @@ def test_streaming_response_create_overload_2(self, client: Gradient) -> None: @parametrize def test_method_retrieve(self, client: Gradient) -> None: load_balancer = client.gpu_droplets.load_balancers.retrieve( - "lb_id", + "4de7ac8b-495b-4884-9a69-1050c6793cd6", ) assert_matches_type(LoadBalancerRetrieveResponse, load_balancer, path=["response"]) @@ -286,7 +286,7 @@ def test_method_retrieve(self, client: Gradient) -> None: @parametrize def test_raw_response_retrieve(self, client: Gradient) -> None: response = client.gpu_droplets.load_balancers.with_raw_response.retrieve( - "lb_id", + "4de7ac8b-495b-4884-9a69-1050c6793cd6", ) assert response.is_closed is True @@ -298,7 +298,7 @@ def test_raw_response_retrieve(self, client: Gradient) -> None: @parametrize def test_streaming_response_retrieve(self, client: Gradient) -> None: with client.gpu_droplets.load_balancers.with_streaming_response.retrieve( - "lb_id", + "4de7ac8b-495b-4884-9a69-1050c6793cd6", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -649,7 +649,7 @@ def test_streaming_response_list(self, client: Gradient) -> None: @parametrize def test_method_delete(self, client: Gradient) -> None: load_balancer = client.gpu_droplets.load_balancers.delete( - "lb_id", + "4de7ac8b-495b-4884-9a69-1050c6793cd6", ) assert load_balancer is None @@ -657,7 +657,7 @@ def test_method_delete(self, client: Gradient) -> None: @parametrize def test_raw_response_delete(self, client: Gradient) -> None: response = client.gpu_droplets.load_balancers.with_raw_response.delete( - "lb_id", + "4de7ac8b-495b-4884-9a69-1050c6793cd6", ) assert response.is_closed is True @@ -669,7 +669,7 @@ def test_raw_response_delete(self, client: Gradient) -> None: @parametrize def test_streaming_response_delete(self, client: Gradient) -> None: with client.gpu_droplets.load_balancers.with_streaming_response.delete( - "lb_id", + "4de7ac8b-495b-4884-9a69-1050c6793cd6", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -691,7 +691,7 @@ def test_path_params_delete(self, client: Gradient) -> None: @parametrize def test_method_delete_cache(self, client: Gradient) -> None: load_balancer = client.gpu_droplets.load_balancers.delete_cache( - "lb_id", + "4de7ac8b-495b-4884-9a69-1050c6793cd6", ) assert load_balancer is None @@ -699,7 +699,7 @@ def test_method_delete_cache(self, client: Gradient) -> None: @parametrize def test_raw_response_delete_cache(self, client: Gradient) -> None: response = client.gpu_droplets.load_balancers.with_raw_response.delete_cache( - "lb_id", + "4de7ac8b-495b-4884-9a69-1050c6793cd6", ) assert response.is_closed is True @@ -711,7 +711,7 @@ def test_raw_response_delete_cache(self, client: Gradient) -> None: @parametrize def test_streaming_response_delete_cache(self, client: Gradient) -> None: with client.gpu_droplets.load_balancers.with_streaming_response.delete_cache( - "lb_id", + "4de7ac8b-495b-4884-9a69-1050c6793cd6", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -991,7 +991,7 @@ async def test_streaming_response_create_overload_2(self, async_client: AsyncGra @parametrize async def test_method_retrieve(self, async_client: AsyncGradient) -> None: load_balancer = await async_client.gpu_droplets.load_balancers.retrieve( - "lb_id", + "4de7ac8b-495b-4884-9a69-1050c6793cd6", ) assert_matches_type(LoadBalancerRetrieveResponse, load_balancer, path=["response"]) @@ -999,7 +999,7 @@ async def test_method_retrieve(self, async_client: AsyncGradient) -> None: @parametrize async def test_raw_response_retrieve(self, async_client: AsyncGradient) -> None: response = await async_client.gpu_droplets.load_balancers.with_raw_response.retrieve( - "lb_id", + "4de7ac8b-495b-4884-9a69-1050c6793cd6", ) assert response.is_closed is True @@ -1011,7 +1011,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncGradient) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncGradient) -> None: async with async_client.gpu_droplets.load_balancers.with_streaming_response.retrieve( - "lb_id", + "4de7ac8b-495b-4884-9a69-1050c6793cd6", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1362,7 +1362,7 @@ async def test_streaming_response_list(self, async_client: AsyncGradient) -> Non @parametrize async def test_method_delete(self, async_client: AsyncGradient) -> None: load_balancer = await async_client.gpu_droplets.load_balancers.delete( - "lb_id", + "4de7ac8b-495b-4884-9a69-1050c6793cd6", ) assert load_balancer is None @@ -1370,7 +1370,7 @@ async def test_method_delete(self, async_client: AsyncGradient) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncGradient) -> None: response = await async_client.gpu_droplets.load_balancers.with_raw_response.delete( - "lb_id", + "4de7ac8b-495b-4884-9a69-1050c6793cd6", ) assert response.is_closed is True @@ -1382,7 +1382,7 @@ async def test_raw_response_delete(self, async_client: AsyncGradient) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncGradient) -> None: async with async_client.gpu_droplets.load_balancers.with_streaming_response.delete( - "lb_id", + "4de7ac8b-495b-4884-9a69-1050c6793cd6", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1404,7 +1404,7 @@ async def test_path_params_delete(self, async_client: AsyncGradient) -> None: @parametrize async def test_method_delete_cache(self, async_client: AsyncGradient) -> None: load_balancer = await async_client.gpu_droplets.load_balancers.delete_cache( - "lb_id", + "4de7ac8b-495b-4884-9a69-1050c6793cd6", ) assert load_balancer is None @@ -1412,7 +1412,7 @@ async def test_method_delete_cache(self, async_client: AsyncGradient) -> None: @parametrize async def test_raw_response_delete_cache(self, async_client: AsyncGradient) -> None: response = await async_client.gpu_droplets.load_balancers.with_raw_response.delete_cache( - "lb_id", + "4de7ac8b-495b-4884-9a69-1050c6793cd6", ) assert response.is_closed is True @@ -1424,7 +1424,7 @@ async def test_raw_response_delete_cache(self, async_client: AsyncGradient) -> N @parametrize async def test_streaming_response_delete_cache(self, async_client: AsyncGradient) -> None: async with async_client.gpu_droplets.load_balancers.with_streaming_response.delete_cache( - "lb_id", + "4de7ac8b-495b-4884-9a69-1050c6793cd6", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/gpu_droplets/test_volumes.py b/tests/api_resources/gpu_droplets/test_volumes.py index f9b3778c..8243625d 100644 --- a/tests/api_resources/gpu_droplets/test_volumes.py +++ b/tests/api_resources/gpu_droplets/test_volumes.py @@ -135,7 +135,7 @@ def test_streaming_response_create_overload_2(self, client: Gradient) -> None: @parametrize def test_method_retrieve(self, client: Gradient) -> None: volume = client.gpu_droplets.volumes.retrieve( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + "7724db7c-e098-11e5-b522-000f53304e51", ) assert_matches_type(VolumeRetrieveResponse, volume, path=["response"]) @@ -143,7 +143,7 @@ def test_method_retrieve(self, client: Gradient) -> None: @parametrize def test_raw_response_retrieve(self, client: Gradient) -> None: response = client.gpu_droplets.volumes.with_raw_response.retrieve( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + "7724db7c-e098-11e5-b522-000f53304e51", ) assert response.is_closed is True @@ -155,7 +155,7 @@ def test_raw_response_retrieve(self, client: Gradient) -> None: @parametrize def test_streaming_response_retrieve(self, client: Gradient) -> None: with client.gpu_droplets.volumes.with_streaming_response.retrieve( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + "7724db7c-e098-11e5-b522-000f53304e51", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -216,7 +216,7 @@ def test_streaming_response_list(self, client: Gradient) -> None: @parametrize def test_method_delete(self, client: Gradient) -> None: volume = client.gpu_droplets.volumes.delete( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + "7724db7c-e098-11e5-b522-000f53304e51", ) assert volume is None @@ -224,7 +224,7 @@ def test_method_delete(self, client: Gradient) -> None: @parametrize def test_raw_response_delete(self, client: Gradient) -> None: response = client.gpu_droplets.volumes.with_raw_response.delete( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + "7724db7c-e098-11e5-b522-000f53304e51", ) assert response.is_closed is True @@ -236,7 +236,7 @@ def test_raw_response_delete(self, client: Gradient) -> None: @parametrize def test_streaming_response_delete(self, client: Gradient) -> None: with client.gpu_droplets.volumes.with_streaming_response.delete( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + "7724db7c-e098-11e5-b522-000f53304e51", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -411,7 +411,7 @@ async def test_streaming_response_create_overload_2(self, async_client: AsyncGra @parametrize async def test_method_retrieve(self, async_client: AsyncGradient) -> None: volume = await async_client.gpu_droplets.volumes.retrieve( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + "7724db7c-e098-11e5-b522-000f53304e51", ) assert_matches_type(VolumeRetrieveResponse, volume, path=["response"]) @@ -419,7 +419,7 @@ async def test_method_retrieve(self, async_client: AsyncGradient) -> None: @parametrize async def test_raw_response_retrieve(self, async_client: AsyncGradient) -> None: response = await async_client.gpu_droplets.volumes.with_raw_response.retrieve( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + "7724db7c-e098-11e5-b522-000f53304e51", ) assert response.is_closed is True @@ -431,7 +431,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncGradient) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncGradient) -> None: async with async_client.gpu_droplets.volumes.with_streaming_response.retrieve( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + "7724db7c-e098-11e5-b522-000f53304e51", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -492,7 +492,7 @@ async def test_streaming_response_list(self, async_client: AsyncGradient) -> Non @parametrize async def test_method_delete(self, async_client: AsyncGradient) -> None: volume = await async_client.gpu_droplets.volumes.delete( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + "7724db7c-e098-11e5-b522-000f53304e51", ) assert volume is None @@ -500,7 +500,7 @@ async def test_method_delete(self, async_client: AsyncGradient) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncGradient) -> None: response = await async_client.gpu_droplets.volumes.with_raw_response.delete( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + "7724db7c-e098-11e5-b522-000f53304e51", ) assert response.is_closed is True @@ -512,7 +512,7 @@ async def test_raw_response_delete(self, async_client: AsyncGradient) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncGradient) -> None: async with async_client.gpu_droplets.volumes.with_streaming_response.delete( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + "7724db7c-e098-11e5-b522-000f53304e51", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/gpu_droplets/volumes/test_snapshots.py b/tests/api_resources/gpu_droplets/volumes/test_snapshots.py index e3450001..ec157513 100644 --- a/tests/api_resources/gpu_droplets/volumes/test_snapshots.py +++ b/tests/api_resources/gpu_droplets/volumes/test_snapshots.py @@ -81,7 +81,7 @@ def test_path_params_create(self, client: Gradient) -> None: @parametrize def test_method_retrieve(self, client: Gradient) -> None: snapshot = client.gpu_droplets.volumes.snapshots.retrieve( - "snapshot_id", + "fbe805e8-866b-11e6-96bf-000f53315a41", ) assert_matches_type(SnapshotRetrieveResponse, snapshot, path=["response"]) @@ -89,7 +89,7 @@ def test_method_retrieve(self, client: Gradient) -> None: @parametrize def test_raw_response_retrieve(self, client: Gradient) -> None: response = client.gpu_droplets.volumes.snapshots.with_raw_response.retrieve( - "snapshot_id", + "fbe805e8-866b-11e6-96bf-000f53315a41", ) assert response.is_closed is True @@ -101,7 +101,7 @@ def test_raw_response_retrieve(self, client: Gradient) -> None: @parametrize def test_streaming_response_retrieve(self, client: Gradient) -> None: with client.gpu_droplets.volumes.snapshots.with_streaming_response.retrieve( - "snapshot_id", + "fbe805e8-866b-11e6-96bf-000f53315a41", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -175,7 +175,7 @@ def test_path_params_list(self, client: Gradient) -> None: @parametrize def test_method_delete(self, client: Gradient) -> None: snapshot = client.gpu_droplets.volumes.snapshots.delete( - "snapshot_id", + "fbe805e8-866b-11e6-96bf-000f53315a41", ) assert snapshot is None @@ -183,7 +183,7 @@ def test_method_delete(self, client: Gradient) -> None: @parametrize def test_raw_response_delete(self, client: Gradient) -> None: response = client.gpu_droplets.volumes.snapshots.with_raw_response.delete( - "snapshot_id", + "fbe805e8-866b-11e6-96bf-000f53315a41", ) assert response.is_closed is True @@ -195,7 +195,7 @@ def test_raw_response_delete(self, client: Gradient) -> None: @parametrize def test_streaming_response_delete(self, client: Gradient) -> None: with client.gpu_droplets.volumes.snapshots.with_streaming_response.delete( - "snapshot_id", + "fbe805e8-866b-11e6-96bf-000f53315a41", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -279,7 +279,7 @@ async def test_path_params_create(self, async_client: AsyncGradient) -> None: @parametrize async def test_method_retrieve(self, async_client: AsyncGradient) -> None: snapshot = await async_client.gpu_droplets.volumes.snapshots.retrieve( - "snapshot_id", + "fbe805e8-866b-11e6-96bf-000f53315a41", ) assert_matches_type(SnapshotRetrieveResponse, snapshot, path=["response"]) @@ -287,7 +287,7 @@ async def test_method_retrieve(self, async_client: AsyncGradient) -> None: @parametrize async def test_raw_response_retrieve(self, async_client: AsyncGradient) -> None: response = await async_client.gpu_droplets.volumes.snapshots.with_raw_response.retrieve( - "snapshot_id", + "fbe805e8-866b-11e6-96bf-000f53315a41", ) assert response.is_closed is True @@ -299,7 +299,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncGradient) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncGradient) -> None: async with async_client.gpu_droplets.volumes.snapshots.with_streaming_response.retrieve( - "snapshot_id", + "fbe805e8-866b-11e6-96bf-000f53315a41", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -373,7 +373,7 @@ async def test_path_params_list(self, async_client: AsyncGradient) -> None: @parametrize async def test_method_delete(self, async_client: AsyncGradient) -> None: snapshot = await async_client.gpu_droplets.volumes.snapshots.delete( - "snapshot_id", + "fbe805e8-866b-11e6-96bf-000f53315a41", ) assert snapshot is None @@ -381,7 +381,7 @@ async def test_method_delete(self, async_client: AsyncGradient) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncGradient) -> None: response = await async_client.gpu_droplets.volumes.snapshots.with_raw_response.delete( - "snapshot_id", + "fbe805e8-866b-11e6-96bf-000f53315a41", ) assert response.is_closed is True @@ -393,7 +393,7 @@ async def test_raw_response_delete(self, async_client: AsyncGradient) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncGradient) -> None: async with async_client.gpu_droplets.volumes.snapshots.with_streaming_response.delete( - "snapshot_id", + "fbe805e8-866b-11e6-96bf-000f53315a41", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/inference/test_api_keys.py b/tests/api_resources/inference/test_api_keys.py index d9745710..0bbfa00f 100644 --- a/tests/api_resources/inference/test_api_keys.py +++ b/tests/api_resources/inference/test_api_keys.py @@ -152,7 +152,7 @@ def test_streaming_response_list(self, client: Gradient) -> None: @parametrize def test_method_delete(self, client: Gradient) -> None: api_key = client.inference.api_keys.delete( - "api_key_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) assert_matches_type(APIKeyDeleteResponse, api_key, path=["response"]) @@ -160,7 +160,7 @@ def test_method_delete(self, client: Gradient) -> None: @parametrize def test_raw_response_delete(self, client: Gradient) -> None: response = client.inference.api_keys.with_raw_response.delete( - "api_key_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) assert response.is_closed is True @@ -172,7 +172,7 @@ def test_raw_response_delete(self, client: Gradient) -> None: @parametrize def test_streaming_response_delete(self, client: Gradient) -> None: with client.inference.api_keys.with_streaming_response.delete( - "api_key_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -194,7 +194,7 @@ def test_path_params_delete(self, client: Gradient) -> None: @parametrize def test_method_update_regenerate(self, client: Gradient) -> None: api_key = client.inference.api_keys.update_regenerate( - "api_key_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) assert_matches_type(APIKeyUpdateRegenerateResponse, api_key, path=["response"]) @@ -202,7 +202,7 @@ def test_method_update_regenerate(self, client: Gradient) -> None: @parametrize def test_raw_response_update_regenerate(self, client: Gradient) -> None: response = client.inference.api_keys.with_raw_response.update_regenerate( - "api_key_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) assert response.is_closed is True @@ -214,7 +214,7 @@ def test_raw_response_update_regenerate(self, client: Gradient) -> None: @parametrize def test_streaming_response_update_regenerate(self, client: Gradient) -> None: with client.inference.api_keys.with_streaming_response.update_regenerate( - "api_key_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -367,7 +367,7 @@ async def test_streaming_response_list(self, async_client: AsyncGradient) -> Non @parametrize async def test_method_delete(self, async_client: AsyncGradient) -> None: api_key = await async_client.inference.api_keys.delete( - "api_key_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) assert_matches_type(APIKeyDeleteResponse, api_key, path=["response"]) @@ -375,7 +375,7 @@ async def test_method_delete(self, async_client: AsyncGradient) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncGradient) -> None: response = await async_client.inference.api_keys.with_raw_response.delete( - "api_key_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) assert response.is_closed is True @@ -387,7 +387,7 @@ async def test_raw_response_delete(self, async_client: AsyncGradient) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncGradient) -> None: async with async_client.inference.api_keys.with_streaming_response.delete( - "api_key_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -409,7 +409,7 @@ async def test_path_params_delete(self, async_client: AsyncGradient) -> None: @parametrize async def test_method_update_regenerate(self, async_client: AsyncGradient) -> None: api_key = await async_client.inference.api_keys.update_regenerate( - "api_key_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) assert_matches_type(APIKeyUpdateRegenerateResponse, api_key, path=["response"]) @@ -417,7 +417,7 @@ async def test_method_update_regenerate(self, async_client: AsyncGradient) -> No @parametrize async def test_raw_response_update_regenerate(self, async_client: AsyncGradient) -> None: response = await async_client.inference.api_keys.with_raw_response.update_regenerate( - "api_key_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) assert response.is_closed is True @@ -429,7 +429,7 @@ async def test_raw_response_update_regenerate(self, async_client: AsyncGradient) @parametrize async def test_streaming_response_update_regenerate(self, async_client: AsyncGradient) -> None: async with async_client.inference.api_keys.with_streaming_response.update_regenerate( - "api_key_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/knowledge_bases/test_indexing_jobs.py b/tests/api_resources/knowledge_bases/test_indexing_jobs.py index 8840edfe..3dffaa69 100644 --- a/tests/api_resources/knowledge_bases/test_indexing_jobs.py +++ b/tests/api_resources/knowledge_bases/test_indexing_jobs.py @@ -64,7 +64,7 @@ def test_streaming_response_create(self, client: Gradient) -> None: @parametrize def test_method_retrieve(self, client: Gradient) -> None: indexing_job = client.knowledge_bases.indexing_jobs.retrieve( - "uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) assert_matches_type(IndexingJobRetrieveResponse, indexing_job, path=["response"]) @@ -72,7 +72,7 @@ def test_method_retrieve(self, client: Gradient) -> None: @parametrize def test_raw_response_retrieve(self, client: Gradient) -> None: response = client.knowledge_bases.indexing_jobs.with_raw_response.retrieve( - "uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) assert response.is_closed is True @@ -84,7 +84,7 @@ def test_raw_response_retrieve(self, client: Gradient) -> None: @parametrize def test_streaming_response_retrieve(self, client: Gradient) -> None: with client.knowledge_bases.indexing_jobs.with_streaming_response.retrieve( - "uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -143,7 +143,7 @@ def test_streaming_response_list(self, client: Gradient) -> None: @parametrize def test_method_retrieve_data_sources(self, client: Gradient) -> None: indexing_job = client.knowledge_bases.indexing_jobs.retrieve_data_sources( - "indexing_job_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) assert_matches_type(IndexingJobRetrieveDataSourcesResponse, indexing_job, path=["response"]) @@ -151,7 +151,7 @@ def test_method_retrieve_data_sources(self, client: Gradient) -> None: @parametrize def test_raw_response_retrieve_data_sources(self, client: Gradient) -> None: response = client.knowledge_bases.indexing_jobs.with_raw_response.retrieve_data_sources( - "indexing_job_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) assert response.is_closed is True @@ -163,7 +163,7 @@ def test_raw_response_retrieve_data_sources(self, client: Gradient) -> None: @parametrize def test_streaming_response_retrieve_data_sources(self, client: Gradient) -> None: with client.knowledge_bases.indexing_jobs.with_streaming_response.retrieve_data_sources( - "indexing_job_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -279,7 +279,7 @@ async def test_streaming_response_create(self, async_client: AsyncGradient) -> N @parametrize async def test_method_retrieve(self, async_client: AsyncGradient) -> None: indexing_job = await async_client.knowledge_bases.indexing_jobs.retrieve( - "uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) assert_matches_type(IndexingJobRetrieveResponse, indexing_job, path=["response"]) @@ -287,7 +287,7 @@ async def test_method_retrieve(self, async_client: AsyncGradient) -> None: @parametrize async def test_raw_response_retrieve(self, async_client: AsyncGradient) -> None: response = await async_client.knowledge_bases.indexing_jobs.with_raw_response.retrieve( - "uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) assert response.is_closed is True @@ -299,7 +299,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncGradient) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncGradient) -> None: async with async_client.knowledge_bases.indexing_jobs.with_streaming_response.retrieve( - "uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -358,7 +358,7 @@ async def test_streaming_response_list(self, async_client: AsyncGradient) -> Non @parametrize async def test_method_retrieve_data_sources(self, async_client: AsyncGradient) -> None: indexing_job = await async_client.knowledge_bases.indexing_jobs.retrieve_data_sources( - "indexing_job_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) assert_matches_type(IndexingJobRetrieveDataSourcesResponse, indexing_job, path=["response"]) @@ -366,7 +366,7 @@ async def test_method_retrieve_data_sources(self, async_client: AsyncGradient) - @parametrize async def test_raw_response_retrieve_data_sources(self, async_client: AsyncGradient) -> None: response = await async_client.knowledge_bases.indexing_jobs.with_raw_response.retrieve_data_sources( - "indexing_job_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) assert response.is_closed is True @@ -378,7 +378,7 @@ async def test_raw_response_retrieve_data_sources(self, async_client: AsyncGradi @parametrize async def test_streaming_response_retrieve_data_sources(self, async_client: AsyncGradient) -> None: async with async_client.knowledge_bases.indexing_jobs.with_streaming_response.retrieve_data_sources( - "indexing_job_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/models/providers/test_anthropic.py b/tests/api_resources/models/providers/test_anthropic.py index 60cb0c16..b0aeb37c 100644 --- a/tests/api_resources/models/providers/test_anthropic.py +++ b/tests/api_resources/models/providers/test_anthropic.py @@ -65,7 +65,7 @@ def test_streaming_response_create(self, client: Gradient) -> None: @parametrize def test_method_retrieve(self, client: Gradient) -> None: anthropic = client.models.providers.anthropic.retrieve( - "api_key_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) assert_matches_type(AnthropicRetrieveResponse, anthropic, path=["response"]) @@ -73,7 +73,7 @@ def test_method_retrieve(self, client: Gradient) -> None: @parametrize def test_raw_response_retrieve(self, client: Gradient) -> None: response = client.models.providers.anthropic.with_raw_response.retrieve( - "api_key_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) assert response.is_closed is True @@ -85,7 +85,7 @@ def test_raw_response_retrieve(self, client: Gradient) -> None: @parametrize def test_streaming_response_retrieve(self, client: Gradient) -> None: with client.models.providers.anthropic.with_streaming_response.retrieve( - "api_key_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -197,7 +197,7 @@ def test_streaming_response_list(self, client: Gradient) -> None: @parametrize def test_method_delete(self, client: Gradient) -> None: anthropic = client.models.providers.anthropic.delete( - "api_key_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) assert_matches_type(AnthropicDeleteResponse, anthropic, path=["response"]) @@ -205,7 +205,7 @@ def test_method_delete(self, client: Gradient) -> None: @parametrize def test_raw_response_delete(self, client: Gradient) -> None: response = client.models.providers.anthropic.with_raw_response.delete( - "api_key_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) assert response.is_closed is True @@ -217,7 +217,7 @@ def test_raw_response_delete(self, client: Gradient) -> None: @parametrize def test_streaming_response_delete(self, client: Gradient) -> None: with client.models.providers.anthropic.with_streaming_response.delete( - "api_key_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -334,7 +334,7 @@ async def test_streaming_response_create(self, async_client: AsyncGradient) -> N @parametrize async def test_method_retrieve(self, async_client: AsyncGradient) -> None: anthropic = await async_client.models.providers.anthropic.retrieve( - "api_key_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) assert_matches_type(AnthropicRetrieveResponse, anthropic, path=["response"]) @@ -342,7 +342,7 @@ async def test_method_retrieve(self, async_client: AsyncGradient) -> None: @parametrize async def test_raw_response_retrieve(self, async_client: AsyncGradient) -> None: response = await async_client.models.providers.anthropic.with_raw_response.retrieve( - "api_key_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) assert response.is_closed is True @@ -354,7 +354,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncGradient) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncGradient) -> None: async with async_client.models.providers.anthropic.with_streaming_response.retrieve( - "api_key_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -466,7 +466,7 @@ async def test_streaming_response_list(self, async_client: AsyncGradient) -> Non @parametrize async def test_method_delete(self, async_client: AsyncGradient) -> None: anthropic = await async_client.models.providers.anthropic.delete( - "api_key_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) assert_matches_type(AnthropicDeleteResponse, anthropic, path=["response"]) @@ -474,7 +474,7 @@ async def test_method_delete(self, async_client: AsyncGradient) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncGradient) -> None: response = await async_client.models.providers.anthropic.with_raw_response.delete( - "api_key_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) assert response.is_closed is True @@ -486,7 +486,7 @@ async def test_raw_response_delete(self, async_client: AsyncGradient) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncGradient) -> None: async with async_client.models.providers.anthropic.with_streaming_response.delete( - "api_key_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/models/providers/test_openai.py b/tests/api_resources/models/providers/test_openai.py index 8f9c1f80..c5780e05 100644 --- a/tests/api_resources/models/providers/test_openai.py +++ b/tests/api_resources/models/providers/test_openai.py @@ -65,7 +65,7 @@ def test_streaming_response_create(self, client: Gradient) -> None: @parametrize def test_method_retrieve(self, client: Gradient) -> None: openai = client.models.providers.openai.retrieve( - "api_key_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) assert_matches_type(OpenAIRetrieveResponse, openai, path=["response"]) @@ -73,7 +73,7 @@ def test_method_retrieve(self, client: Gradient) -> None: @parametrize def test_raw_response_retrieve(self, client: Gradient) -> None: response = client.models.providers.openai.with_raw_response.retrieve( - "api_key_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) assert response.is_closed is True @@ -85,7 +85,7 @@ def test_raw_response_retrieve(self, client: Gradient) -> None: @parametrize def test_streaming_response_retrieve(self, client: Gradient) -> None: with client.models.providers.openai.with_streaming_response.retrieve( - "api_key_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -197,7 +197,7 @@ def test_streaming_response_list(self, client: Gradient) -> None: @parametrize def test_method_delete(self, client: Gradient) -> None: openai = client.models.providers.openai.delete( - "api_key_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) assert_matches_type(OpenAIDeleteResponse, openai, path=["response"]) @@ -205,7 +205,7 @@ def test_method_delete(self, client: Gradient) -> None: @parametrize def test_raw_response_delete(self, client: Gradient) -> None: response = client.models.providers.openai.with_raw_response.delete( - "api_key_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) assert response.is_closed is True @@ -217,7 +217,7 @@ def test_raw_response_delete(self, client: Gradient) -> None: @parametrize def test_streaming_response_delete(self, client: Gradient) -> None: with client.models.providers.openai.with_streaming_response.delete( - "api_key_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -334,7 +334,7 @@ async def test_streaming_response_create(self, async_client: AsyncGradient) -> N @parametrize async def test_method_retrieve(self, async_client: AsyncGradient) -> None: openai = await async_client.models.providers.openai.retrieve( - "api_key_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) assert_matches_type(OpenAIRetrieveResponse, openai, path=["response"]) @@ -342,7 +342,7 @@ async def test_method_retrieve(self, async_client: AsyncGradient) -> None: @parametrize async def test_raw_response_retrieve(self, async_client: AsyncGradient) -> None: response = await async_client.models.providers.openai.with_raw_response.retrieve( - "api_key_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) assert response.is_closed is True @@ -354,7 +354,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncGradient) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncGradient) -> None: async with async_client.models.providers.openai.with_streaming_response.retrieve( - "api_key_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -466,7 +466,7 @@ async def test_streaming_response_list(self, async_client: AsyncGradient) -> Non @parametrize async def test_method_delete(self, async_client: AsyncGradient) -> None: openai = await async_client.models.providers.openai.delete( - "api_key_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) assert_matches_type(OpenAIDeleteResponse, openai, path=["response"]) @@ -474,7 +474,7 @@ async def test_method_delete(self, async_client: AsyncGradient) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncGradient) -> None: response = await async_client.models.providers.openai.with_raw_response.delete( - "api_key_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) assert response.is_closed is True @@ -486,7 +486,7 @@ async def test_raw_response_delete(self, async_client: AsyncGradient) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncGradient) -> None: async with async_client.models.providers.openai.with_streaming_response.delete( - "api_key_uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/test_agents.py b/tests/api_resources/test_agents.py index 6d040d18..2069d2d8 100644 --- a/tests/api_resources/test_agents.py +++ b/tests/api_resources/test_agents.py @@ -74,7 +74,7 @@ def test_streaming_response_create(self, client: Gradient) -> None: @parametrize def test_method_retrieve(self, client: Gradient) -> None: agent = client.agents.retrieve( - "uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) assert_matches_type(AgentRetrieveResponse, agent, path=["response"]) @@ -82,7 +82,7 @@ def test_method_retrieve(self, client: Gradient) -> None: @parametrize def test_raw_response_retrieve(self, client: Gradient) -> None: response = client.agents.with_raw_response.retrieve( - "uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) assert response.is_closed is True @@ -94,7 +94,7 @@ def test_raw_response_retrieve(self, client: Gradient) -> None: @parametrize def test_streaming_response_retrieve(self, client: Gradient) -> None: with client.agents.with_streaming_response.retrieve( - "uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -221,7 +221,7 @@ def test_streaming_response_list(self, client: Gradient) -> None: @parametrize def test_method_delete(self, client: Gradient) -> None: agent = client.agents.delete( - "uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) assert_matches_type(AgentDeleteResponse, agent, path=["response"]) @@ -229,7 +229,7 @@ def test_method_delete(self, client: Gradient) -> None: @parametrize def test_raw_response_delete(self, client: Gradient) -> None: response = client.agents.with_raw_response.delete( - "uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) assert response.is_closed is True @@ -241,7 +241,7 @@ def test_raw_response_delete(self, client: Gradient) -> None: @parametrize def test_streaming_response_delete(self, client: Gradient) -> None: with client.agents.with_streaming_response.delete( - "uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -418,7 +418,7 @@ async def test_streaming_response_create(self, async_client: AsyncGradient) -> N @parametrize async def test_method_retrieve(self, async_client: AsyncGradient) -> None: agent = await async_client.agents.retrieve( - "uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) assert_matches_type(AgentRetrieveResponse, agent, path=["response"]) @@ -426,7 +426,7 @@ async def test_method_retrieve(self, async_client: AsyncGradient) -> None: @parametrize async def test_raw_response_retrieve(self, async_client: AsyncGradient) -> None: response = await async_client.agents.with_raw_response.retrieve( - "uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) assert response.is_closed is True @@ -438,7 +438,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncGradient) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncGradient) -> None: async with async_client.agents.with_streaming_response.retrieve( - "uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -565,7 +565,7 @@ async def test_streaming_response_list(self, async_client: AsyncGradient) -> Non @parametrize async def test_method_delete(self, async_client: AsyncGradient) -> None: agent = await async_client.agents.delete( - "uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) assert_matches_type(AgentDeleteResponse, agent, path=["response"]) @@ -573,7 +573,7 @@ async def test_method_delete(self, async_client: AsyncGradient) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncGradient) -> None: response = await async_client.agents.with_raw_response.delete( - "uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) assert response.is_closed is True @@ -585,7 +585,7 @@ async def test_raw_response_delete(self, async_client: AsyncGradient) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncGradient) -> None: async with async_client.agents.with_streaming_response.delete( - "uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/test_gpu_droplets.py b/tests/api_resources/test_gpu_droplets.py index 0cb27fbb..7d50c037 100644 --- a/tests/api_resources/test_gpu_droplets.py +++ b/tests/api_resources/test_gpu_droplets.py @@ -161,7 +161,7 @@ def test_streaming_response_create_overload_2(self, client: Gradient) -> None: @parametrize def test_method_retrieve(self, client: Gradient) -> None: gpu_droplet = client.gpu_droplets.retrieve( - 1, + 3164444, ) assert_matches_type(GPUDropletRetrieveResponse, gpu_droplet, path=["response"]) @@ -169,7 +169,7 @@ def test_method_retrieve(self, client: Gradient) -> None: @parametrize def test_raw_response_retrieve(self, client: Gradient) -> None: response = client.gpu_droplets.with_raw_response.retrieve( - 1, + 3164444, ) assert response.is_closed is True @@ -181,7 +181,7 @@ def test_raw_response_retrieve(self, client: Gradient) -> None: @parametrize def test_streaming_response_retrieve(self, client: Gradient) -> None: with client.gpu_droplets.with_streaming_response.retrieve( - 1, + 3164444, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -235,7 +235,7 @@ def test_streaming_response_list(self, client: Gradient) -> None: @parametrize def test_method_delete(self, client: Gradient) -> None: gpu_droplet = client.gpu_droplets.delete( - 1, + 3164444, ) assert gpu_droplet is None @@ -243,7 +243,7 @@ def test_method_delete(self, client: Gradient) -> None: @parametrize def test_raw_response_delete(self, client: Gradient) -> None: response = client.gpu_droplets.with_raw_response.delete( - 1, + 3164444, ) assert response.is_closed is True @@ -255,7 +255,7 @@ def test_raw_response_delete(self, client: Gradient) -> None: @parametrize def test_streaming_response_delete(self, client: Gradient) -> None: with client.gpu_droplets.with_streaming_response.delete( - 1, + 3164444, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -391,7 +391,7 @@ def test_streaming_response_list_kernels(self, client: Gradient) -> None: @parametrize def test_method_list_neighbors(self, client: Gradient) -> None: gpu_droplet = client.gpu_droplets.list_neighbors( - 1, + 3164444, ) assert_matches_type(GPUDropletListNeighborsResponse, gpu_droplet, path=["response"]) @@ -399,7 +399,7 @@ def test_method_list_neighbors(self, client: Gradient) -> None: @parametrize def test_raw_response_list_neighbors(self, client: Gradient) -> None: response = client.gpu_droplets.with_raw_response.list_neighbors( - 1, + 3164444, ) assert response.is_closed is True @@ -411,7 +411,7 @@ def test_raw_response_list_neighbors(self, client: Gradient) -> None: @parametrize def test_streaming_response_list_neighbors(self, client: Gradient) -> None: with client.gpu_droplets.with_streaming_response.list_neighbors( - 1, + 3164444, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -607,7 +607,7 @@ async def test_streaming_response_create_overload_2(self, async_client: AsyncGra @parametrize async def test_method_retrieve(self, async_client: AsyncGradient) -> None: gpu_droplet = await async_client.gpu_droplets.retrieve( - 1, + 3164444, ) assert_matches_type(GPUDropletRetrieveResponse, gpu_droplet, path=["response"]) @@ -615,7 +615,7 @@ async def test_method_retrieve(self, async_client: AsyncGradient) -> None: @parametrize async def test_raw_response_retrieve(self, async_client: AsyncGradient) -> None: response = await async_client.gpu_droplets.with_raw_response.retrieve( - 1, + 3164444, ) assert response.is_closed is True @@ -627,7 +627,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncGradient) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncGradient) -> None: async with async_client.gpu_droplets.with_streaming_response.retrieve( - 1, + 3164444, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -681,7 +681,7 @@ async def test_streaming_response_list(self, async_client: AsyncGradient) -> Non @parametrize async def test_method_delete(self, async_client: AsyncGradient) -> None: gpu_droplet = await async_client.gpu_droplets.delete( - 1, + 3164444, ) assert gpu_droplet is None @@ -689,7 +689,7 @@ async def test_method_delete(self, async_client: AsyncGradient) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncGradient) -> None: response = await async_client.gpu_droplets.with_raw_response.delete( - 1, + 3164444, ) assert response.is_closed is True @@ -701,7 +701,7 @@ async def test_raw_response_delete(self, async_client: AsyncGradient) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncGradient) -> None: async with async_client.gpu_droplets.with_streaming_response.delete( - 1, + 3164444, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -837,7 +837,7 @@ async def test_streaming_response_list_kernels(self, async_client: AsyncGradient @parametrize async def test_method_list_neighbors(self, async_client: AsyncGradient) -> None: gpu_droplet = await async_client.gpu_droplets.list_neighbors( - 1, + 3164444, ) assert_matches_type(GPUDropletListNeighborsResponse, gpu_droplet, path=["response"]) @@ -845,7 +845,7 @@ async def test_method_list_neighbors(self, async_client: AsyncGradient) -> None: @parametrize async def test_raw_response_list_neighbors(self, async_client: AsyncGradient) -> None: response = await async_client.gpu_droplets.with_raw_response.list_neighbors( - 1, + 3164444, ) assert response.is_closed is True @@ -857,7 +857,7 @@ async def test_raw_response_list_neighbors(self, async_client: AsyncGradient) -> @parametrize async def test_streaming_response_list_neighbors(self, async_client: AsyncGradient) -> None: async with async_client.gpu_droplets.with_streaming_response.list_neighbors( - 1, + 3164444, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/test_knowledge_bases.py b/tests/api_resources/test_knowledge_bases.py index 82698131..62965775 100644 --- a/tests/api_resources/test_knowledge_bases.py +++ b/tests/api_resources/test_knowledge_bases.py @@ -102,7 +102,7 @@ def test_streaming_response_create(self, client: Gradient) -> None: @parametrize def test_method_retrieve(self, client: Gradient) -> None: knowledge_base = client.knowledge_bases.retrieve( - "uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) assert_matches_type(KnowledgeBaseRetrieveResponse, knowledge_base, path=["response"]) @@ -110,7 +110,7 @@ def test_method_retrieve(self, client: Gradient) -> None: @parametrize def test_raw_response_retrieve(self, client: Gradient) -> None: response = client.knowledge_bases.with_raw_response.retrieve( - "uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) assert response.is_closed is True @@ -122,7 +122,7 @@ def test_raw_response_retrieve(self, client: Gradient) -> None: @parametrize def test_streaming_response_retrieve(self, client: Gradient) -> None: with client.knowledge_bases.with_streaming_response.retrieve( - "uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -237,7 +237,7 @@ def test_streaming_response_list(self, client: Gradient) -> None: @parametrize def test_method_delete(self, client: Gradient) -> None: knowledge_base = client.knowledge_bases.delete( - "uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) assert_matches_type(KnowledgeBaseDeleteResponse, knowledge_base, path=["response"]) @@ -245,7 +245,7 @@ def test_method_delete(self, client: Gradient) -> None: @parametrize def test_raw_response_delete(self, client: Gradient) -> None: response = client.knowledge_bases.with_raw_response.delete( - "uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) assert response.is_closed is True @@ -257,7 +257,7 @@ def test_raw_response_delete(self, client: Gradient) -> None: @parametrize def test_streaming_response_delete(self, client: Gradient) -> None: with client.knowledge_bases.with_streaming_response.delete( - "uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -360,7 +360,7 @@ async def test_streaming_response_create(self, async_client: AsyncGradient) -> N @parametrize async def test_method_retrieve(self, async_client: AsyncGradient) -> None: knowledge_base = await async_client.knowledge_bases.retrieve( - "uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) assert_matches_type(KnowledgeBaseRetrieveResponse, knowledge_base, path=["response"]) @@ -368,7 +368,7 @@ async def test_method_retrieve(self, async_client: AsyncGradient) -> None: @parametrize async def test_raw_response_retrieve(self, async_client: AsyncGradient) -> None: response = await async_client.knowledge_bases.with_raw_response.retrieve( - "uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) assert response.is_closed is True @@ -380,7 +380,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncGradient) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncGradient) -> None: async with async_client.knowledge_bases.with_streaming_response.retrieve( - "uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -495,7 +495,7 @@ async def test_streaming_response_list(self, async_client: AsyncGradient) -> Non @parametrize async def test_method_delete(self, async_client: AsyncGradient) -> None: knowledge_base = await async_client.knowledge_bases.delete( - "uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) assert_matches_type(KnowledgeBaseDeleteResponse, knowledge_base, path=["response"]) @@ -503,7 +503,7 @@ async def test_method_delete(self, async_client: AsyncGradient) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncGradient) -> None: response = await async_client.knowledge_bases.with_raw_response.delete( - "uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) assert response.is_closed is True @@ -515,7 +515,7 @@ async def test_raw_response_delete(self, async_client: AsyncGradient) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncGradient) -> None: async with async_client.knowledge_bases.with_streaming_response.delete( - "uuid", + '"123e4567-e89b-12d3-a456-426614174000"', ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" From 4245c6ef8503c666fe0c25ad83da683c5ac05ddc Mon Sep 17 00:00:00 2001 From: Ben Batha Date: Wed, 24 Sep 2025 11:30:54 -0400 Subject: [PATCH 4/5] test: add smoke tests (#53) --- .env.example | 6 +++ .github/workflows/ci.yml | 54 ++++++++++++++++------ CONTRIBUTING.md | 35 +++++++++++++++ README.md | 57 +++++++++++++++++++++++ pytest.ini | 5 +++ scripts/smoke | 47 +++++++++++++++++++ scripts/test | 23 ++++++++-- src/gradient/_client.py | 70 +++++++---------------------- tests/test_smoke_sdk.py | 84 ++++++++++++++++++++++++++++++++++ tests/test_smoke_sdk_async.py | 85 +++++++++++++++++++++++++++++++++++ 10 files changed, 396 insertions(+), 70 deletions(-) create mode 100644 .env.example create mode 100644 pytest.ini create mode 100755 scripts/smoke create mode 100644 tests/test_smoke_sdk.py create mode 100644 tests/test_smoke_sdk_async.py diff --git a/.env.example b/.env.example new file mode 100644 index 00000000..8608f2d0 --- /dev/null +++ b/.env.example @@ -0,0 +1,6 @@ +#! /bin/sh + +export DIGITALOCEAN_ACCESS_TOKEN=replace_me +export GRADIENT_MODEL_ACCESS_KEY=replace_me +export GRADIENT_AGENT_ACCESS_KEY=replace_me +export GRADIENT_AGENT_ENDPOINT=https://your-agent-subdomain.agents.do-ai.run \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ec9a4813..b3e8ddc4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,15 +2,15 @@ name: CI on: push: branches-ignore: - - 'generated' - - 'codegen/**' - - 'integrated/**' - - 'stl-preview-head/**' - - 'stl-preview-base/**' + - "generated" + - "codegen/**" + - "integrated/**" + - "stl-preview-head/**" + - "stl-preview-base/**" pull_request: branches-ignore: - - 'stl-preview-head/**' - - 'stl-preview-base/**' + - "stl-preview-head/**" + - "stl-preview-base/**" jobs: lint: @@ -26,8 +26,8 @@ jobs: curl -sSf https://rye.astral.sh/get | bash echo "$HOME/.rye/shims" >> $GITHUB_PATH env: - RYE_VERSION: '0.44.0' - RYE_INSTALL_OPTION: '--yes' + RYE_VERSION: "0.44.0" + RYE_INSTALL_OPTION: "--yes" - name: Install dependencies run: rye sync --all-features @@ -51,8 +51,8 @@ jobs: curl -sSf https://rye.astral.sh/get | bash echo "$HOME/.rye/shims" >> $GITHUB_PATH env: - RYE_VERSION: '0.44.0' - RYE_INSTALL_OPTION: '--yes' + RYE_VERSION: "0.44.0" + RYE_INSTALL_OPTION: "--yes" - name: Install dependencies run: rye sync --all-features @@ -88,11 +88,39 @@ jobs: curl -sSf https://rye.astral.sh/get | bash echo "$HOME/.rye/shims" >> $GITHUB_PATH env: - RYE_VERSION: '0.44.0' - RYE_INSTALL_OPTION: '--yes' + RYE_VERSION: "0.44.0" + RYE_INSTALL_OPTION: "--yes" - name: Bootstrap run: ./scripts/bootstrap - name: Run tests run: ./scripts/test + + smoke: + name: smoke + # Only run smoke tests on pushes to main repo (not forks) so that secrets can be accessed + if: github.repository == 'stainless-sdks/gradient-python' && github.event_name == 'push' + runs-on: ${{ github.repository == 'stainless-sdks/gradient-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} + timeout-minutes: 10 + steps: + - uses: actions/checkout@v4 + + - name: Install Rye + run: | + curl -sSf https://rye.astral.sh/get | bash + echo "$HOME/.rye/shims" >> $GITHUB_PATH + env: + RYE_VERSION: "0.44.0" + RYE_INSTALL_OPTION: "--yes" + + - name: Bootstrap + run: ./scripts/bootstrap + + - name: Run smoke tests + env: + DIGITALOCEAN_ACCESS_TOKEN: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }} + GRADIENT_MODEL_ACCESS_KEY: ${{ secrets.GRADIENT_MODEL_ACCESS_KEY }} + GRADIENT_AGENT_ACCESS_KEY: ${{ secrets.GRADIENT_AGENT_ACCESS_KEY }} + GRADIENT_AGENT_ENDPOINT: ${{ secrets.GRADIENT_AGENT_ENDPOINT }} + run: ./scripts/smoke diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 212c4e40..140a090b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -96,6 +96,41 @@ $ npx prism mock path/to/your/openapi.yml $ ./scripts/test ``` +## Smoke tests & environment variables + +The repository includes a small set of live "smoke" tests (see the `smoke` pytest marker) that exercise real Gradient API endpoints. These are excluded from the default test run and only executed when you explicitly target them (`pytest -m smoke`) or in CI via the dedicated `smoke` job. + +Required environment variables for smoke tests (all must be set): + +| Variable | Purpose | +|----------|---------| +| `DIGITALOCEAN_ACCESS_TOKEN` | Access token for core DigitalOcean Gradient API operations (e.g. listing agents). | +| `GRADIENT_MODEL_ACCESS_KEY` | Key used for serverless inference (chat completions, etc.). | +| `GRADIENT_AGENT_ACCESS_KEY` | Key used for agent-scoped inference requests. | +| `GRADIENT_AGENT_ENDPOINT` | Fully-qualified HTTPS endpoint for your deployed agent (e.g. `https://my-agent.agents.do-ai.run`). | + +Optional override: + +| Variable | Purpose | +|----------|---------| +| `GRADIENT_INFERENCE_ENDPOINT` | Override default inference endpoint (`https://inference.do-ai.run`). | + +Create a local `.env` file (never commit real secrets). A template is provided at `.env.example`. + +Key design notes: +* Sync & async suites each have a single central test that asserts environment presence and client auto-loaded properties. +* Other smoke tests intentionally avoid repeating environment / property assertions to keep noise low. +* Add new credentials by updating the `REQUIRED_ENV_VARS` tuple in both smoke test files and documenting them here and in the README. + +Run smoke tests locally: + +```bash +./scripts/smoke # convenience wrapper +pytest -m smoke -q # direct invocation +``` + +Do NOT run smoke tests against production credentials unless you understand the API calls performed—they make real network requests. + ## Linting and formatting This repository uses [ruff](https://github.com/astral-sh/ruff) and diff --git a/README.md b/README.md index bb2b23df..873e2693 100644 --- a/README.md +++ b/README.md @@ -542,6 +542,63 @@ Python 3.8 or higher. See [the contributing documentation](./CONTRIBUTING.md). +## Smoke tests + +The repository includes a small set of "smoke" tests that exercise live Gradient API / Inference / Agent endpoints to catch integration regressions early. These tests are intentionally excluded from the standard test run (they are marked with the `smoke` pytest marker) and only run in CI via the dedicated `smoke` job, or when you explicitly target them locally. + +### Required environment variables + +All of the following environment variables must be set for the smoke tests (both sync & async) to run. If any are missing the smoke tests will fail fast: + +| Variable | Purpose | +|----------|---------| +| `DIGITALOCEAN_ACCESS_TOKEN` | Access token for core DigitalOcean Gradient API operations (e.g. listing agents). | +| `GRADIENT_MODEL_ACCESS_KEY` | Key used for serverless inference (chat completions, etc.). | +| `GRADIENT_AGENT_ACCESS_KEY` | Key used for agent-scoped inference requests. | +| `GRADIENT_AGENT_ENDPOINT` | Fully-qualified HTTPS endpoint for your deployed agent (e.g. `https://my-agent.agents.do-ai.run`). | + +> Optional override: `GRADIENT_INFERENCE_ENDPOINT` can be provided to point inference to a non-default endpoint (defaults to `https://inference.do-ai.run`). + +### Running smoke tests locally + +1. Export the required environment variables (or place them in a `.env` file and use a tool like `direnv` or `python-dotenv`). +2. Run only the smoke tests: + +```bash +rye run pytest -m smoke -q +``` + +To include them alongside the regular suite: + +```bash +./scripts/test -m smoke +``` + +Convenience wrapper (auto-loads a local `.env` if present): + +```bash +./scripts/smoke +``` + +See `.env.example` for a template of required variables you can copy into a `.env` file (do not commit secrets). + +### Async variants + +Each smoke test has an async counterpart in `tests/test_smoke_sdk_async.py`. Both sets are covered automatically by the `-m smoke` selection. + +### CI behavior + +The default `test` job excludes smoke tests (`-m 'not smoke'`). A separate `smoke` job runs on pushes to the main repository with the required secrets injected. This keeps contributors from inadvertently hitting live services while still providing integration coverage in controlled environments. + +### Adding new smoke tests + +1. Add a new test function to `tests/test_smoke_sdk.py` and/or `tests/test_smoke_sdk_async.py`. +2. Mark it with `@pytest.mark.smoke`. +3. Avoid duplicating environment or client property assertions—those live in the central environment/client state test (sync & async). +4. Keep assertions minimal—verify only surface contract / structure; deeper behavior belongs in unit tests with mocks. + +If a new credential is required, update this README section, the `REQUIRED_ENV_VARS` list in both smoke test files, and the CI workflow's `smoke` job environment. + ## License diff --git a/pytest.ini b/pytest.ini new file mode 100644 index 00000000..55e560ae --- /dev/null +++ b/pytest.ini @@ -0,0 +1,5 @@ +[pytest] +markers = + smoke: lightweight external integration smoke tests hitting live Gradient services +addopts = -m "not smoke" +asyncio_mode = auto diff --git a/scripts/smoke b/scripts/smoke new file mode 100755 index 00000000..02df51b9 --- /dev/null +++ b/scripts/smoke @@ -0,0 +1,47 @@ +#!/usr/bin/env bash + +# Purpose: Run live smoke tests (sync + async) against real Gradient services. +# These tests require valid credentials and are excluded from the normal test run. +# Usage: +# ./scripts/smoke # run all smoke tests +# ./scripts/smoke -k agents # pass through extra pytest args +# +# If a .env file exists in the repo root it will be sourced automatically. + +set -euo pipefail + +cd "$(dirname "$0")/.." + +if [ -f .env ]; then + echo "==> Loading .env" + # export variables declared in .env + set -a + # shellcheck disable=SC1091 + source .env + set +a +fi + +required=( + DIGITALOCEAN_ACCESS_TOKEN + GRADIENT_MODEL_ACCESS_KEY + GRADIENT_AGENT_ACCESS_KEY + GRADIENT_AGENT_ENDPOINT +) + +missing=() +for var in "${required[@]}"; do + if [ -z "${!var:-}" ]; then + missing+=("$var") + fi +done + +if [ ${#missing[@]} -ne 0 ]; then + echo "ERROR: Missing required environment variables for smoke tests:" >&2 + printf ' %s\n' "${missing[@]}" >&2 + echo >&2 + echo "Provide them via your shell environment or a .env file (see .env.example)." >&2 + exit 1 +fi + +echo "==> Running smoke tests (marker: smoke)" +rye run pytest -m smoke "$@" diff --git a/scripts/test b/scripts/test index dbeda2d2..4aa8fd64 100755 --- a/scripts/test +++ b/scripts/test @@ -54,8 +54,23 @@ fi export DEFER_PYDANTIC_BUILD=false -echo "==> Running tests" -rye run pytest "$@" +# Clear out any existing API keys to ensure tests run in a clean environment +unset DIGITALOCEAN_ACCESS_TOKEN +unset GRADIENT_MODEL_ACCESS_KEY +unset GRADIENT_AGENT_ACCESS_KEY +unset GRADIENT_AGENT_ENDPOINT -echo "==> Running Pydantic v1 tests" -rye run nox -s test-pydantic-v1 -- "$@" +echo "==> Running tests (excluding smoke tests by default)" +if [ $# -eq 0 ]; then + # No explicit args provided; exclude smoke tests by default + rye run pytest -m 'not smoke' +else + rye run pytest "$@" +fi + +echo "==> Running Pydantic v1 tests (excluding smoke tests by default)" +if [ $# -eq 0 ]; then + rye run nox -s test-pydantic-v1 -- -m 'not smoke' +else + rye run nox -s test-pydantic-v1 -- "$@" +fi diff --git a/src/gradient/_client.py b/src/gradient/_client.py index f7723171..338d343e 100644 --- a/src/gradient/_client.py +++ b/src/gradient/_client.py @@ -133,10 +133,7 @@ def __init__( self._agent_endpoint = agent_endpoint if inference_endpoint is None: - inference_endpoint = ( - os.environ.get("GRADIENT_INFERENCE_ENDPOINT") - or "https://inference.do-ai.run" - ) + inference_endpoint = os.environ.get("GRADIENT_INFERENCE_ENDPOINT") or "https://inference.do-ai.run" self.inference_endpoint = inference_endpoint if base_url is None: @@ -253,9 +250,7 @@ def default_headers(self) -> dict[str, str | Omit]: @override def _validate_headers(self, headers: Headers, custom_headers: Headers) -> None: - if ( - self.access_token or self.agent_access_key or self.model_access_key - ) and headers.get("Authorization"): + if (self.access_token or self.agent_access_key or self.model_access_key) and headers.get("Authorization"): return if isinstance(custom_headers.get("Authorization"), Omit): return @@ -288,14 +283,10 @@ def copy( Create a new client instance re-using the same options given to the current client with optional overriding. """ if default_headers is not None and set_default_headers is not None: - raise ValueError( - "The `default_headers` and `set_default_headers` arguments are mutually exclusive" - ) + raise ValueError("The `default_headers` and `set_default_headers` arguments are mutually exclusive") if default_query is not None and set_default_query is not None: - raise ValueError( - "The `default_query` and `set_default_query` arguments are mutually exclusive" - ) + raise ValueError("The `default_query` and `set_default_query` arguments are mutually exclusive") headers = self._custom_headers if default_headers is not None: @@ -345,14 +336,10 @@ def _make_status_error( return _exceptions.BadRequestError(err_msg, response=response, body=body) if response.status_code == 401: - return _exceptions.AuthenticationError( - err_msg, response=response, body=body - ) + return _exceptions.AuthenticationError(err_msg, response=response, body=body) if response.status_code == 403: - return _exceptions.PermissionDeniedError( - err_msg, response=response, body=body - ) + return _exceptions.PermissionDeniedError(err_msg, response=response, body=body) if response.status_code == 404: return _exceptions.NotFoundError(err_msg, response=response, body=body) @@ -361,17 +348,13 @@ def _make_status_error( return _exceptions.ConflictError(err_msg, response=response, body=body) if response.status_code == 422: - return _exceptions.UnprocessableEntityError( - err_msg, response=response, body=body - ) + return _exceptions.UnprocessableEntityError(err_msg, response=response, body=body) if response.status_code == 429: return _exceptions.RateLimitError(err_msg, response=response, body=body) if response.status_code >= 500: - return _exceptions.InternalServerError( - err_msg, response=response, body=body - ) + return _exceptions.InternalServerError(err_msg, response=response, body=body) return APIStatusError(err_msg, response=response, body=body) @@ -439,10 +422,7 @@ def __init__( self._agent_endpoint = agent_endpoint if inference_endpoint is None: - inference_endpoint = ( - os.environ.get("GRADIENT_INFERENCE_ENDPOINT") - or "https://inference.do-ai.run" - ) + inference_endpoint = os.environ.get("GRADIENT_INFERENCE_ENDPOINT") or "https://inference.do-ai.run" self.inference_endpoint = inference_endpoint if base_url is None: @@ -559,9 +539,7 @@ def default_headers(self) -> dict[str, str | Omit]: @override def _validate_headers(self, headers: Headers, custom_headers: Headers) -> None: - if ( - self.access_token or self.agent_access_key or self.model_access_key - ) and headers.get("Authorization"): + if (self.access_token or self.agent_access_key or self.model_access_key) and headers.get("Authorization"): return if isinstance(custom_headers.get("Authorization"), Omit): return @@ -594,14 +572,10 @@ def copy( Create a new client instance re-using the same options given to the current client with optional overriding. """ if default_headers is not None and set_default_headers is not None: - raise ValueError( - "The `default_headers` and `set_default_headers` arguments are mutually exclusive" - ) + raise ValueError("The `default_headers` and `set_default_headers` arguments are mutually exclusive") if default_query is not None and set_default_query is not None: - raise ValueError( - "The `default_query` and `set_default_query` arguments are mutually exclusive" - ) + raise ValueError("The `default_query` and `set_default_query` arguments are mutually exclusive") headers = self._custom_headers if default_headers is not None: @@ -651,14 +625,10 @@ def _make_status_error( return _exceptions.BadRequestError(err_msg, response=response, body=body) if response.status_code == 401: - return _exceptions.AuthenticationError( - err_msg, response=response, body=body - ) + return _exceptions.AuthenticationError(err_msg, response=response, body=body) if response.status_code == 403: - return _exceptions.PermissionDeniedError( - err_msg, response=response, body=body - ) + return _exceptions.PermissionDeniedError(err_msg, response=response, body=body) if response.status_code == 404: return _exceptions.NotFoundError(err_msg, response=response, body=body) @@ -667,17 +637,13 @@ def _make_status_error( return _exceptions.ConflictError(err_msg, response=response, body=body) if response.status_code == 422: - return _exceptions.UnprocessableEntityError( - err_msg, response=response, body=body - ) + return _exceptions.UnprocessableEntityError(err_msg, response=response, body=body) if response.status_code == 429: return _exceptions.RateLimitError(err_msg, response=response, body=body) if response.status_code >= 500: - return _exceptions.InternalServerError( - err_msg, response=response, body=body - ) + return _exceptions.InternalServerError(err_msg, response=response, body=body) return APIStatusError(err_msg, response=response, body=body) @@ -896,9 +862,7 @@ def knowledge_bases( AsyncKnowledgeBasesResourceWithStreamingResponse, ) - return AsyncKnowledgeBasesResourceWithStreamingResponse( - self._client.knowledge_bases - ) + return AsyncKnowledgeBasesResourceWithStreamingResponse(self._client.knowledge_bases) @cached_property def models(self) -> models.AsyncModelsResourceWithStreamingResponse: diff --git a/tests/test_smoke_sdk.py b/tests/test_smoke_sdk.py new file mode 100644 index 00000000..41358ce2 --- /dev/null +++ b/tests/test_smoke_sdk.py @@ -0,0 +1,84 @@ +from __future__ import annotations + +import os + +import pytest + +from gradient import Gradient + +REQUIRED_ENV_VARS = ( + "DIGITALOCEAN_ACCESS_TOKEN", + "GRADIENT_MODEL_ACCESS_KEY", + "GRADIENT_AGENT_ACCESS_KEY", + "GRADIENT_AGENT_ENDPOINT", +) + + +@pytest.mark.smoke +def test_smoke_environment_and_client_state() -> None: + """Validate required env vars, client auto-loaded properties, and perform a minimal API call. + + This central test ensures environment configuration & client state are correct so other sync + smoke tests can focus purely on API behavior without repeating these assertions. + """ + missing = [k for k in REQUIRED_ENV_VARS if not os.getenv(k)] + if missing: + pytest.fail( + "Missing required environment variables for smoke tests: " + ", ".join(missing), + pytrace=False, + ) + + client = Gradient() + + # Property assertions (auto-loaded from environment) + assert client.access_token == os.environ["DIGITALOCEAN_ACCESS_TOKEN"], "access_token not loaded from env" + assert client.model_access_key == os.environ["GRADIENT_MODEL_ACCESS_KEY"], "model_access_key not loaded from env" + assert client.agent_access_key == os.environ["GRADIENT_AGENT_ACCESS_KEY"], "agent_access_key not loaded from env" + expected_endpoint = os.environ["GRADIENT_AGENT_ENDPOINT"] + normalized_expected = ( + expected_endpoint if expected_endpoint.startswith("https://") else f"https://{expected_endpoint}" + ) + assert client.agent_endpoint == normalized_expected, "agent_endpoint not derived correctly from env" + + +@pytest.mark.smoke +def test_smoke_agents_listing() -> None: + client = Gradient() + # Minimal API surface check (agents list) + agents_list = client.agents.list() + assert agents_list is not None + assert hasattr(agents_list, "agents") + + +@pytest.mark.smoke +def test_smoke_gpu_droplets_listing() -> None: + client = Gradient() + droplets_list = client.gpu_droplets.list(type="gpus") + assert droplets_list is not None + assert hasattr(droplets_list, "droplets") + + +@pytest.mark.smoke +def test_smoke_inference_completion() -> None: + inference_client = Gradient() + completion = inference_client.chat.completions.create( + model="llama3-8b-instruct", + messages=[{"role": "user", "content": "ping"}], + ) + # Basic structural checks + assert completion is not None + assert completion.choices, "Expected at least one choice in completion response" + assert completion.choices[0].message.content is not None + + +@pytest.mark.smoke +def test_smoke_agent_inference_chat() -> None: + agent_client = Gradient() + + # Model may be resolved implicitly; if an explicit model is required and missing this can be adapted + completion = agent_client.agents.chat.completions.create( + model="", # Intentionally blank per original example; adjust if backend requires non-empty + messages=[{"role": "user", "content": "ping"}], + ) + assert completion is not None + assert completion.choices diff --git a/tests/test_smoke_sdk_async.py b/tests/test_smoke_sdk_async.py new file mode 100644 index 00000000..e732ec73 --- /dev/null +++ b/tests/test_smoke_sdk_async.py @@ -0,0 +1,85 @@ +from __future__ import annotations + +import os + +import pytest + +from gradient import AsyncGradient + +REQUIRED_ENV_VARS = ( + "DIGITALOCEAN_ACCESS_TOKEN", + "GRADIENT_MODEL_ACCESS_KEY", + "GRADIENT_AGENT_ACCESS_KEY", + "GRADIENT_AGENT_ENDPOINT", +) + + +@pytest.mark.smoke +@pytest.mark.asyncio +async def test_async_smoke_environment_and_client_state() -> None: + """Validate required env vars, client auto-loaded properties, and perform a minimal API call. + + This central test ensures environment configuration & client state are correct so other async + smoke tests can focus purely on API behavior without repeating these assertions. + """ + missing = [k for k in REQUIRED_ENV_VARS if not os.getenv(k)] + if missing: + pytest.fail( + "Missing required environment variables for async smoke tests: " + ", ".join(missing), + pytrace=False, + ) + + client = AsyncGradient() + + # Property assertions (auto-loaded from environment) + assert client.access_token == os.environ["DIGITALOCEAN_ACCESS_TOKEN"], "access_token not loaded from env" + assert client.model_access_key == os.environ["GRADIENT_MODEL_ACCESS_KEY"], "model_access_key not loaded from env" + assert client.agent_access_key == os.environ["GRADIENT_AGENT_ACCESS_KEY"], "agent_access_key not loaded from env" + expected_endpoint = os.environ["GRADIENT_AGENT_ENDPOINT"] + normalized_expected = ( + expected_endpoint if expected_endpoint.startswith("https://") else f"https://{expected_endpoint}" + ) + assert client.agent_endpoint == normalized_expected, "agent_endpoint not derived correctly from env" + + +@pytest.mark.smoke +@pytest.mark.asyncio +async def test_async_smoke_agents_listing() -> None: + client = AsyncGradient() + agents_list = await client.agents.list() + assert agents_list is not None + assert hasattr(agents_list, "agents") + + +@pytest.mark.smoke +@pytest.mark.asyncio +async def test_async_smoke_gpu_droplets_listing() -> None: + client = AsyncGradient() + droplets_list = await client.gpu_droplets.list(type="gpus") + assert droplets_list is not None + assert hasattr(droplets_list, "droplets") + + +@pytest.mark.smoke +@pytest.mark.asyncio +async def test_async_smoke_inference_completion() -> None: + inference_client = AsyncGradient() + completion = await inference_client.chat.completions.create( + model="llama3-8b-instruct", + messages=[{"role": "user", "content": "ping"}], + ) + assert completion is not None + assert completion.choices + assert completion.choices[0].message.content is not None + + +@pytest.mark.smoke +@pytest.mark.asyncio +async def test_async_smoke_agent_inference_chat() -> None: + agent_client = AsyncGradient() + completion = await agent_client.agents.chat.completions.create( + model="", + messages=[{"role": "user", "content": "ping"}], + ) + assert completion is not None + assert completion.choices From 0ee30f9199c5e390f03ad09bfcdc3042c14343dd Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 24 Sep 2025 15:31:21 +0000 Subject: [PATCH 5/5] release: 3.0.2 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 10 ++++++++++ pyproject.toml | 2 +- src/gradient/_version.py | 2 +- 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 56441f9d..a1304a17 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "3.0.1" + ".": "3.0.2" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index d9e90412..099062d4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # Changelog +## 3.0.2 (2025-09-24) + +Full Changelog: [v3.0.1...v3.0.2](https://github.com/digitalocean/gradient-python/compare/v3.0.1...v3.0.2) + +### Chores + +* do not install brew dependencies in ./scripts/bootstrap by default ([d83b77a](https://github.com/digitalocean/gradient-python/commit/d83b77a943d7beb3373eebc543cdc787371753a5)) +* improve example values ([8f3a107](https://github.com/digitalocean/gradient-python/commit/8f3a107935a7ef0aa7e0e93161a24c7ecf24a272)) +* **types:** change optional parameter type from NotGiven to Omit ([78eb019](https://github.com/digitalocean/gradient-python/commit/78eb019c87cc55186abffd92f1d710d0c6ef0895)) + ## 3.0.1 (2025-09-24) Full Changelog: [v3.0.0...v3.0.1](https://github.com/digitalocean/gradient-python/compare/v3.0.0...v3.0.1) diff --git a/pyproject.toml b/pyproject.toml index 623bc315..62741433 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "gradient" -version = "3.0.1" +version = "3.0.2" description = "The official Python library for the Gradient API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/gradient/_version.py b/src/gradient/_version.py index 12d04477..bd32dfe9 100644 --- a/src/gradient/_version.py +++ b/src/gradient/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "gradient" -__version__ = "3.0.1" # x-release-please-version +__version__ = "3.0.2" # x-release-please-version