Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .spec-sha
Original file line number Diff line number Diff line change
@@ -1 +1 @@
fc36985f78cde936ebe11de2da4310102b7a6c80
0b38b5c071f4b97f634faed780611d52969ea716
15 changes: 14 additions & 1 deletion src/onepin/.fern/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,23 @@
"make_async_client",
"OnePinUpgradeRequiredError"
]
},
{
"from": "_client",
"imports": [
"OnepinClient",
"AsyncOnepinClient"
]
},
{
"from": "_auth_resolve",
"imports": [
"OnepinAuthError"
]
}
]
},
"originGitCommit": "76a0b71893b02defdab9fb41fea3c42d842d4578",
"originGitCommit": "41215c0e6ac788a5ef9da91a94fdcaa669837c82",
"originGitCommitIsDirty": false,
"invokedBy": "ci",
"ciProvider": "github"
Expand Down
2 changes: 1 addition & 1 deletion src/onepin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ client = OnePinClient(..., timeout=20.0)

# Override timeout for a specific method
client.dictionary.create_dictionary_entry(..., request_options={
"timeout_in_seconds": 1
"timeout": 1
})
```

Expand Down
21 changes: 15 additions & 6 deletions src/onepin/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
ApiResponseUsageSummaryOut,
ApiResponseVoiceFacetsOut,
ApiResponseVoiceOut,
ApiResponseWorkflowNameAvailabilityOut,
ApiResponseWorkflowOut,
ApiResponseWorkflowRunDetailOut,
ApiResponseWorkflowRunOut,
Expand Down Expand Up @@ -100,6 +101,7 @@
PortOut,
PronunciationSuggestion,
ProviderGroupOut,
RunStatusCounts,
RunsSummaryOut,
SlugAvailabilityOut,
SlugAvailabilityOutReason,
Expand Down Expand Up @@ -148,6 +150,7 @@
WorkflowDefinitionOutput,
WorkflowListItem,
WorkflowListStatus,
WorkflowNameAvailabilityOut,
WorkflowOut,
WorkflowRunDataAudioOut,
WorkflowRunDataAudioOutStatus,
Expand Down Expand Up @@ -182,6 +185,7 @@
WorkflowRunOverviewValidatorOut,
WorkflowRunOverviewValidatorOutStatus,
WorkflowRunOverviewWorkflowOut,
WorkflowRunStartIn,
WorkflowRunStatusOut,
WorkflowRunStepOut,
WorkspaceInviteOut,
Expand All @@ -207,9 +211,9 @@
workspace_members,
workspaces,
)
from ._default_clients import DefaultAioHttpClient, DefaultAsyncHttpxClient
from ._auth_resolve import OnepinAuthError
from ._client import AsyncOnepinClient, OnepinClient
from ._default_clients import DefaultAioHttpClient, DefaultAsyncHttpxClient
from ._version_gate import OnePinUpgradeRequiredError, make_async_client, make_client
from .client import AsyncOnePinClient, OnePinClient
from .dictionary import (
Expand All @@ -235,7 +239,6 @@
GetVoiceFacetsApiV1VoicesFacetsGetRequestSourceItem,
ListVoicesRequestLanguageItem,
ListVoicesRequestOrderItem,
ListVoicesRequestProviderItem,
ListVoicesRequestSortItem,
ListVoicesRequestSourceItem,
)
Expand Down Expand Up @@ -283,6 +286,7 @@
"ApiResponseUsageSummaryOut": ".types",
"ApiResponseVoiceFacetsOut": ".types",
"ApiResponseVoiceOut": ".types",
"ApiResponseWorkflowNameAvailabilityOut": ".types",
"ApiResponseWorkflowOut": ".types",
"ApiResponseWorkflowRunDetailOut": ".types",
"ApiResponseWorkflowRunOut": ".types",
Expand All @@ -292,6 +296,7 @@
"ApiResponseWorkspaceOut": ".types",
"ApiResponseWorkspaceSettingsOut": ".types",
"AsyncOnePinClient": ".client",
"AsyncOnepinClient": "._client",
"AuthWhoamiOut": ".types",
"AuthWhoamiOutAuthKind": ".types",
"BadRequestError": ".errors",
Expand Down Expand Up @@ -326,7 +331,6 @@
"ListTemplatesRequestSort": ".templates",
"ListVoicesRequestLanguageItem": ".voices",
"ListVoicesRequestOrderItem": ".voices",
"ListVoicesRequestProviderItem": ".voices",
"ListVoicesRequestSortItem": ".voices",
"ListVoicesRequestSourceItem": ".voices",
"ListWorkflowsRequestOrderItem": ".workflows",
Expand All @@ -353,13 +357,13 @@
"OnePinUpgradeRequiredError": "._version_gate",
"OnepinAuthError": "._auth_resolve",
"OnepinClient": "._client",
"AsyncOnepinClient": "._client",
"PaginationMeta": ".types",
"PlanLimits": ".types",
"PlanTier": ".types",
"PortOut": ".types",
"PronunciationSuggestion": ".types",
"ProviderGroupOut": ".types",
"RunStatusCounts": ".types",
"RunsSummaryOut": ".types",
"SearchDictionaryEntriesApiV1DictionarySearchGetRequestLanguageItem": ".dictionary",
"SearchDictionaryEntriesApiV1DictionarySearchGetRequestOrder": ".dictionary",
Expand Down Expand Up @@ -419,6 +423,7 @@
"WorkflowDefinitionOutput": ".types",
"WorkflowListItem": ".types",
"WorkflowListStatus": ".types",
"WorkflowNameAvailabilityOut": ".types",
"WorkflowOut": ".types",
"WorkflowRunDataAudioOut": ".types",
"WorkflowRunDataAudioOutStatus": ".types",
Expand Down Expand Up @@ -453,6 +458,7 @@
"WorkflowRunOverviewValidatorOut": ".types",
"WorkflowRunOverviewValidatorOutStatus": ".types",
"WorkflowRunOverviewWorkflowOut": ".types",
"WorkflowRunStartIn": ".types",
"WorkflowRunStatusOut": ".types",
"WorkflowRunStepOut": ".types",
"WorkspaceInviteOut": ".types",
Expand Down Expand Up @@ -543,6 +549,7 @@ def __dir__():
"ApiResponseUsageSummaryOut",
"ApiResponseVoiceFacetsOut",
"ApiResponseVoiceOut",
"ApiResponseWorkflowNameAvailabilityOut",
"ApiResponseWorkflowOut",
"ApiResponseWorkflowRunDetailOut",
"ApiResponseWorkflowRunOut",
Expand All @@ -552,6 +559,7 @@ def __dir__():
"ApiResponseWorkspaceOut",
"ApiResponseWorkspaceSettingsOut",
"AsyncOnePinClient",
"AsyncOnepinClient",
"AuthWhoamiOut",
"AuthWhoamiOutAuthKind",
"BadRequestError",
Expand Down Expand Up @@ -586,7 +594,6 @@ def __dir__():
"ListTemplatesRequestSort",
"ListVoicesRequestLanguageItem",
"ListVoicesRequestOrderItem",
"ListVoicesRequestProviderItem",
"ListVoicesRequestSortItem",
"ListVoicesRequestSourceItem",
"ListWorkflowsRequestOrderItem",
Expand All @@ -613,13 +620,13 @@ def __dir__():
"OnePinUpgradeRequiredError",
"OnepinAuthError",
"OnepinClient",
"AsyncOnepinClient",
"PaginationMeta",
"PlanLimits",
"PlanTier",
"PortOut",
"PronunciationSuggestion",
"ProviderGroupOut",
"RunStatusCounts",
"RunsSummaryOut",
"SearchDictionaryEntriesApiV1DictionarySearchGetRequestLanguageItem",
"SearchDictionaryEntriesApiV1DictionarySearchGetRequestOrder",
Expand Down Expand Up @@ -679,6 +686,7 @@ def __dir__():
"WorkflowDefinitionOutput",
"WorkflowListItem",
"WorkflowListStatus",
"WorkflowNameAvailabilityOut",
"WorkflowOut",
"WorkflowRunDataAudioOut",
"WorkflowRunDataAudioOutStatus",
Expand Down Expand Up @@ -713,6 +721,7 @@ def __dir__():
"WorkflowRunOverviewValidatorOut",
"WorkflowRunOverviewValidatorOutStatus",
"WorkflowRunOverviewWorkflowOut",
"WorkflowRunStartIn",
"WorkflowRunStatusOut",
"WorkflowRunStepOut",
"WorkspaceInviteOut",
Expand Down
2 changes: 1 addition & 1 deletion src/onepin/core/client_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def get_headers(self) -> typing.Dict[str, str]:
import platform

headers: typing.Dict[str, str] = {
"User-Agent": "onepin/0.7.2",
"User-Agent": "onepin/0.9.1",
"X-Fern-Language": "Python",
"X-Fern-Runtime": f"python/{platform.python_version()}",
"X-Fern-Platform": f"{platform.system().lower()}/{platform.release()}",
Expand Down
16 changes: 12 additions & 4 deletions src/onepin/core/http_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,9 @@ def request(
) -> httpx.Response:
base_url = self.get_base_url(base_url)
_timeout = (
request_options.get("timeout_in_seconds")
request_options.get("timeout")
if request_options is not None and request_options.get("timeout") is not None
else request_options.get("timeout_in_seconds")
if request_options is not None and request_options.get("timeout_in_seconds") is not None
else self.base_timeout()
)
Expand Down Expand Up @@ -474,7 +476,9 @@ def stream(
) -> typing.Iterator[httpx.Response]:
base_url = self.get_base_url(base_url)
_timeout = (
request_options.get("timeout_in_seconds")
request_options.get("timeout")
if request_options is not None and request_options.get("timeout") is not None
else request_options.get("timeout_in_seconds")
if request_options is not None and request_options.get("timeout_in_seconds") is not None
else self.base_timeout()
)
Expand Down Expand Up @@ -604,7 +608,9 @@ async def request(
) -> httpx.Response:
base_url = self.get_base_url(base_url)
_timeout = (
request_options.get("timeout_in_seconds")
request_options.get("timeout")
if request_options is not None and request_options.get("timeout") is not None
else request_options.get("timeout_in_seconds")
if request_options is not None and request_options.get("timeout_in_seconds") is not None
else self.base_timeout()
)
Expand Down Expand Up @@ -768,7 +774,9 @@ async def stream(
) -> typing.AsyncIterator[httpx.Response]:
base_url = self.get_base_url(base_url)
_timeout = (
request_options.get("timeout_in_seconds")
request_options.get("timeout")
if request_options is not None and request_options.get("timeout") is not None
else request_options.get("timeout_in_seconds")
if request_options is not None and request_options.get("timeout_in_seconds") is not None
else self.base_timeout()
)
Expand Down
Loading
Loading