pulse-python-sdk 0.0.60__tar.gz → 0.0.61__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/PKG-INFO +1 -1
- {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/pyproject.toml +1 -1
- {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/client.py +10 -4
- {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/core/client_wrapper.py +2 -2
- {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/README.md +0 -0
- {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/__init__.py +0 -0
- {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/core/__init__.py +0 -0
- {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/core/api_error.py +0 -0
- {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/core/datetime_utils.py +0 -0
- {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/core/file.py +0 -0
- {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/core/force_multipart.py +0 -0
- {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/core/http_client.py +0 -0
- {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/core/http_response.py +0 -0
- {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/core/http_sse/__init__.py +0 -0
- {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/core/http_sse/_api.py +0 -0
- {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/core/http_sse/_decoders.py +0 -0
- {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/core/http_sse/_exceptions.py +0 -0
- {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/core/http_sse/_models.py +0 -0
- {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/core/jsonable_encoder.py +0 -0
- {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/core/pydantic_utilities.py +0 -0
- {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/core/query_encoder.py +0 -0
- {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/core/remove_none_from_dict.py +0 -0
- {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/core/request_options.py +0 -0
- {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/core/serialization.py +0 -0
- {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/core/unchecked_base_model.py +0 -0
- {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/environment.py +0 -0
- {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/errors/__init__.py +0 -0
- {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/errors/bad_request_error.py +0 -0
- {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/errors/forbidden_error.py +0 -0
- {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/errors/internal_server_error.py +0 -0
- {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/errors/not_found_error.py +0 -0
- {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/errors/too_many_requests_error.py +0 -0
- {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/errors/unauthorized_error.py +0 -0
- {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/jobs/__init__.py +0 -0
- {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/jobs/client.py +0 -0
- {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/jobs/raw_client.py +0 -0
- {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/py.typed +0 -0
- {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/raw_client.py +0 -0
- {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/types/__init__.py +0 -0
- {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/types/extract_async_request_experimental_schema.py +0 -0
- {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/types/extract_async_request_schema.py +0 -0
- {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/types/extract_async_request_storage.py +0 -0
- {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/types/extract_async_request_structured_output.py +0 -0
- {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/types/extract_async_response.py +0 -0
- {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/types/extract_async_submission_response_status.py +0 -0
- {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/types/extract_input.py +0 -0
- {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/types/extract_input_experimental_schema.py +0 -0
- {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/types/extract_input_schema.py +0 -0
- {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/types/extract_input_storage.py +0 -0
- {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/types/extract_input_structured_output.py +0 -0
- {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/types/extract_options.py +0 -0
- {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/types/extract_options_experimental_schema.py +0 -0
- {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/types/extract_options_schema.py +0 -0
- {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/types/extract_options_storage.py +0 -0
- {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/types/extract_options_structured_output.py +0 -0
- {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/types/extract_request_experimental_schema.py +0 -0
- {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/types/extract_request_schema.py +0 -0
- {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/types/extract_request_storage.py +0 -0
- {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/types/extract_request_structured_output.py +0 -0
- {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/types/extract_response.py +0 -0
- {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/types/extract_source.py +0 -0
- {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/types/job_cancellation_response.py +0 -0
- {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/types/job_status.py +0 -0
- {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/types/job_status_response.py +0 -0
- {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/version.py +0 -0
- {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/webhooks/__init__.py +0 -0
- {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/webhooks/client.py +0 -0
- {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/webhooks/raw_client.py +0 -0
- {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/webhooks/types/__init__.py +0 -0
- {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/webhooks/types/create_webhook_link_response.py +0 -0
|
@@ -2,10 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
+
import os
|
|
5
6
|
import typing
|
|
6
7
|
|
|
7
8
|
import httpx
|
|
8
9
|
from . import core
|
|
10
|
+
from .core.api_error import ApiError
|
|
9
11
|
from .core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
|
10
12
|
from .core.request_options import RequestOptions
|
|
11
13
|
from .environment import PulseEnvironment
|
|
@@ -46,7 +48,7 @@ class Pulse:
|
|
|
46
48
|
|
|
47
49
|
|
|
48
50
|
|
|
49
|
-
api_key : str
|
|
51
|
+
api_key : typing.Optional[str]
|
|
50
52
|
headers : typing.Optional[typing.Dict[str, str]]
|
|
51
53
|
Additional headers to send with every request.
|
|
52
54
|
|
|
@@ -73,7 +75,7 @@ class Pulse:
|
|
|
73
75
|
*,
|
|
74
76
|
base_url: typing.Optional[str] = None,
|
|
75
77
|
environment: PulseEnvironment = PulseEnvironment.DEFAULT,
|
|
76
|
-
api_key: str,
|
|
78
|
+
api_key: typing.Optional[str] = os.getenv("PULSE_API_KEY"),
|
|
77
79
|
headers: typing.Optional[typing.Dict[str, str]] = None,
|
|
78
80
|
timeout: typing.Optional[float] = None,
|
|
79
81
|
follow_redirects: typing.Optional[bool] = True,
|
|
@@ -82,6 +84,8 @@ class Pulse:
|
|
|
82
84
|
_defaulted_timeout = (
|
|
83
85
|
timeout if timeout is not None else 60 if httpx_client is None else httpx_client.timeout.read
|
|
84
86
|
)
|
|
87
|
+
if api_key is None:
|
|
88
|
+
raise ApiError(body="The client must be instantiated be either passing in api_key or setting PULSE_API_KEY")
|
|
85
89
|
self._client_wrapper = SyncClientWrapper(
|
|
86
90
|
base_url=_get_base_url(base_url=base_url, environment=environment),
|
|
87
91
|
api_key=api_key,
|
|
@@ -361,7 +365,7 @@ class AsyncPulse:
|
|
|
361
365
|
|
|
362
366
|
|
|
363
367
|
|
|
364
|
-
api_key : str
|
|
368
|
+
api_key : typing.Optional[str]
|
|
365
369
|
headers : typing.Optional[typing.Dict[str, str]]
|
|
366
370
|
Additional headers to send with every request.
|
|
367
371
|
|
|
@@ -388,7 +392,7 @@ class AsyncPulse:
|
|
|
388
392
|
*,
|
|
389
393
|
base_url: typing.Optional[str] = None,
|
|
390
394
|
environment: PulseEnvironment = PulseEnvironment.DEFAULT,
|
|
391
|
-
api_key: str,
|
|
395
|
+
api_key: typing.Optional[str] = os.getenv("PULSE_API_KEY"),
|
|
392
396
|
headers: typing.Optional[typing.Dict[str, str]] = None,
|
|
393
397
|
timeout: typing.Optional[float] = None,
|
|
394
398
|
follow_redirects: typing.Optional[bool] = True,
|
|
@@ -397,6 +401,8 @@ class AsyncPulse:
|
|
|
397
401
|
_defaulted_timeout = (
|
|
398
402
|
timeout if timeout is not None else 60 if httpx_client is None else httpx_client.timeout.read
|
|
399
403
|
)
|
|
404
|
+
if api_key is None:
|
|
405
|
+
raise ApiError(body="The client must be instantiated be either passing in api_key or setting PULSE_API_KEY")
|
|
400
406
|
self._client_wrapper = AsyncClientWrapper(
|
|
401
407
|
base_url=_get_base_url(base_url=base_url, environment=environment),
|
|
402
408
|
api_key=api_key,
|
|
@@ -22,10 +22,10 @@ class BaseClientWrapper:
|
|
|
22
22
|
|
|
23
23
|
def get_headers(self) -> typing.Dict[str, str]:
|
|
24
24
|
headers: typing.Dict[str, str] = {
|
|
25
|
-
"User-Agent": "pulse-python-sdk/0.0.
|
|
25
|
+
"User-Agent": "pulse-python-sdk/0.0.61",
|
|
26
26
|
"X-Fern-Language": "Python",
|
|
27
27
|
"X-Fern-SDK-Name": "pulse-python-sdk",
|
|
28
|
-
"X-Fern-SDK-Version": "0.0.
|
|
28
|
+
"X-Fern-SDK-Version": "0.0.61",
|
|
29
29
|
**(self.get_custom_headers() or {}),
|
|
30
30
|
}
|
|
31
31
|
headers["X_API_KEY"] = self.api_key
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/errors/internal_server_error.py
RENAMED
|
File without changes
|
|
File without changes
|
{pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/errors/too_many_requests_error.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/types/extract_async_request_schema.py
RENAMED
|
File without changes
|
{pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/types/extract_async_request_storage.py
RENAMED
|
File without changes
|
|
File without changes
|
{pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/types/extract_async_response.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/types/extract_input_storage.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/types/extract_options_schema.py
RENAMED
|
File without changes
|
{pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/types/extract_options_storage.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/types/extract_request_schema.py
RENAMED
|
File without changes
|
{pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/types/extract_request_storage.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/types/job_cancellation_response.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|