raccoonai 0.1.0a18__tar.gz → 0.1.0a19__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 (116) hide show
  1. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/.gitignore +0 -1
  2. raccoonai-0.1.0a19/.release-please-manifest.json +3 -0
  3. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/CHANGELOG.md +48 -0
  4. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/PKG-INFO +42 -3
  5. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/README.md +37 -2
  6. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/bin/check-release-environment +1 -1
  7. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/pyproject.toml +62 -3
  8. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/requirements-dev.lock +34 -5
  9. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/requirements.lock +34 -4
  10. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/src/raccoonai/__init__.py +5 -2
  11. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/src/raccoonai/_base_client.py +46 -14
  12. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/src/raccoonai/_client.py +12 -12
  13. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/src/raccoonai/_compat.py +48 -48
  14. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/src/raccoonai/_files.py +4 -4
  15. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/src/raccoonai/_models.py +80 -50
  16. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/src/raccoonai/_qs.py +7 -7
  17. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/src/raccoonai/_streaming.py +4 -6
  18. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/src/raccoonai/_types.py +53 -12
  19. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/src/raccoonai/_utils/__init__.py +9 -2
  20. raccoonai-0.1.0a19/src/raccoonai/_utils/_compat.py +45 -0
  21. raccoonai-0.1.0a19/src/raccoonai/_utils/_datetime_parse.py +136 -0
  22. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/src/raccoonai/_utils/_transform.py +13 -3
  23. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/src/raccoonai/_utils/_typing.py +6 -1
  24. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/src/raccoonai/_utils/_utils.py +5 -6
  25. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/src/raccoonai/_version.py +1 -1
  26. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/src/raccoonai/resources/fleet/extensions.py +9 -9
  27. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/src/raccoonai/resources/fleet/sessions.py +47 -49
  28. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/src/raccoonai/resources/lam/lam.py +61 -61
  29. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/src/raccoonai/resources/lam/tasks.py +23 -25
  30. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/src/raccoonai/resources/tail/apps.py +5 -5
  31. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/src/raccoonai/resources/tail/users.py +21 -21
  32. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/src/raccoonai/types/fleet/session_create_params.py +4 -2
  33. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/tests/api_resources/fleet/test_extensions.py +3 -1
  34. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/tests/api_resources/fleet/test_sessions.py +3 -1
  35. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/tests/api_resources/lam/test_tasks.py +3 -1
  36. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/tests/api_resources/tail/test_apps.py +3 -1
  37. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/tests/api_resources/tail/test_users.py +3 -1
  38. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/tests/api_resources/test_lam.py +3 -1
  39. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/tests/conftest.py +37 -6
  40. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/tests/test_client.py +232 -282
  41. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/tests/test_models.py +96 -24
  42. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/tests/test_transform.py +17 -10
  43. raccoonai-0.1.0a19/tests/test_utils/test_datetime_parse.py +110 -0
  44. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/tests/utils.py +13 -5
  45. raccoonai-0.1.0a18/.release-please-manifest.json +0 -3
  46. raccoonai-0.1.0a18/mypy.ini +0 -50
  47. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/CONTRIBUTING.md +0 -0
  48. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/LICENSE +0 -0
  49. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/SECURITY.md +0 -0
  50. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/api.md +0 -0
  51. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/bin/publish-pypi +0 -0
  52. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/examples/.keep +0 -0
  53. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/noxfile.py +0 -0
  54. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/release-please-config.json +0 -0
  55. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/src/raccoonai/_constants.py +0 -0
  56. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/src/raccoonai/_exceptions.py +0 -0
  57. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/src/raccoonai/_resource.py +0 -0
  58. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/src/raccoonai/_response.py +0 -0
  59. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/src/raccoonai/_utils/_logs.py +0 -0
  60. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/src/raccoonai/_utils/_proxy.py +0 -0
  61. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/src/raccoonai/_utils/_reflection.py +0 -0
  62. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/src/raccoonai/_utils/_resources_proxy.py +0 -0
  63. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/src/raccoonai/_utils/_streams.py +0 -0
  64. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/src/raccoonai/_utils/_sync.py +0 -0
  65. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/src/raccoonai/lib/.keep +0 -0
  66. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/src/raccoonai/py.typed +0 -0
  67. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/src/raccoonai/resources/__init__.py +0 -0
  68. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/src/raccoonai/resources/fleet/__init__.py +0 -0
  69. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/src/raccoonai/resources/fleet/fleet.py +0 -0
  70. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/src/raccoonai/resources/lam/__init__.py +0 -0
  71. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/src/raccoonai/resources/tail/__init__.py +0 -0
  72. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/src/raccoonai/resources/tail/tail.py +0 -0
  73. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/src/raccoonai/types/__init__.py +0 -0
  74. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/src/raccoonai/types/fleet/__init__.py +0 -0
  75. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/src/raccoonai/types/fleet/extension_all_response.py +0 -0
  76. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/src/raccoonai/types/fleet/extension_get_response.py +0 -0
  77. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/src/raccoonai/types/fleet/extension_upload_params.py +0 -0
  78. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/src/raccoonai/types/fleet/extension_upload_response.py +0 -0
  79. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/src/raccoonai/types/fleet/session_all_params.py +0 -0
  80. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/src/raccoonai/types/fleet/session_all_response.py +0 -0
  81. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/src/raccoonai/types/fleet/session_create_response.py +0 -0
  82. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/src/raccoonai/types/fleet/session_logs_response.py +0 -0
  83. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/src/raccoonai/types/fleet/session_media_response.py +0 -0
  84. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/src/raccoonai/types/fleet/session_status_response.py +0 -0
  85. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/src/raccoonai/types/fleet/session_terminate_response.py +0 -0
  86. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/src/raccoonai/types/lam/__init__.py +0 -0
  87. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/src/raccoonai/types/lam/task_all_params.py +0 -0
  88. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/src/raccoonai/types/lam/task_all_response.py +0 -0
  89. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/src/raccoonai/types/lam/task_media_response.py +0 -0
  90. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/src/raccoonai/types/lam_run_params.py +0 -0
  91. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/src/raccoonai/types/lam_run_response.py +0 -0
  92. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/src/raccoonai/types/tail/__init__.py +0 -0
  93. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/src/raccoonai/types/tail/app_all_response.py +0 -0
  94. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/src/raccoonai/types/tail/app_linked_params.py +0 -0
  95. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/src/raccoonai/types/tail/app_linked_response.py +0 -0
  96. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/src/raccoonai/types/tail/user_all_params.py +0 -0
  97. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/src/raccoonai/types/tail/user_all_response.py +0 -0
  98. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/src/raccoonai/types/tail/user_create_params.py +0 -0
  99. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/src/raccoonai/types/tail/user_create_response.py +0 -0
  100. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/src/raccoonai/types/tail/user_status_params.py +0 -0
  101. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/src/raccoonai/types/tail/user_status_response.py +0 -0
  102. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/tests/__init__.py +0 -0
  103. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/tests/api_resources/__init__.py +0 -0
  104. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/tests/api_resources/fleet/__init__.py +0 -0
  105. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/tests/api_resources/lam/__init__.py +0 -0
  106. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/tests/api_resources/tail/__init__.py +0 -0
  107. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/tests/sample_file.txt +0 -0
  108. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/tests/test_deepcopy.py +0 -0
  109. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/tests/test_extract_files.py +0 -0
  110. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/tests/test_files.py +0 -0
  111. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/tests/test_qs.py +0 -0
  112. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/tests/test_required_args.py +0 -0
  113. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/tests/test_response.py +0 -0
  114. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/tests/test_streaming.py +0 -0
  115. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/tests/test_utils/test_proxy.py +0 -0
  116. {raccoonai-0.1.0a18 → raccoonai-0.1.0a19}/tests/test_utils/test_typing.py +0 -0
