raccoonai 0.1.0a2__tar.gz → 0.1.0a4__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.

Potentially problematic release.


This version of raccoonai might be problematic. Click here for more details.

Files changed (79) hide show
  1. raccoonai-0.1.0a4/.release-please-manifest.json +3 -0
  2. raccoonai-0.1.0a4/CHANGELOG.md +43 -0
  3. {raccoonai-0.1.0a2 → raccoonai-0.1.0a4}/PKG-INFO +1 -1
  4. {raccoonai-0.1.0a2 → raccoonai-0.1.0a4}/pyproject.toml +2 -2
  5. {raccoonai-0.1.0a2 → raccoonai-0.1.0a4}/requirements-dev.lock +1 -1
  6. {raccoonai-0.1.0a2 → raccoonai-0.1.0a4}/src/raccoonai/_base_client.py +9 -2
  7. {raccoonai-0.1.0a2 → raccoonai-0.1.0a4}/src/raccoonai/_constants.py +1 -1
  8. {raccoonai-0.1.0a2 → raccoonai-0.1.0a4}/src/raccoonai/_models.py +8 -2
  9. {raccoonai-0.1.0a2 → raccoonai-0.1.0a4}/src/raccoonai/_utils/_sync.py +17 -2
  10. {raccoonai-0.1.0a2 → raccoonai-0.1.0a4}/src/raccoonai/_utils/_transform.py +11 -1
  11. {raccoonai-0.1.0a2 → raccoonai-0.1.0a4}/src/raccoonai/_version.py +1 -1
  12. {raccoonai-0.1.0a2 → raccoonai-0.1.0a4}/src/raccoonai/resources/lam.py +18 -18
  13. {raccoonai-0.1.0a2 → raccoonai-0.1.0a4}/src/raccoonai/types/lam_extract_params.py +1 -1
  14. {raccoonai-0.1.0a2 → raccoonai-0.1.0a4}/src/raccoonai/types/lam_integration_run_params.py +1 -1
  15. {raccoonai-0.1.0a2 → raccoonai-0.1.0a4}/src/raccoonai/types/lam_integration_run_response.py +2 -2
  16. {raccoonai-0.1.0a2 → raccoonai-0.1.0a4}/src/raccoonai/types/lam_run_params.py +1 -1
  17. {raccoonai-0.1.0a2 → raccoonai-0.1.0a4}/src/raccoonai/types/lam_run_response.py +1 -1
  18. {raccoonai-0.1.0a2 → raccoonai-0.1.0a4}/tests/api_resources/test_fleet.py +4 -4
  19. {raccoonai-0.1.0a2 → raccoonai-0.1.0a4}/tests/test_client.py +26 -8
  20. {raccoonai-0.1.0a2 → raccoonai-0.1.0a4}/tests/test_transform.py +10 -1
  21. raccoonai-0.1.0a2/.release-please-manifest.json +0 -3
  22. raccoonai-0.1.0a2/CHANGELOG.md +0 -17
  23. {raccoonai-0.1.0a2 → raccoonai-0.1.0a4}/.gitignore +0 -0
  24. {raccoonai-0.1.0a2 → raccoonai-0.1.0a4}/CONTRIBUTING.md +0 -0
  25. {raccoonai-0.1.0a2 → raccoonai-0.1.0a4}/LICENSE +0 -0
  26. {raccoonai-0.1.0a2 → raccoonai-0.1.0a4}/README.md +0 -0
  27. {raccoonai-0.1.0a2 → raccoonai-0.1.0a4}/SECURITY.md +0 -0
  28. {raccoonai-0.1.0a2 → raccoonai-0.1.0a4}/api.md +0 -0
  29. {raccoonai-0.1.0a2 → raccoonai-0.1.0a4}/bin/check-release-environment +0 -0
  30. {raccoonai-0.1.0a2 → raccoonai-0.1.0a4}/bin/publish-pypi +0 -0
  31. {raccoonai-0.1.0a2 → raccoonai-0.1.0a4}/examples/.keep +0 -0
  32. {raccoonai-0.1.0a2 → raccoonai-0.1.0a4}/mypy.ini +0 -0
  33. {raccoonai-0.1.0a2 → raccoonai-0.1.0a4}/noxfile.py +0 -0
  34. {raccoonai-0.1.0a2 → raccoonai-0.1.0a4}/release-please-config.json +0 -0
  35. {raccoonai-0.1.0a2 → raccoonai-0.1.0a4}/requirements.lock +0 -0
  36. {raccoonai-0.1.0a2 → raccoonai-0.1.0a4}/src/raccoonai/__init__.py +0 -0
  37. {raccoonai-0.1.0a2 → raccoonai-0.1.0a4}/src/raccoonai/_client.py +0 -0
  38. {raccoonai-0.1.0a2 → raccoonai-0.1.0a4}/src/raccoonai/_compat.py +0 -0
  39. {raccoonai-0.1.0a2 → raccoonai-0.1.0a4}/src/raccoonai/_exceptions.py +0 -0
  40. {raccoonai-0.1.0a2 → raccoonai-0.1.0a4}/src/raccoonai/_files.py +0 -0
  41. {raccoonai-0.1.0a2 → raccoonai-0.1.0a4}/src/raccoonai/_qs.py +0 -0
  42. {raccoonai-0.1.0a2 → raccoonai-0.1.0a4}/src/raccoonai/_resource.py +0 -0
  43. {raccoonai-0.1.0a2 → raccoonai-0.1.0a4}/src/raccoonai/_response.py +0 -0
  44. {raccoonai-0.1.0a2 → raccoonai-0.1.0a4}/src/raccoonai/_streaming.py +0 -0
  45. {raccoonai-0.1.0a2 → raccoonai-0.1.0a4}/src/raccoonai/_types.py +0 -0
  46. {raccoonai-0.1.0a2 → raccoonai-0.1.0a4}/src/raccoonai/_utils/__init__.py +0 -0
  47. {raccoonai-0.1.0a2 → raccoonai-0.1.0a4}/src/raccoonai/_utils/_logs.py +0 -0
  48. {raccoonai-0.1.0a2 → raccoonai-0.1.0a4}/src/raccoonai/_utils/_proxy.py +0 -0
  49. {raccoonai-0.1.0a2 → raccoonai-0.1.0a4}/src/raccoonai/_utils/_reflection.py +0 -0
  50. {raccoonai-0.1.0a2 → raccoonai-0.1.0a4}/src/raccoonai/_utils/_streams.py +0 -0
  51. {raccoonai-0.1.0a2 → raccoonai-0.1.0a4}/src/raccoonai/_utils/_typing.py +0 -0
  52. {raccoonai-0.1.0a2 → raccoonai-0.1.0a4}/src/raccoonai/_utils/_utils.py +0 -0
  53. {raccoonai-0.1.0a2 → raccoonai-0.1.0a4}/src/raccoonai/lib/.keep +0 -0
  54. {raccoonai-0.1.0a2 → raccoonai-0.1.0a4}/src/raccoonai/py.typed +0 -0
  55. {raccoonai-0.1.0a2 → raccoonai-0.1.0a4}/src/raccoonai/resources/__init__.py +0 -0
  56. {raccoonai-0.1.0a2 → raccoonai-0.1.0a4}/src/raccoonai/resources/fleet.py +0 -0
  57. {raccoonai-0.1.0a2 → raccoonai-0.1.0a4}/src/raccoonai/types/__init__.py +0 -0
  58. {raccoonai-0.1.0a2 → raccoonai-0.1.0a4}/src/raccoonai/types/fleet_create_params.py +0 -0
  59. {raccoonai-0.1.0a2 → raccoonai-0.1.0a4}/src/raccoonai/types/fleet_create_response.py +0 -0
  60. {raccoonai-0.1.0a2 → raccoonai-0.1.0a4}/src/raccoonai/types/fleet_logs_response.py +0 -0
  61. {raccoonai-0.1.0a2 → raccoonai-0.1.0a4}/src/raccoonai/types/fleet_status_response.py +0 -0
  62. {raccoonai-0.1.0a2 → raccoonai-0.1.0a4}/src/raccoonai/types/fleet_terminate_response.py +0 -0
  63. {raccoonai-0.1.0a2 → raccoonai-0.1.0a4}/src/raccoonai/types/lam_extract_response.py +0 -0
  64. {raccoonai-0.1.0a2 → raccoonai-0.1.0a4}/tests/__init__.py +0 -0
  65. {raccoonai-0.1.0a2 → raccoonai-0.1.0a4}/tests/api_resources/__init__.py +0 -0
  66. {raccoonai-0.1.0a2 → raccoonai-0.1.0a4}/tests/api_resources/test_lam.py +0 -0
  67. {raccoonai-0.1.0a2 → raccoonai-0.1.0a4}/tests/conftest.py +0 -0
  68. {raccoonai-0.1.0a2 → raccoonai-0.1.0a4}/tests/sample_file.txt +0 -0
  69. {raccoonai-0.1.0a2 → raccoonai-0.1.0a4}/tests/test_deepcopy.py +0 -0
  70. {raccoonai-0.1.0a2 → raccoonai-0.1.0a4}/tests/test_extract_files.py +0 -0
  71. {raccoonai-0.1.0a2 → raccoonai-0.1.0a4}/tests/test_files.py +0 -0
  72. {raccoonai-0.1.0a2 → raccoonai-0.1.0a4}/tests/test_models.py +0 -0
  73. {raccoonai-0.1.0a2 → raccoonai-0.1.0a4}/tests/test_qs.py +0 -0
  74. {raccoonai-0.1.0a2 → raccoonai-0.1.0a4}/tests/test_required_args.py +0 -0
  75. {raccoonai-0.1.0a2 → raccoonai-0.1.0a4}/tests/test_response.py +0 -0
  76. {raccoonai-0.1.0a2 → raccoonai-0.1.0a4}/tests/test_streaming.py +0 -0
  77. {raccoonai-0.1.0a2 → raccoonai-0.1.0a4}/tests/test_utils/test_proxy.py +0 -0
  78. {raccoonai-0.1.0a2 → raccoonai-0.1.0a4}/tests/test_utils/test_typing.py +0 -0
  79. {raccoonai-0.1.0a2 → raccoonai-0.1.0a4}/tests/utils.py +0 -0
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "0.1.0-alpha.4"
3
+ }
@@ -0,0 +1,43 @@
1
+ # Changelog
2
+
3
+ ## 0.1.0-alpha.4 (2025-02-14)
4
+
5
+ Full Changelog: [v0.1.0-alpha.3...v0.1.0-alpha.4](https://github.com/flyingraccoonai/raccoonai-python/compare/v0.1.0-alpha.3...v0.1.0-alpha.4)
6
+
7
+ ### Bug Fixes
8
+
9
+ * asyncify on non-asyncio runtimes ([#15](https://github.com/flyingraccoonai/raccoonai-python/issues/15)) ([5a8345e](https://github.com/flyingraccoonai/raccoonai-python/commit/5a8345e71be12864429fa19e8d4d55c9b70a63db))
10
+
11
+ ## 0.1.0-alpha.3 (2025-02-13)
12
+
13
+ Full Changelog: [v0.1.0-alpha.2...v0.1.0-alpha.3](https://github.com/flyingraccoonai/raccoonai-python/compare/v0.1.0-alpha.2...v0.1.0-alpha.3)
14
+
15
+ ### Features
16
+
17
+ * **api:** api update ([#13](https://github.com/flyingraccoonai/raccoonai-python/issues/13)) ([72b8d09](https://github.com/flyingraccoonai/raccoonai-python/commit/72b8d0941c8b4e3d4c880815a4bfd4f92ab3f208))
18
+ * **client:** send `X-Stainless-Read-Timeout` header ([#9](https://github.com/flyingraccoonai/raccoonai-python/issues/9)) ([8034585](https://github.com/flyingraccoonai/raccoonai-python/commit/80345850aeeb00d8551d467804554b33216866a4))
19
+
20
+
21
+ ### Chores
22
+
23
+ * **internal:** bummp ruff dependency ([#8](https://github.com/flyingraccoonai/raccoonai-python/issues/8)) ([248b017](https://github.com/flyingraccoonai/raccoonai-python/commit/248b017f449a20d44fd9d3f750b61713c2267b08))
24
+ * **internal:** change default timeout to an int ([#6](https://github.com/flyingraccoonai/raccoonai-python/issues/6)) ([b889fd3](https://github.com/flyingraccoonai/raccoonai-python/commit/b889fd33d45027dcb9a388be08096e7dc7a1ab9c))
25
+ * **internal:** fix type traversing dictionary params ([#10](https://github.com/flyingraccoonai/raccoonai-python/issues/10)) ([4f5365b](https://github.com/flyingraccoonai/raccoonai-python/commit/4f5365bb697819c392bb4e9bc162f7f9f051fdbf))
26
+ * **internal:** minor type handling changes ([#11](https://github.com/flyingraccoonai/raccoonai-python/issues/11)) ([9e102a6](https://github.com/flyingraccoonai/raccoonai-python/commit/9e102a69172abf65c913290656137e52b1519d4e))
27
+ * **internal:** update client tests ([#12](https://github.com/flyingraccoonai/raccoonai-python/issues/12)) ([13f2190](https://github.com/flyingraccoonai/raccoonai-python/commit/13f2190c2e9fd7d4b6f3159a962d47ef6c2d9316))
28
+
29
+ ## 0.1.0-alpha.2 (2025-01-29)
30
+
31
+ Full Changelog: [v0.1.0-alpha.1...v0.1.0-alpha.2](https://github.com/flyingraccoonai/raccoonai-python/compare/v0.1.0-alpha.1...v0.1.0-alpha.2)
32
+
33
+ ### Features
34
+
35
+ * **api:** api update ([#3](https://github.com/flyingraccoonai/raccoonai-python/issues/3)) ([e251dc3](https://github.com/flyingraccoonai/raccoonai-python/commit/e251dc358ce3cc88ef81c20911125a237cd88d07))
36
+
37
+ ## 0.1.0-alpha.1 (2025-01-24)
38
+
39
+ Full Changelog: [v0.0.1-alpha.0...v0.1.0-alpha.1](https://github.com/flyingraccoonai/raccoonai-python/compare/v0.0.1-alpha.0...v0.1.0-alpha.1)
40
+
41
+ ### Features
42
+
43
+ * **api:** update via SDK Studio ([b4beda1](https://github.com/flyingraccoonai/raccoonai-python/commit/b4beda18093cfb681ade68610e307b7ce07fa4d2))
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: raccoonai
3
- Version: 0.1.0a2
3
+ Version: 0.1.0a4
4
4
  Summary: The official Python library for the raccoonAI API
5
5
  Project-URL: Homepage, https://github.com/flyingraccoonai/raccoonai-python
6
6
  Project-URL: Repository, https://github.com/flyingraccoonai/raccoonai-python
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "raccoonai"
3
- version = "0.1.0-alpha.2"
3
+ version = "0.1.0-alpha.4"
4
4
  description = "The official Python library for the raccoonAI API"
5
5
  dynamic = ["readme"]
6
6
  license = "Apache-2.0"
@@ -177,7 +177,7 @@ select = [
177
177
  "T201",
178
178
  "T203",
179
179
  # misuse of typing.TYPE_CHECKING
180
- "TCH004",
180
+ "TC004",
181
181
  # import rules
182
182
  "TID251",
183
183
  ]
@@ -78,7 +78,7 @@ pytz==2023.3.post1
78
78
  # via dirty-equals
79
79
  respx==0.22.0
80
80
  rich==13.7.1
81
- ruff==0.6.9
81
+ ruff==0.9.4
82
82
  setuptools==68.2.2
83
83
  # via nodeenv
84
84
  six==1.16.0
@@ -418,10 +418,17 @@ class BaseClient(Generic[_HttpxClientT, _DefaultStreamT]):
418
418
  if idempotency_header and options.method.lower() != "get" and idempotency_header not in headers:
419
419
  headers[idempotency_header] = options.idempotency_key or self._idempotency_key()
420
420
 
421
- # Don't set the retry count header if it was already set or removed by the caller. We check
421
+ # Don't set these headers if they were already set or removed by the caller. We check
422
422
  # `custom_headers`, which can contain `Omit()`, instead of `headers` to account for the removal case.
423
- if "x-stainless-retry-count" not in (header.lower() for header in custom_headers):
423
+ lower_custom_headers = [header.lower() for header in custom_headers]
424
+ if "x-stainless-retry-count" not in lower_custom_headers:
424
425
  headers["x-stainless-retry-count"] = str(retries_taken)
426
+ if "x-stainless-read-timeout" not in lower_custom_headers:
427
+ timeout = self.timeout if isinstance(options.timeout, NotGiven) else options.timeout
428
+ if isinstance(timeout, Timeout):
429
+ timeout = timeout.read
430
+ if timeout is not None:
431
+ headers["x-stainless-read-timeout"] = str(timeout)
425
432
 
426
433
  return headers
427
434
 
@@ -6,7 +6,7 @@ RAW_RESPONSE_HEADER = "X-Stainless-Raw-Response"
6
6
  OVERRIDE_CAST_TO_HEADER = "____stainless_override_cast_to"
7
7
 
8
8
  # default timeout is 1 minute
9
- DEFAULT_TIMEOUT = httpx.Timeout(timeout=60.0, connect=5.0)
9
+ DEFAULT_TIMEOUT = httpx.Timeout(timeout=60, connect=5.0)
10
10
  DEFAULT_MAX_RETRIES = 2
11
11
  DEFAULT_CONNECTION_LIMITS = httpx.Limits(max_connections=100, max_keepalive_connections=20)
12
12
 
@@ -172,7 +172,7 @@ class BaseModel(pydantic.BaseModel):
172
172
  @override
173
173
  def __str__(self) -> str:
174
174
  # mypy complains about an invalid self arg
175
- return f'{self.__repr_name__()}({self.__repr_str__(", ")})' # type: ignore[misc]
175
+ return f"{self.__repr_name__()}({self.__repr_str__(', ')})" # type: ignore[misc]
176
176
 
177
177
  # Override the 'construct' method in a way that supports recursive parsing without validation.
178
178
  # Based on https://github.com/samuelcolvin/pydantic/issues/1168#issuecomment-817742836.
@@ -426,10 +426,16 @@ def construct_type(*, value: object, type_: object) -> object:
426
426
 
427
427
  If the given value does not match the expected type then it is returned as-is.
428
428
  """
429
+
430
+ # store a reference to the original type we were given before we extract any inner
431
+ # types so that we can properly resolve forward references in `TypeAliasType` annotations
432
+ original_type = None
433
+
429
434
  # we allow `object` as the input type because otherwise, passing things like
430
435
  # `Literal['value']` will be reported as a type error by type checkers
431
436
  type_ = cast("type[object]", type_)
432
437
  if is_type_alias_type(type_):
438
+ original_type = type_ # type: ignore[unreachable]
433
439
  type_ = type_.__value__ # type: ignore[unreachable]
434
440
 
435
441
  # unwrap `Annotated[T, ...]` -> `T`
@@ -446,7 +452,7 @@ def construct_type(*, value: object, type_: object) -> object:
446
452
 
447
453
  if is_union(origin):
448
454
  try:
449
- return validate_type(type_=cast("type[object]", type_), value=value)
455
+ return validate_type(type_=cast("type[object]", original_type or type_), value=value)
450
456
  except Exception:
451
457
  pass
452
458
 
@@ -7,16 +7,20 @@ import contextvars
7
7
  from typing import Any, TypeVar, Callable, Awaitable
8
8
  from typing_extensions import ParamSpec
9
9
 
10
+ import anyio
11
+ import sniffio
12
+ import anyio.to_thread
13
+
10
14
  T_Retval = TypeVar("T_Retval")
11
15
  T_ParamSpec = ParamSpec("T_ParamSpec")
12
16
 
13
17
 
14
18
  if sys.version_info >= (3, 9):
15
- to_thread = asyncio.to_thread
19
+ _asyncio_to_thread = asyncio.to_thread
16
20
  else:
17
21
  # backport of https://docs.python.org/3/library/asyncio-task.html#asyncio.to_thread
18
22
  # for Python 3.8 support
19
- async def to_thread(
23
+ async def _asyncio_to_thread(
20
24
  func: Callable[T_ParamSpec, T_Retval], /, *args: T_ParamSpec.args, **kwargs: T_ParamSpec.kwargs
21
25
  ) -> Any:
22
26
  """Asynchronously run function *func* in a separate thread.
@@ -34,6 +38,17 @@ else:
34
38
  return await loop.run_in_executor(None, func_call)
35
39
 
36
40
 
41
+ async def to_thread(
42
+ func: Callable[T_ParamSpec, T_Retval], /, *args: T_ParamSpec.args, **kwargs: T_ParamSpec.kwargs
43
+ ) -> T_Retval:
44
+ if sniffio.current_async_library() == "asyncio":
45
+ return await _asyncio_to_thread(func, *args, **kwargs)
46
+
47
+ return await anyio.to_thread.run_sync(
48
+ functools.partial(func, *args, **kwargs),
49
+ )
50
+
51
+
37
52
  # inspired by `asyncer`, https://github.com/tiangolo/asyncer
38
53
  def asyncify(function: Callable[T_ParamSpec, T_Retval]) -> Callable[T_ParamSpec, Awaitable[T_Retval]]:
39
54
  """
@@ -25,7 +25,7 @@ from ._typing import (
25
25
  is_annotated_type,
26
26
  strip_annotated_type,
27
27
  )
28
- from .._compat import model_dump, is_typeddict
28
+ from .._compat import get_origin, model_dump, is_typeddict
29
29
 
30
30
  _T = TypeVar("_T")
31
31
 
@@ -164,9 +164,14 @@ def _transform_recursive(
164
164
  inner_type = annotation
165
165
 
166
166
  stripped_type = strip_annotated_type(inner_type)
167
+ origin = get_origin(stripped_type) or stripped_type
167
168
  if is_typeddict(stripped_type) and is_mapping(data):
168
169
  return _transform_typeddict(data, stripped_type)
169
170
 
171
+ if origin == dict and is_mapping(data):
172
+ items_type = get_args(stripped_type)[1]
173
+ return {key: _transform_recursive(value, annotation=items_type) for key, value in data.items()}
174
+
170
175
  if (
171
176
  # List[T]
172
177
  (is_list_type(stripped_type) and is_list(data))
@@ -307,9 +312,14 @@ async def _async_transform_recursive(
307
312
  inner_type = annotation
308
313
 
309
314
  stripped_type = strip_annotated_type(inner_type)
315
+ origin = get_origin(stripped_type) or stripped_type
310
316
  if is_typeddict(stripped_type) and is_mapping(data):
311
317
  return await _async_transform_typeddict(data, stripped_type)
312
318
 
319
+ if origin == dict and is_mapping(data):
320
+ items_type = get_args(stripped_type)[1]
321
+ return {key: _transform_recursive(value, annotation=items_type) for key, value in data.items()}
322
+
313
323
  if (
314
324
  # List[T]
315
325
  (is_list_type(stripped_type) and is_list(data))
@@ -1,4 +1,4 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  __title__ = "raccoonai"
4
- __version__ = "0.1.0-alpha.2" # x-release-please-version
4
+ __version__ = "0.1.0-alpha.4" # x-release-please-version
@@ -80,7 +80,7 @@ class LamResource(SyncAPIResource):
80
80
  raccoon_passcode: The raccoon passcode associated with the end user on behalf of which the call is
81
81
  being made.
82
82
 
83
- advanced: Advanced configuration options for the task, such as ad-blocking and CAPTCHA
83
+ advanced: Advanced configuration options for the session, such as ad-blocking and CAPTCHA
84
84
  solving.
85
85
 
86
86
  app_url: This is the entrypoint URL for the web agent.
@@ -136,7 +136,7 @@ class LamResource(SyncAPIResource):
136
136
 
137
137
  stream: Whether the response should be streamed back or not.
138
138
 
139
- advanced: Advanced configuration options for the task, such as ad-blocking and CAPTCHA
139
+ advanced: Advanced configuration options for the session, such as ad-blocking and CAPTCHA
140
140
  solving.
141
141
 
142
142
  app_url: This is the entrypoint URL for the web agent.
@@ -190,7 +190,7 @@ class LamResource(SyncAPIResource):
190
190
 
191
191
  stream: Whether the response should be streamed back or not.
192
192
 
193
- advanced: Advanced configuration options for the task, such as ad-blocking and CAPTCHA
193
+ advanced: Advanced configuration options for the session, such as ad-blocking and CAPTCHA
194
194
  solving.
195
195
 
196
196
  app_url: This is the entrypoint URL for the web agent.
@@ -279,7 +279,7 @@ class LamResource(SyncAPIResource):
279
279
  raccoon_passcode: The raccoon passcode associated with the end user on behalf of which the call is
280
280
  being made.
281
281
 
282
- advanced: Advanced configuration options for the task, such as ad-blocking and CAPTCHA
282
+ advanced: Advanced configuration options for the session, such as ad-blocking and CAPTCHA
283
283
  solving.
284
284
 
285
285
  integration_id: The unique identifier for the integration being called.
@@ -324,7 +324,7 @@ class LamResource(SyncAPIResource):
324
324
 
325
325
  stream: Whether the response should be streamed back or not.
326
326
 
327
- advanced: Advanced configuration options for the task, such as ad-blocking and CAPTCHA
327
+ advanced: Advanced configuration options for the session, such as ad-blocking and CAPTCHA
328
328
  solving.
329
329
 
330
330
  integration_id: The unique identifier for the integration being called.
@@ -367,7 +367,7 @@ class LamResource(SyncAPIResource):
367
367
 
368
368
  stream: Whether the response should be streamed back or not.
369
369
 
370
- advanced: Advanced configuration options for the task, such as ad-blocking and CAPTCHA
370
+ advanced: Advanced configuration options for the session, such as ad-blocking and CAPTCHA
371
371
  solving.
372
372
 
373
373
  integration_id: The unique identifier for the integration being called.
@@ -455,7 +455,7 @@ class LamResource(SyncAPIResource):
455
455
  raccoon_passcode: The raccoon passcode associated with the end user on behalf of which the call is
456
456
  being made.
457
457
 
458
- advanced: Advanced configuration options for the task, such as ad-blocking and CAPTCHA
458
+ advanced: Advanced configuration options for the session, such as ad-blocking and CAPTCHA
459
459
  solving.
460
460
 
461
461
  app_url: This is the entrypoint URL for the web agent.
@@ -504,7 +504,7 @@ class LamResource(SyncAPIResource):
504
504
 
505
505
  stream: Whether the response should be streamed back or not.
506
506
 
507
- advanced: Advanced configuration options for the task, such as ad-blocking and CAPTCHA
507
+ advanced: Advanced configuration options for the session, such as ad-blocking and CAPTCHA
508
508
  solving.
509
509
 
510
510
  app_url: This is the entrypoint URL for the web agent.
@@ -551,7 +551,7 @@ class LamResource(SyncAPIResource):
551
551
 
552
552
  stream: Whether the response should be streamed back or not.
553
553
 
554
- advanced: Advanced configuration options for the task, such as ad-blocking and CAPTCHA
554
+ advanced: Advanced configuration options for the session, such as ad-blocking and CAPTCHA
555
555
  solving.
556
556
 
557
557
  app_url: This is the entrypoint URL for the web agent.
@@ -657,7 +657,7 @@ class AsyncLamResource(AsyncAPIResource):
657
657
  raccoon_passcode: The raccoon passcode associated with the end user on behalf of which the call is
658
658
  being made.
659
659
 
660
- advanced: Advanced configuration options for the task, such as ad-blocking and CAPTCHA
660
+ advanced: Advanced configuration options for the session, such as ad-blocking and CAPTCHA
661
661
  solving.
662
662
 
663
663
  app_url: This is the entrypoint URL for the web agent.
@@ -713,7 +713,7 @@ class AsyncLamResource(AsyncAPIResource):
713
713
 
714
714
  stream: Whether the response should be streamed back or not.
715
715
 
716
- advanced: Advanced configuration options for the task, such as ad-blocking and CAPTCHA
716
+ advanced: Advanced configuration options for the session, such as ad-blocking and CAPTCHA
717
717
  solving.
718
718
 
719
719
  app_url: This is the entrypoint URL for the web agent.
@@ -767,7 +767,7 @@ class AsyncLamResource(AsyncAPIResource):
767
767
 
768
768
  stream: Whether the response should be streamed back or not.
769
769
 
770
- advanced: Advanced configuration options for the task, such as ad-blocking and CAPTCHA
770
+ advanced: Advanced configuration options for the session, such as ad-blocking and CAPTCHA
771
771
  solving.
772
772
 
773
773
  app_url: This is the entrypoint URL for the web agent.
@@ -856,7 +856,7 @@ class AsyncLamResource(AsyncAPIResource):
856
856
  raccoon_passcode: The raccoon passcode associated with the end user on behalf of which the call is
857
857
  being made.
858
858
 
859
- advanced: Advanced configuration options for the task, such as ad-blocking and CAPTCHA
859
+ advanced: Advanced configuration options for the session, such as ad-blocking and CAPTCHA
860
860
  solving.
861
861
 
862
862
  integration_id: The unique identifier for the integration being called.
@@ -901,7 +901,7 @@ class AsyncLamResource(AsyncAPIResource):
901
901
 
902
902
  stream: Whether the response should be streamed back or not.
903
903
 
904
- advanced: Advanced configuration options for the task, such as ad-blocking and CAPTCHA
904
+ advanced: Advanced configuration options for the session, such as ad-blocking and CAPTCHA
905
905
  solving.
906
906
 
907
907
  integration_id: The unique identifier for the integration being called.
@@ -944,7 +944,7 @@ class AsyncLamResource(AsyncAPIResource):
944
944
 
945
945
  stream: Whether the response should be streamed back or not.
946
946
 
947
- advanced: Advanced configuration options for the task, such as ad-blocking and CAPTCHA
947
+ advanced: Advanced configuration options for the session, such as ad-blocking and CAPTCHA
948
948
  solving.
949
949
 
950
950
  integration_id: The unique identifier for the integration being called.
@@ -1032,7 +1032,7 @@ class AsyncLamResource(AsyncAPIResource):
1032
1032
  raccoon_passcode: The raccoon passcode associated with the end user on behalf of which the call is
1033
1033
  being made.
1034
1034
 
1035
- advanced: Advanced configuration options for the task, such as ad-blocking and CAPTCHA
1035
+ advanced: Advanced configuration options for the session, such as ad-blocking and CAPTCHA
1036
1036
  solving.
1037
1037
 
1038
1038
  app_url: This is the entrypoint URL for the web agent.
@@ -1081,7 +1081,7 @@ class AsyncLamResource(AsyncAPIResource):
1081
1081
 
1082
1082
  stream: Whether the response should be streamed back or not.
1083
1083
 
1084
- advanced: Advanced configuration options for the task, such as ad-blocking and CAPTCHA
1084
+ advanced: Advanced configuration options for the session, such as ad-blocking and CAPTCHA
1085
1085
  solving.
1086
1086
 
1087
1087
  app_url: This is the entrypoint URL for the web agent.
@@ -1128,7 +1128,7 @@ class AsyncLamResource(AsyncAPIResource):
1128
1128
 
1129
1129
  stream: Whether the response should be streamed back or not.
1130
1130
 
1131
- advanced: Advanced configuration options for the task, such as ad-blocking and CAPTCHA
1131
+ advanced: Advanced configuration options for the session, such as ad-blocking and CAPTCHA
1132
1132
  solving.
1133
1133
 
1134
1134
  app_url: This is the entrypoint URL for the web agent.
@@ -20,7 +20,7 @@ class LamExtractParamsBase(TypedDict, total=False):
20
20
 
21
21
  advanced: Optional[Advanced]
22
22
  """
23
- Advanced configuration options for the task, such as ad-blocking and CAPTCHA
23
+ Advanced configuration options for the session, such as ad-blocking and CAPTCHA
24
24
  solving.
25
25
  """
26
26
 
@@ -22,7 +22,7 @@ class LamIntegrationRunParamsBase(TypedDict, total=False):
22
22
 
23
23
  advanced: Optional[Advanced]
24
24
  """
25
- Advanced configuration options for the task, such as ad-blocking and CAPTCHA
25
+ Advanced configuration options for the session, such as ad-blocking and CAPTCHA
26
26
  solving.
27
27
  """
28
28
 
@@ -22,7 +22,7 @@ class UnionMember0(BaseModel):
22
22
  """Additional metadata or details related to the integration task."""
23
23
 
24
24
  task_status: str
25
- """The current status of the integration task.
25
+ """The current status of the extraction task.
26
26
 
27
27
  For example: 'STARTING', 'PROCESSING', 'DONE', 'HUMAN_INTERACTION', or
28
28
  'FAILURE'.
@@ -43,7 +43,7 @@ class IntegrationResponse(BaseModel):
43
43
  """Additional metadata or details related to the integration task."""
44
44
 
45
45
  task_status: str
46
- """The current status of the integration task.
46
+ """The current status of the extraction task.
47
47
 
48
48
  For example: 'STARTING', 'PROCESSING', 'DONE', 'HUMAN_INTERACTION', or
49
49
  'FAILURE'.
@@ -20,7 +20,7 @@ class LamRunParamsBase(TypedDict, total=False):
20
20
 
21
21
  advanced: Optional[Advanced]
22
22
  """
23
- Advanced configuration options for the task, such as ad-blocking and CAPTCHA
23
+ Advanced configuration options for the session, such as ad-blocking and CAPTCHA
24
24
  solving.
25
25
  """
26
26
 
@@ -17,7 +17,7 @@ class LamRunResponse(BaseModel):
17
17
  """Additional metadata or details related to the run task."""
18
18
 
19
19
  task_status: str
20
- """The current status of the run task.
20
+ """The current status of the extraction task.
21
21
 
22
22
  For example: 'STARTING', 'PROCESSING', 'DONE', 'HUMAN_INTERACTION', or
23
23
  'FAILURE'.
@@ -46,8 +46,8 @@ class TestFleet:
46
46
  "locales": ["en-US", "fr-FR"],
47
47
  "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36",
48
48
  "viewport": {
49
- "height": 1080,
50
- "width": 1920,
49
+ "height": 720,
50
+ "width": 1280,
51
51
  },
52
52
  },
53
53
  url="https://www.google.com",
@@ -230,8 +230,8 @@ class TestAsyncFleet:
230
230
  "locales": ["en-US", "fr-FR"],
231
231
  "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36",
232
232
  "viewport": {
233
- "height": 1080,
234
- "width": 1920,
233
+ "height": 720,
234
+ "width": 1280,
235
235
  },
236
236
  },
237
237
  url="https://www.google.com",
@@ -23,6 +23,7 @@ from pydantic import ValidationError
23
23
 
24
24
  from raccoonai import RaccoonAI, AsyncRaccoonAI, APIResponseValidationError
25
25
  from raccoonai._types import Omit
26
+ from raccoonai._utils import maybe_transform
26
27
  from raccoonai._models import BaseModel, FinalRequestOptions
27
28
  from raccoonai._constants import RAW_RESPONSE_HEADER
28
29
  from raccoonai._exceptions import APIStatusError, RaccoonAIError, APITimeoutError, APIResponseValidationError
@@ -32,6 +33,7 @@ from raccoonai._base_client import (
32
33
  BaseClient,
33
34
  make_request_options,
34
35
  )
36
+ from raccoonai.types.lam_run_params import LamRunParamsNonStreaming
35
37
 
36
38
  from .utils import update_env
37
39
 
@@ -742,8 +744,12 @@ class TestRaccoonAI:
742
744
  "/lam/run",
743
745
  body=cast(
744
746
  object,
745
- dict(
746
- query="Find the price of iphone 16 on Amazon.", raccoon_passcode="<end-user-raccoon-passcode>"
747
+ maybe_transform(
748
+ dict(
749
+ query="Find the price of iphone 16 on Amazon.",
750
+ raccoon_passcode="<end-user-raccoon-passcode>",
751
+ ),
752
+ LamRunParamsNonStreaming,
747
753
  ),
748
754
  ),
749
755
  cast_to=httpx.Response,
@@ -762,8 +768,12 @@ class TestRaccoonAI:
762
768
  "/lam/run",
763
769
  body=cast(
764
770
  object,
765
- dict(
766
- query="Find the price of iphone 16 on Amazon.", raccoon_passcode="<end-user-raccoon-passcode>"
771
+ maybe_transform(
772
+ dict(
773
+ query="Find the price of iphone 16 on Amazon.",
774
+ raccoon_passcode="<end-user-raccoon-passcode>",
775
+ ),
776
+ LamRunParamsNonStreaming,
767
777
  ),
768
778
  ),
769
779
  cast_to=httpx.Response,
@@ -1551,8 +1561,12 @@ class TestAsyncRaccoonAI:
1551
1561
  "/lam/run",
1552
1562
  body=cast(
1553
1563
  object,
1554
- dict(
1555
- query="Find the price of iphone 16 on Amazon.", raccoon_passcode="<end-user-raccoon-passcode>"
1564
+ maybe_transform(
1565
+ dict(
1566
+ query="Find the price of iphone 16 on Amazon.",
1567
+ raccoon_passcode="<end-user-raccoon-passcode>",
1568
+ ),
1569
+ LamRunParamsNonStreaming,
1556
1570
  ),
1557
1571
  ),
1558
1572
  cast_to=httpx.Response,
@@ -1571,8 +1585,12 @@ class TestAsyncRaccoonAI:
1571
1585
  "/lam/run",
1572
1586
  body=cast(
1573
1587
  object,
1574
- dict(
1575
- query="Find the price of iphone 16 on Amazon.", raccoon_passcode="<end-user-raccoon-passcode>"
1588
+ maybe_transform(
1589
+ dict(
1590
+ query="Find the price of iphone 16 on Amazon.",
1591
+ raccoon_passcode="<end-user-raccoon-passcode>",
1592
+ ),
1593
+ LamRunParamsNonStreaming,
1576
1594
  ),
1577
1595
  ),
1578
1596
  cast_to=httpx.Response,
@@ -2,7 +2,7 @@ from __future__ import annotations
2
2
 
3
3
  import io
4
4
  import pathlib
5
- from typing import Any, List, Union, TypeVar, Iterable, Optional, cast
5
+ from typing import Any, Dict, List, Union, TypeVar, Iterable, Optional, cast
6
6
  from datetime import date, datetime
7
7
  from typing_extensions import Required, Annotated, TypedDict
8
8
 
@@ -388,6 +388,15 @@ async def test_iterable_of_dictionaries(use_async: bool) -> None:
388
388
  }
389
389
 
390
390
 
391
+ @parametrize
392
+ @pytest.mark.asyncio
393
+ async def test_dictionary_items(use_async: bool) -> None:
394
+ class DictItems(TypedDict):
395
+ foo_baz: Annotated[str, PropertyInfo(alias="fooBaz")]
396
+
397
+ assert await transform({"foo": {"foo_baz": "bar"}}, Dict[str, DictItems], use_async) == {"foo": {"fooBaz": "bar"}}
398
+
399
+
391
400
  class TypedDictIterableUnionStr(TypedDict):
392
401
  foo: Annotated[Union[str, Iterable[Baz8]], PropertyInfo(alias="FOO")]
393
402
 
@@ -1,3 +0,0 @@
1
- {
2
- ".": "0.1.0-alpha.2"
3
- }
@@ -1,17 +0,0 @@
1
- # Changelog
2
-
3
- ## 0.1.0-alpha.2 (2025-01-29)
4
-
5
- Full Changelog: [v0.1.0-alpha.1...v0.1.0-alpha.2](https://github.com/flyingraccoonai/raccoonai-python/compare/v0.1.0-alpha.1...v0.1.0-alpha.2)
6
-
7
- ### Features
8
-
9
- * **api:** api update ([#3](https://github.com/flyingraccoonai/raccoonai-python/issues/3)) ([e251dc3](https://github.com/flyingraccoonai/raccoonai-python/commit/e251dc358ce3cc88ef81c20911125a237cd88d07))
10
-
11
- ## 0.1.0-alpha.1 (2025-01-24)
12
-
13
- Full Changelog: [v0.0.1-alpha.0...v0.1.0-alpha.1](https://github.com/flyingraccoonai/raccoonai-python/compare/v0.0.1-alpha.0...v0.1.0-alpha.1)
14
-
15
- ### Features
16
-
17
- * **api:** update via SDK Studio ([b4beda1](https://github.com/flyingraccoonai/raccoonai-python/commit/b4beda18093cfb681ade68610e307b7ce07fa4d2))
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