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.
Files changed (70) hide show
  1. {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/PKG-INFO +1 -1
  2. {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/pyproject.toml +1 -1
  3. {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/client.py +10 -4
  4. {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/core/client_wrapper.py +2 -2
  5. {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/README.md +0 -0
  6. {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/__init__.py +0 -0
  7. {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/core/__init__.py +0 -0
  8. {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/core/api_error.py +0 -0
  9. {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/core/datetime_utils.py +0 -0
  10. {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/core/file.py +0 -0
  11. {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/core/force_multipart.py +0 -0
  12. {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/core/http_client.py +0 -0
  13. {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/core/http_response.py +0 -0
  14. {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/core/http_sse/__init__.py +0 -0
  15. {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/core/http_sse/_api.py +0 -0
  16. {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/core/http_sse/_decoders.py +0 -0
  17. {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/core/http_sse/_exceptions.py +0 -0
  18. {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/core/http_sse/_models.py +0 -0
  19. {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/core/jsonable_encoder.py +0 -0
  20. {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/core/pydantic_utilities.py +0 -0
  21. {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/core/query_encoder.py +0 -0
  22. {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/core/remove_none_from_dict.py +0 -0
  23. {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/core/request_options.py +0 -0
  24. {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/core/serialization.py +0 -0
  25. {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/core/unchecked_base_model.py +0 -0
  26. {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/environment.py +0 -0
  27. {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/errors/__init__.py +0 -0
  28. {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/errors/bad_request_error.py +0 -0
  29. {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/errors/forbidden_error.py +0 -0
  30. {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/errors/internal_server_error.py +0 -0
  31. {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/errors/not_found_error.py +0 -0
  32. {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/errors/too_many_requests_error.py +0 -0
  33. {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/errors/unauthorized_error.py +0 -0
  34. {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/jobs/__init__.py +0 -0
  35. {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/jobs/client.py +0 -0
  36. {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/jobs/raw_client.py +0 -0
  37. {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/py.typed +0 -0
  38. {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/raw_client.py +0 -0
  39. {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/types/__init__.py +0 -0
  40. {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/types/extract_async_request_experimental_schema.py +0 -0
  41. {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/types/extract_async_request_schema.py +0 -0
  42. {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/types/extract_async_request_storage.py +0 -0
  43. {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/types/extract_async_request_structured_output.py +0 -0
  44. {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/types/extract_async_response.py +0 -0
  45. {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/types/extract_async_submission_response_status.py +0 -0
  46. {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/types/extract_input.py +0 -0
  47. {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/types/extract_input_experimental_schema.py +0 -0
  48. {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/types/extract_input_schema.py +0 -0
  49. {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/types/extract_input_storage.py +0 -0
  50. {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/types/extract_input_structured_output.py +0 -0
  51. {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/types/extract_options.py +0 -0
  52. {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/types/extract_options_experimental_schema.py +0 -0
  53. {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/types/extract_options_schema.py +0 -0
  54. {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/types/extract_options_storage.py +0 -0
  55. {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/types/extract_options_structured_output.py +0 -0
  56. {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/types/extract_request_experimental_schema.py +0 -0
  57. {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/types/extract_request_schema.py +0 -0
  58. {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/types/extract_request_storage.py +0 -0
  59. {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/types/extract_request_structured_output.py +0 -0
  60. {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/types/extract_response.py +0 -0
  61. {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/types/extract_source.py +0 -0
  62. {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/types/job_cancellation_response.py +0 -0
  63. {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/types/job_status.py +0 -0
  64. {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/types/job_status_response.py +0 -0
  65. {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/version.py +0 -0
  66. {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/webhooks/__init__.py +0 -0
  67. {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/webhooks/client.py +0 -0
  68. {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/webhooks/raw_client.py +0 -0
  69. {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/webhooks/types/__init__.py +0 -0
  70. {pulse_python_sdk-0.0.60 → pulse_python_sdk-0.0.61}/src/pulse/webhooks/types/create_webhook_link_response.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pulse-python-sdk
3
- Version: 0.0.60
3
+ Version: 0.0.61
4
4
  Summary:
5
5
  Requires-Python: >=3.8,<4.0
6
6
  Classifier: Intended Audience :: Developers
@@ -4,7 +4,7 @@ dynamic = ["version"]
4
4
 
5
5
  [tool.poetry]
6
6
  name = "pulse-python-sdk"
7
- version = "0.0.60"
7
+ version = "0.0.61"
8
8
  description = ""
9
9
  readme = "README.md"
10
10
  authors = []
@@ -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.60",
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.60",
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