@@ -1,5 +1,4 @@
1
1
  .prism.log
2
- .vscode
3
2
  _dev
4
3
 
5
4
  __pycache__
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "0.1.0-alpha.19"
3
+ }
@@ -1,5 +1,53 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.0-alpha.19 (2025-11-04)
4
+
5
+ Full Changelog: [v0.1.0-alpha.18...v0.1.0-alpha.19](https://github.com/raccoonaihq/raccoonai-python/compare/v0.1.0-alpha.18...v0.1.0-alpha.19)
6
+
7
+ ### Features
8
+
9
+ * clean up environment call outs ([64ab1f8](https://github.com/raccoonaihq/raccoonai-python/commit/64ab1f88832be94991c827eac9b1b6fc5937d28f))
10
+ * **client:** add support for aiohttp ([f55551a](https://github.com/raccoonaihq/raccoonai-python/commit/f55551aae49ad94af24239e0e26f316698021754))
11
+ * **client:** support file upload requests ([124c4c0](https://github.com/raccoonaihq/raccoonai-python/commit/124c4c0cc214e547fa25433053e38cbd7b6338f6))
12
+
13
+
14
+ ### Bug Fixes
15
+
16
+ * **ci:** correct conditional ([4e4eca9](https://github.com/raccoonaihq/raccoonai-python/commit/4e4eca947c064446b95ded935941af2c19ae59b6))
17
+ * **ci:** release-doctor — report correct token name ([fcbd5d3](https://github.com/raccoonaihq/raccoonai-python/commit/fcbd5d3abd43ef9ee9d2bd3ba2e8731bb02e42be))
18
+ * **client:** don't send Content-Type header on GET requests ([af58369](https://github.com/raccoonaihq/raccoonai-python/commit/af583699fc05b962f33278b1fa0feab3ab495c67))
19
+ * **parsing:** correctly handle nested discriminated unions ([661189a](https://github.com/raccoonaihq/raccoonai-python/commit/661189a2a3d503b66ed2c2f499dce0905987ed10))
20
+ * **parsing:** ignore empty metadata ([6d4bca8](https://github.com/raccoonaihq/raccoonai-python/commit/6d4bca8de4db86ce82c4addbaf599433f374a646))
21
+ * **parsing:** parse extra field types ([3e1aba6](https://github.com/raccoonaihq/raccoonai-python/commit/3e1aba60cb0effd848fbd9412855d568600e7f5c))
22
+ * **tests:** fix: tests which call HTTP endpoints directly with the example parameters ([44715e4](https://github.com/raccoonaihq/raccoonai-python/commit/44715e41f17460b45ae2bf5e18dc35ccfa82fc38))
23
+
24
+
25
+ ### Chores
26
+
27
+ * **ci:** change upload type ([3b22540](https://github.com/raccoonaihq/raccoonai-python/commit/3b22540f1c3f6144dc7af703cfec8221f983188e))
28
+ * **ci:** only run for pushes and fork pull requests ([c0a2ec3](https://github.com/raccoonaihq/raccoonai-python/commit/c0a2ec355594dd9f609a078b237d44703fd51368))
29
+ * **internal:** bump pinned h11 dep ([ddf8719](https://github.com/raccoonaihq/raccoonai-python/commit/ddf871977794ce8b7208b669ed7a0104fd836d6c))
30
+ * **internal:** codegen related update ([4f91217](https://github.com/raccoonaihq/raccoonai-python/commit/4f91217e8f0584b4e456c12061ad0016637ff2aa))
31
+ * **internal:** codegen related update ([a37625d](https://github.com/raccoonaihq/raccoonai-python/commit/a37625d9889ad5abca5267dcbe11ac38dc79060e))
32
+ * **internal:** codegen related update ([92e2b6a](https://github.com/raccoonaihq/raccoonai-python/commit/92e2b6a93faad0e9d5f5a14fbd8f69aa4f47780e))
33
+ * **internal:** codegen related update ([6a542a6](https://github.com/raccoonaihq/raccoonai-python/commit/6a542a6f2c23a988acc20c73809960418434c5fc))
34
+ * **internal:** codegen related update ([d8e8a73](https://github.com/raccoonaihq/raccoonai-python/commit/d8e8a736f71b694ca9463bce54cce7a1414351b7))
35
+ * **internal:** codegen related update ([902ae5e](https://github.com/raccoonaihq/raccoonai-python/commit/902ae5e0f6b083845b85c4bf293a915a63f5b38c))
36
+ * **internal:** codegen related update ([609e96d](https://github.com/raccoonaihq/raccoonai-python/commit/609e96de49b1fdc8ac4d8a66530e4292c130ee1c))
37
+ * **internal:** fix ruff target version ([cbd2c47](https://github.com/raccoonaihq/raccoonai-python/commit/cbd2c4791e411d3c60afb909a934d641a1aad959))
38
+ * **internal:** update comment in script ([ed19702](https://github.com/raccoonaihq/raccoonai-python/commit/ed19702d3c38a2a5c627d401f16a658d87e61f08))
39
+ * **package:** mark python 3.13 as supported ([64b34a0](https://github.com/raccoonaihq/raccoonai-python/commit/64b34a04c3344d4d2b6c6c8be258f08480f420fb))
40
+ * **project:** add settings file for vscode ([fd70189](https://github.com/raccoonaihq/raccoonai-python/commit/fd70189a623ca46cf2137b6d77e6bde5c21f5cb5))
41
+ * **readme:** fix version rendering on pypi ([c06b9e9](https://github.com/raccoonaihq/raccoonai-python/commit/c06b9e905696a5d15f97088c59f20499b91c7926))
42
+ * **readme:** update badges ([6152d97](https://github.com/raccoonaihq/raccoonai-python/commit/6152d9729ea7bec51e2fac8c04c74b8312f86d88))
43
+ * **tests:** skip some failing tests on the latest python versions ([e508628](https://github.com/raccoonaihq/raccoonai-python/commit/e508628735120437dc1d92e1e5b3f4f34eda2a45))
44
+ * update @stainless-api/prism-cli to v5.15.0 ([6ec9c06](https://github.com/raccoonaihq/raccoonai-python/commit/6ec9c06c7133ebdc9bb723cad5d3e92ce95e2da0))
45
+
46
+
47
+ ### Documentation
48
+
49
+ * **client:** fix httpx.Timeout documentation reference ([02eccd7](https://github.com/raccoonaihq/raccoonai-python/commit/02eccd75aa5c06a17d8097112d326fbc2de46d94))
50
+
3
51
  ## 0.1.0-alpha.18 (2025-06-17)
4
52
 
5
53
  Full Changelog: [v0.1.0-alpha.17...v0.1.0-alpha.18](https://github.com/raccoonaihq/raccoonai-python/compare/v0.1.0-alpha.17...v0.1.0-alpha.18)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: raccoonai
3
- Version: 0.1.0a18
3
+ Version: 0.1.0a19
4
4
  Summary: The official Python library for the raccoonAI API
5
5
  Project-URL: Homepage, https://github.com/raccoonaihq/raccoonai-python
6
6
  Project-URL: Repository, https://github.com/raccoonaihq/raccoonai-python
@@ -18,6 +18,7 @@ Classifier: Programming Language :: Python :: 3.9
18
18
  Classifier: Programming Language :: Python :: 3.10
19
19
  Classifier: Programming Language :: Python :: 3.11
20
20
  Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Programming Language :: Python :: 3.13
21
22
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
22
23
  Classifier: Typing :: Typed
23
24
  Requires-Python: >=3.8
@@ -27,11 +28,15 @@ Requires-Dist: httpx<1,>=0.23.0
27
28
  Requires-Dist: pydantic<3,>=1.9.0
28
29
  Requires-Dist: sniffio
29
30
  Requires-Dist: typing-extensions<5,>=4.10
31
+ Provides-Extra: aiohttp
32
+ Requires-Dist: aiohttp; extra == 'aiohttp'
33
+ Requires-Dist: httpx-aiohttp>=0.1.9; extra == 'aiohttp'
30
34
  Description-Content-Type: text/markdown
31
35
 
32
36
  # Raccoon AI Python API library
33
37
 
34
- [![PyPI version](https://img.shields.io/pypi/v/raccoonai.svg)](https://pypi.org/project/raccoonai/)
38
+ <!-- prettier-ignore -->
39
+ [![PyPI version](https://img.shields.io/pypi/v/raccoonai.svg?label=pypi%20(stable))](https://pypi.org/project/raccoonai/)
35
40
 
36
41
  The Raccoon AI Python library provides convenient access to the Raccoon AI REST API from any Python 3.8+
37
42
  application. The library includes type definitions for all request params and response fields,
@@ -105,6 +110,40 @@ asyncio.run(main())
105
110
 
106
111
  Functionality between the synchronous and asynchronous clients is otherwise identical.
107
112
 
113
+ ### With aiohttp
114
+
115
+ By default, the async client uses `httpx` for HTTP requests. However, for improved concurrency performance you may also use `aiohttp` as the HTTP backend.
116
+
117
+ You can enable this by installing `aiohttp`:
118
+
119
+ ```sh
120
+ # install from PyPI
121
+ pip install --pre raccoonai[aiohttp]
122
+ ```
123
+
124
+ Then you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`:
125
+
126
+ ```python
127
+ import asyncio
128
+ from raccoonai import DefaultAioHttpClient
129
+ from raccoonai import AsyncRaccoonAI
130
+
131
+
132
+ async def main() -> None:
133
+ async with AsyncRaccoonAI(
134
+ secret_key="My Secret Key",
135
+ http_client=DefaultAioHttpClient(),
136
+ ) as client:
137
+ response = await client.lam.run(
138
+ query="Find YCombinator startups who got funded in W24.",
139
+ raccoon_passcode="<end-user-raccoon-passcode>",
140
+ )
141
+ print(response.data)
142
+
143
+
144
+ asyncio.run(main())
145
+ ```
146
+
108
147
  ## Streaming responses
109
148
 
110
149
  We provide support for streaming responses using Server Side Events (SSE).
@@ -262,7 +301,7 @@ client.with_options(max_retries=5).lam.run(
262
301
  ### Timeouts
263
302
 
264
303
  By default requests time out after 10 minutes. You can configure this with a `timeout` option,
265
- which accepts a float or an [`httpx.Timeout`](https://www.python-httpx.org/advanced/#fine-tuning-the-configuration) object:
304
+ which accepts a float or an [`httpx.Timeout`](https://www.python-httpx.org/advanced/timeouts/#fine-tuning-the-configuration) object:
266
305
 
267
306
  ```python
268
307
  from raccoonai import RaccoonAI
@@ -1,6 +1,7 @@
1
1
  # Raccoon AI Python API library
2
2
 
3
- [![PyPI version](https://img.shields.io/pypi/v/raccoonai.svg)](https://pypi.org/project/raccoonai/)
3
+ <!-- prettier-ignore -->
4
+ [![PyPI version](https://img.shields.io/pypi/v/raccoonai.svg?label=pypi%20(stable))](https://pypi.org/project/raccoonai/)
4
5
 
5
6
  The Raccoon AI Python library provides convenient access to the Raccoon AI REST API from any Python 3.8+
6
7
  application. The library includes type definitions for all request params and response fields,
@@ -74,6 +75,40 @@ asyncio.run(main())
74
75
 
75
76
  Functionality between the synchronous and asynchronous clients is otherwise identical.
76
77
 
78
+ ### With aiohttp
79
+
80
+ By default, the async client uses `httpx` for HTTP requests. However, for improved concurrency performance you may also use `aiohttp` as the HTTP backend.
81
+
82
+ You can enable this by installing `aiohttp`:
83
+
84
+ ```sh
85
+ # install from PyPI
86
+ pip install --pre raccoonai[aiohttp]
87
+ ```
88
+
89
+ Then you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`:
90
+
91
+ ```python
92
+ import asyncio
93
+ from raccoonai import DefaultAioHttpClient
94
+ from raccoonai import AsyncRaccoonAI
95
+
96
+
97
+ async def main() -> None:
98
+ async with AsyncRaccoonAI(
99
+ secret_key="My Secret Key",
100
+ http_client=DefaultAioHttpClient(),
101
+ ) as client:
102
+ response = await client.lam.run(
103
+ query="Find YCombinator startups who got funded in W24.",
104
+ raccoon_passcode="<end-user-raccoon-passcode>",
105
+ )
106
+ print(response.data)
107
+
108
+
109
+ asyncio.run(main())
110
+ ```
111
+
77
112
  ## Streaming responses
78
113
 
79
114
  We provide support for streaming responses using Server Side Events (SSE).
@@ -231,7 +266,7 @@ client.with_options(max_retries=5).lam.run(
231
266
  ### Timeouts
232
267
 
233
268
  By default requests time out after 10 minutes. You can configure this with a `timeout` option,
234
- which accepts a float or an [`httpx.Timeout`](https://www.python-httpx.org/advanced/#fine-tuning-the-configuration) object:
269
+ which accepts a float or an [`httpx.Timeout`](https://www.python-httpx.org/advanced/timeouts/#fine-tuning-the-configuration) object:
235
270
 
236
271
  ```python
237
272
  from raccoonai import RaccoonAI
@@ -3,7 +3,7 @@
3
3
  errors=()
4
4
 
5
5
  if [ -z "${PYPI_TOKEN}" ]; then
6
- errors+=("The RACCOON_AI_PYPI_TOKEN secret has not been set. Please set it in either this repository's secrets or your organization secrets.")
6
+ errors+=("The PYPI_TOKEN secret has not been set. Please set it in either this repository's secrets or your organization secrets.")
7
7
  fi
8
8
 
9
9
  lenErrors=${#errors[@]}
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "raccoonai"
3
- version = "0.1.0-alpha.18"
3
+ version = "0.1.0-alpha.19"
4
4
  description = "The official Python library for the raccoonAI API"
5
5
  dynamic = ["readme"]
6
6
  license = "Apache-2.0"
@@ -24,6 +24,7 @@ classifiers = [
24
24
  "Programming Language :: Python :: 3.10",
25
25
  "Programming Language :: Python :: 3.11",
26
26
  "Programming Language :: Python :: 3.12",
27
+ "Programming Language :: Python :: 3.13",
27
28
  "Operating System :: OS Independent",
28
29
  "Operating System :: POSIX",
29
30
  "Operating System :: MacOS",
@@ -37,6 +38,8 @@ classifiers = [
37
38
  Homepage = "https://github.com/raccoonaihq/raccoonai-python"
38
39
  Repository = "https://github.com/raccoonaihq/raccoonai-python"
39
40
 
41
+ [project.optional-dependencies]
42
+ aiohttp = ["aiohttp", "httpx_aiohttp>=0.1.9"]
40
43
 
41
44
  [tool.rye]
42
45
  managed = true
@@ -53,7 +56,6 @@ dev-dependencies = [
53
56
  "dirty-equals>=0.6.0",
54
57
  "importlib-metadata>=6.7.0",
55
58
  "rich>=13.7.1",
56
- "nest_asyncio==1.6.0",
57
59
  "pytest-xdist>=3.6.1",
58
60
  ]
59
61
 
@@ -145,6 +147,7 @@ exclude = [
145
147
  "_dev",
146
148
  ".venv",
147
149
  ".nox",
150
+ ".git",
148
151
  ]
149
152
 
150
153
  reportImplicitOverride = true
@@ -153,10 +156,62 @@ reportOverlappingOverload = false
153
156
  reportImportCycles = false
154
157
  reportPrivateUsage = false
155
158
 
159
+ [tool.mypy]
160
+ pretty = true
161
+ show_error_codes = true
162
+
163
+ # Exclude _files.py because mypy isn't smart enough to apply
164
+ # the correct type narrowing and as this is an internal module
165
+ # it's fine to just use Pyright.
166
+ #
167
+ # We also exclude our `tests` as mypy doesn't always infer
168
+ # types correctly and Pyright will still catch any type errors.
169
+ exclude = ['src/raccoonai/_files.py', '_dev/.*.py', 'tests/.*']
170
+
171
+ strict_equality = true
172
+ implicit_reexport = true
173
+ check_untyped_defs = true
174
+ no_implicit_optional = true
175
+
176
+ warn_return_any = true
177
+ warn_unreachable = true
178
+ warn_unused_configs = true
179
+
180
+ # Turn these options off as it could cause conflicts
181
+ # with the Pyright options.
182
+ warn_unused_ignores = false
183
+ warn_redundant_casts = false
184
+
185
+ disallow_any_generics = true
186
+ disallow_untyped_defs = true
187
+ disallow_untyped_calls = true
188
+ disallow_subclassing_any = true
189
+ disallow_incomplete_defs = true
190
+ disallow_untyped_decorators = true
191
+ cache_fine_grained = true
192
+
193
+ # By default, mypy reports an error if you assign a value to the result
194
+ # of a function call that doesn't return anything. We do this in our test
195
+ # cases:
196
+ # ```
197
+ # result = ...
198
+ # assert result is None
199
+ # ```
200
+ # Changing this codegen to make mypy happy would increase complexity
201
+ # and would not be worth it.
202
+ disable_error_code = "func-returns-value,overload-cannot-match"
203
+
204
+ # https://github.com/python/mypy/issues/12162
205
+ [[tool.mypy.overrides]]
206
+ module = "black.files.*"
207
+ ignore_errors = true
208
+ ignore_missing_imports = true
209
+
210
+
156
211
  [tool.ruff]
157
212
  line-length = 120
158
213
  output-format = "grouped"
159
- target-version = "py37"
214
+ target-version = "py38"
160
215
 
161
216
  [tool.ruff.format]
162
217
  docstring-code-format = true
@@ -169,6 +224,8 @@ select = [
169
224
  "B",
170
225
  # remove unused imports
171
226
  "F401",
227
+ # check for missing future annotations
228
+ "FA102",
172
229
  # bare except statements
173
230
  "E722",
174
231
  # unused arguments
@@ -191,6 +248,8 @@ unfixable = [
191
248
  "T203",
192
249
  ]
193
250
 
251
+ extend-safe-fixes = ["FA102"]
252
+
194
253
  [tool.ruff.lint.flake8-tidy-imports.banned-api]
195
254
  "functools.lru_cache".msg = "This function does not retain type information for the wrapped function's arguments; The `lru_cache` function from `_utils` should be used instead"
196
255
 
@@ -10,6 +10,13 @@
10
10
  # universal: false
11
11
 
12
12
  -e file:.
13
+ aiohappyeyeballs==2.6.1
14
+ # via aiohttp
15
+ aiohttp==3.12.8
16
+ # via httpx-aiohttp
17
+ # via raccoonai
18
+ aiosignal==1.3.2
19
+ # via aiohttp
13
20
  annotated-types==0.6.0
14
21
  # via pydantic
15
22
  anyio==4.4.0
@@ -17,6 +24,10 @@ anyio==4.4.0
17
24
  # via raccoonai
18
25
  argcomplete==3.1.2
19
26
  # via nox
27
+ async-timeout==5.0.1
28
+ # via aiohttp
29
+ attrs==25.3.0
30
+ # via aiohttp
20
31
  certifi==2023.7.22
21
32
  # via httpcore
22
33
  # via httpx
@@ -34,16 +45,23 @@ execnet==2.1.1
34
45
  # via pytest-xdist
35
46
  filelock==3.12.4
36
47
  # via virtualenv
37
- h11==0.14.0
48
+ frozenlist==1.6.2
49
+ # via aiohttp
50
+ # via aiosignal
51
+ h11==0.16.0
38
52
  # via httpcore
39
- httpcore==1.0.2
53
+ httpcore==1.0.9
40
54
  # via httpx
41
55
  httpx==0.28.1
56
+ # via httpx-aiohttp
42
57
  # via raccoonai
43
58
  # via respx
59
+ httpx-aiohttp==0.1.9
60
+ # via raccoonai
44
61
  idna==3.4
45
62
  # via anyio
46
63
  # via httpx
64
+ # via yarl
47
65
  importlib-metadata==7.0.0
48
66
  iniconfig==2.0.0
49
67
  # via pytest
@@ -51,10 +69,12 @@ markdown-it-py==3.0.0
51
69
  # via rich
52
70
  mdurl==0.1.2
53
71
  # via markdown-it-py
72
+ multidict==6.4.4
73
+ # via aiohttp
74
+ # via yarl
54
75
  mypy==1.14.1
55
76
  mypy-extensions==1.0.0
56
77
  # via mypy
57
- nest-asyncio==1.6.0
58
78
  nodeenv==1.8.0
59
79
  # via pyright
60
80
  nox==2023.4.22
@@ -65,9 +85,12 @@ platformdirs==3.11.0
65
85
  # via virtualenv
66
86
  pluggy==1.5.0
67
87
  # via pytest
68
- pydantic==2.10.3
88
+ propcache==0.3.1
89
+ # via aiohttp
90
+ # via yarl
91
+ pydantic==2.11.9
69
92
  # via raccoonai
70
- pydantic-core==2.27.1
93
+ pydantic-core==2.33.2
71
94
  # via pydantic
72
95
  pygments==2.18.0
73
96
  # via rich
@@ -97,12 +120,18 @@ tomli==2.0.2
97
120
  # via pytest
98
121
  typing-extensions==4.12.2
99
122
  # via anyio
123
+ # via multidict
100
124
  # via mypy
101
125
  # via pydantic
102
126
  # via pydantic-core
103
127
  # via pyright
104
128
  # via raccoonai
129
+ # via typing-inspection
130
+ typing-inspection==0.4.1
131
+ # via pydantic
105
132
  virtualenv==20.24.5
106
133
  # via nox
134
+ yarl==1.20.0
135
+ # via aiohttp
107
136
  zipp==3.17.0
108
137
  # via importlib-metadata
@@ -10,11 +10,22 @@
10
10
  # universal: false
11
11
 
12
12
  -e file:.
13
+ aiohappyeyeballs==2.6.1
14
+ # via aiohttp
15
+ aiohttp==3.12.8
16
+ # via httpx-aiohttp
17
+ # via raccoonai
18
+ aiosignal==1.3.2
19
+ # via aiohttp
13
20
  annotated-types==0.6.0
14
21
  # via pydantic
15
22
  anyio==4.4.0
16
23
  # via httpx
17
24
  # via raccoonai
25
+ async-timeout==5.0.1
26
+ # via aiohttp
27
+ attrs==25.3.0
28
+ # via aiohttp
18
29
  certifi==2023.7.22
19
30
  # via httpcore
20
31
  # via httpx
@@ -22,24 +33,43 @@ distro==1.8.0
22
33
  # via raccoonai
23
34
  exceptiongroup==1.2.2
24
35
  # via anyio
25
- h11==0.14.0
36
+ frozenlist==1.6.2
37
+ # via aiohttp
38
+ # via aiosignal
39
+ h11==0.16.0
26
40
  # via httpcore
27
- httpcore==1.0.2
41
+ httpcore==1.0.9
28
42
  # via httpx
29
43
  httpx==0.28.1
44
+ # via httpx-aiohttp
45
+ # via raccoonai
46
+ httpx-aiohttp==0.1.9
30
47
  # via raccoonai
31
48
  idna==3.4
32
49
  # via anyio
33
50
  # via httpx
34
- pydantic==2.10.3
51
+ # via yarl
52
+ multidict==6.4.4
53
+ # via aiohttp
54
+ # via yarl
55
+ propcache==0.3.1
56
+ # via aiohttp
57
+ # via yarl
58
+ pydantic==2.11.9
35
59
  # via raccoonai
36
- pydantic-core==2.27.1
60
+ pydantic-core==2.33.2
37
61
  # via pydantic
38
62
  sniffio==1.3.0
39
63
  # via anyio
40
64
  # via raccoonai
41
65
  typing-extensions==4.12.2
42
66
  # via anyio
67
+ # via multidict
43
68
  # via pydantic
44
69
  # via pydantic-core
45
70
  # via raccoonai
71
+ # via typing-inspection
72
+ typing-inspection==0.4.1
73
+ # via pydantic
74
+ yarl==1.20.0
75
+ # via aiohttp
@@ -3,7 +3,7 @@
3
3
  import typing as _t
4
4
 
5
5
  from . import types
6
- from ._types import NOT_GIVEN, Omit, NoneType, NotGiven, Transport, ProxiesTypes
6
+ from ._types import NOT_GIVEN, Omit, NoneType, NotGiven, Transport, ProxiesTypes, omit, not_given
7
7
  from ._utils import file_from_path
8
8
  from ._client import (
9
9
  ENVIRONMENTS,
@@ -37,7 +37,7 @@ from ._exceptions import (
37
37
  UnprocessableEntityError,
38
38
  APIResponseValidationError,
39
39
  )
40
- from ._base_client import DefaultHttpxClient, DefaultAsyncHttpxClient
40
+ from ._base_client import DefaultHttpxClient, DefaultAioHttpClient, DefaultAsyncHttpxClient
41
41
  from ._utils._logs import setup_logging as _setup_logging
42
42
 
43
43
  __all__ = [
@@ -49,7 +49,9 @@ __all__ = [
49
49
  "ProxiesTypes",
50
50
  "NotGiven",
51
51
  "NOT_GIVEN",
52
+ "not_given",
52
53
  "Omit",
54
+ "omit",
53
55
  "RaccoonAIError",
54
56
  "APIError",
55
57
  "APIStatusError",
@@ -80,6 +82,7 @@ __all__ = [
80
82
  "DEFAULT_CONNECTION_LIMITS",
81
83
  "DefaultHttpxClient",
82
84
  "DefaultAsyncHttpxClient",
85
+ "DefaultAioHttpClient",
83
86
  ]
84
87
 
85
88
  if not _t.TYPE_CHECKING: