supermemory 3.0.0a2__tar.gz → 3.0.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 (83) hide show
  1. supermemory-3.0.0a19/.release-please-manifest.json +3 -0
  2. {supermemory-3.0.0a2 → supermemory-3.0.0a19}/CHANGELOG.md +8 -0
  3. {supermemory-3.0.0a2 → supermemory-3.0.0a19}/PKG-INFO +18 -1
  4. {supermemory-3.0.0a2 → supermemory-3.0.0a19}/README.md +17 -0
  5. {supermemory-3.0.0a2 → supermemory-3.0.0a19}/api.md +7 -1
  6. {supermemory-3.0.0a2 → supermemory-3.0.0a19}/pyproject.toml +1 -1
  7. {supermemory-3.0.0a2 → supermemory-3.0.0a19}/src/supermemory/_files.py +1 -1
  8. {supermemory-3.0.0a2 → supermemory-3.0.0a19}/src/supermemory/_version.py +1 -1
  9. {supermemory-3.0.0a2 → supermemory-3.0.0a19}/src/supermemory/resources/memories.py +95 -4
  10. {supermemory-3.0.0a2 → supermemory-3.0.0a19}/src/supermemory/types/__init__.py +2 -0
  11. supermemory-3.0.0a19/src/supermemory/types/memory_upload_file_params.py +13 -0
  12. supermemory-3.0.0a19/src/supermemory/types/memory_upload_file_response.py +11 -0
  13. {supermemory-3.0.0a2 → supermemory-3.0.0a19}/tests/api_resources/test_memories.py +69 -0
  14. supermemory-3.0.0a2/.release-please-manifest.json +0 -3
  15. {supermemory-3.0.0a2 → supermemory-3.0.0a19}/.gitignore +0 -0
  16. {supermemory-3.0.0a2 → supermemory-3.0.0a19}/CONTRIBUTING.md +0 -0
  17. {supermemory-3.0.0a2 → supermemory-3.0.0a19}/LICENSE +0 -0
  18. {supermemory-3.0.0a2 → supermemory-3.0.0a19}/SECURITY.md +0 -0
  19. {supermemory-3.0.0a2 → supermemory-3.0.0a19}/bin/check-release-environment +0 -0
  20. {supermemory-3.0.0a2 → supermemory-3.0.0a19}/bin/publish-pypi +0 -0
  21. {supermemory-3.0.0a2 → supermemory-3.0.0a19}/examples/.keep +0 -0
  22. {supermemory-3.0.0a2 → supermemory-3.0.0a19}/mypy.ini +0 -0
  23. {supermemory-3.0.0a2 → supermemory-3.0.0a19}/noxfile.py +0 -0
  24. {supermemory-3.0.0a2 → supermemory-3.0.0a19}/release-please-config.json +0 -0
  25. {supermemory-3.0.0a2 → supermemory-3.0.0a19}/requirements-dev.lock +0 -0
  26. {supermemory-3.0.0a2 → supermemory-3.0.0a19}/requirements.lock +0 -0
  27. {supermemory-3.0.0a2 → supermemory-3.0.0a19}/src/supermemory/__init__.py +0 -0
  28. {supermemory-3.0.0a2 → supermemory-3.0.0a19}/src/supermemory/_base_client.py +0 -0
  29. {supermemory-3.0.0a2 → supermemory-3.0.0a19}/src/supermemory/_client.py +0 -0
  30. {supermemory-3.0.0a2 → supermemory-3.0.0a19}/src/supermemory/_compat.py +0 -0
  31. {supermemory-3.0.0a2 → supermemory-3.0.0a19}/src/supermemory/_constants.py +0 -0
  32. {supermemory-3.0.0a2 → supermemory-3.0.0a19}/src/supermemory/_exceptions.py +0 -0
  33. {supermemory-3.0.0a2 → supermemory-3.0.0a19}/src/supermemory/_models.py +0 -0
  34. {supermemory-3.0.0a2 → supermemory-3.0.0a19}/src/supermemory/_qs.py +0 -0
  35. {supermemory-3.0.0a2 → supermemory-3.0.0a19}/src/supermemory/_resource.py +0 -0
  36. {supermemory-3.0.0a2 → supermemory-3.0.0a19}/src/supermemory/_response.py +0 -0
  37. {supermemory-3.0.0a2 → supermemory-3.0.0a19}/src/supermemory/_streaming.py +0 -0
  38. {supermemory-3.0.0a2 → supermemory-3.0.0a19}/src/supermemory/_types.py +0 -0
  39. {supermemory-3.0.0a2 → supermemory-3.0.0a19}/src/supermemory/_utils/__init__.py +0 -0
  40. {supermemory-3.0.0a2 → supermemory-3.0.0a19}/src/supermemory/_utils/_logs.py +0 -0
  41. {supermemory-3.0.0a2 → supermemory-3.0.0a19}/src/supermemory/_utils/_proxy.py +0 -0
  42. {supermemory-3.0.0a2 → supermemory-3.0.0a19}/src/supermemory/_utils/_reflection.py +0 -0
  43. {supermemory-3.0.0a2 → supermemory-3.0.0a19}/src/supermemory/_utils/_resources_proxy.py +0 -0
  44. {supermemory-3.0.0a2 → supermemory-3.0.0a19}/src/supermemory/_utils/_streams.py +0 -0
  45. {supermemory-3.0.0a2 → supermemory-3.0.0a19}/src/supermemory/_utils/_sync.py +0 -0
  46. {supermemory-3.0.0a2 → supermemory-3.0.0a19}/src/supermemory/_utils/_transform.py +0 -0
  47. {supermemory-3.0.0a2 → supermemory-3.0.0a19}/src/supermemory/_utils/_typing.py +0 -0
  48. {supermemory-3.0.0a2 → supermemory-3.0.0a19}/src/supermemory/_utils/_utils.py +0 -0
  49. {supermemory-3.0.0a2 → supermemory-3.0.0a19}/src/supermemory/lib/.keep +0 -0
  50. {supermemory-3.0.0a2 → supermemory-3.0.0a19}/src/supermemory/py.typed +0 -0
  51. {supermemory-3.0.0a2 → supermemory-3.0.0a19}/src/supermemory/resources/__init__.py +0 -0
  52. {supermemory-3.0.0a2 → supermemory-3.0.0a19}/src/supermemory/resources/connections.py +0 -0
  53. {supermemory-3.0.0a2 → supermemory-3.0.0a19}/src/supermemory/resources/settings.py +0 -0
  54. {supermemory-3.0.0a2 → supermemory-3.0.0a19}/src/supermemory/types/connection_create_params.py +0 -0
  55. {supermemory-3.0.0a2 → supermemory-3.0.0a19}/src/supermemory/types/connection_create_response.py +0 -0
  56. {supermemory-3.0.0a2 → supermemory-3.0.0a19}/src/supermemory/types/connection_get_response.py +0 -0
  57. {supermemory-3.0.0a2 → supermemory-3.0.0a19}/src/supermemory/types/memory_add_params.py +0 -0
  58. {supermemory-3.0.0a2 → supermemory-3.0.0a19}/src/supermemory/types/memory_add_response.py +0 -0
  59. {supermemory-3.0.0a2 → supermemory-3.0.0a19}/src/supermemory/types/memory_get_response.py +0 -0
  60. {supermemory-3.0.0a2 → supermemory-3.0.0a19}/src/supermemory/types/memory_update_params.py +0 -0
  61. {supermemory-3.0.0a2 → supermemory-3.0.0a19}/src/supermemory/types/memory_update_response.py +0 -0
  62. {supermemory-3.0.0a2 → supermemory-3.0.0a19}/src/supermemory/types/setting_get_response.py +0 -0
  63. {supermemory-3.0.0a2 → supermemory-3.0.0a19}/src/supermemory/types/setting_update_params.py +0 -0
  64. {supermemory-3.0.0a2 → supermemory-3.0.0a19}/src/supermemory/types/setting_update_response.py +0 -0
  65. {supermemory-3.0.0a2 → supermemory-3.0.0a19}/tests/__init__.py +0 -0
  66. {supermemory-3.0.0a2 → supermemory-3.0.0a19}/tests/api_resources/__init__.py +0 -0
  67. {supermemory-3.0.0a2 → supermemory-3.0.0a19}/tests/api_resources/test_connections.py +0 -0
  68. {supermemory-3.0.0a2 → supermemory-3.0.0a19}/tests/api_resources/test_settings.py +0 -0
  69. {supermemory-3.0.0a2 → supermemory-3.0.0a19}/tests/conftest.py +0 -0
  70. {supermemory-3.0.0a2 → supermemory-3.0.0a19}/tests/sample_file.txt +0 -0
  71. {supermemory-3.0.0a2 → supermemory-3.0.0a19}/tests/test_client.py +0 -0
  72. {supermemory-3.0.0a2 → supermemory-3.0.0a19}/tests/test_deepcopy.py +0 -0
  73. {supermemory-3.0.0a2 → supermemory-3.0.0a19}/tests/test_extract_files.py +0 -0
  74. {supermemory-3.0.0a2 → supermemory-3.0.0a19}/tests/test_files.py +0 -0
  75. {supermemory-3.0.0a2 → supermemory-3.0.0a19}/tests/test_models.py +0 -0
  76. {supermemory-3.0.0a2 → supermemory-3.0.0a19}/tests/test_qs.py +0 -0
  77. {supermemory-3.0.0a2 → supermemory-3.0.0a19}/tests/test_required_args.py +0 -0
  78. {supermemory-3.0.0a2 → supermemory-3.0.0a19}/tests/test_response.py +0 -0
  79. {supermemory-3.0.0a2 → supermemory-3.0.0a19}/tests/test_streaming.py +0 -0
  80. {supermemory-3.0.0a2 → supermemory-3.0.0a19}/tests/test_transform.py +0 -0
  81. {supermemory-3.0.0a2 → supermemory-3.0.0a19}/tests/test_utils/test_proxy.py +0 -0
  82. {supermemory-3.0.0a2 → supermemory-3.0.0a19}/tests/test_utils/test_typing.py +0 -0
  83. {supermemory-3.0.0a2 → supermemory-3.0.0a19}/tests/utils.py +0 -0
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "3.0.0-alpha.19"
3
+ }
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 3.0.0-alpha.19 (2025-06-26)
4
+
5
+ Full Changelog: [v3.0.0-alpha.2...v3.0.0-alpha.19](https://github.com/supermemoryai/python-sdk/compare/v3.0.0-alpha.2...v3.0.0-alpha.19)
6
+
7
+ ### Features
8
+
9
+ * **api:** api update ([10e12a2](https://github.com/supermemoryai/python-sdk/commit/10e12a2f0453c3e5a2eaeee86a3da9738c161e50))
10
+
3
11
  ## 3.0.0-alpha.2 (2025-06-24)
4
12
 
5
13
  Full Changelog: [v3.0.0-alpha.1...v3.0.0-alpha.2](https://github.com/supermemoryai/python-sdk/compare/v3.0.0-alpha.1...v3.0.0-alpha.2)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: supermemory
3
- Version: 3.0.0a2
3
+ Version: 3.0.0a19
4
4
  Summary: The official Python library for the supermemory API
5
5
  Project-URL: Homepage, https://github.com/supermemoryai/python-sdk
6
6
  Project-URL: Repository, https://github.com/supermemoryai/python-sdk
@@ -145,6 +145,23 @@ Nested request parameters are [TypedDicts](https://docs.python.org/3/library/typ
145
145
 
146
146
  Typed requests and responses provide autocomplete and documentation within your editor. If you would like to see type errors in VS Code to help catch bugs earlier, set `python.analysis.typeCheckingMode` to `basic`.
147
147
 
148
+ ## File uploads
149
+
150
+ Request parameters that correspond to file uploads can be passed as `bytes`, or a [`PathLike`](https://docs.python.org/3/library/os.html#os.PathLike) instance or a tuple of `(filename, contents, media type)`.
151
+
152
+ ```python
153
+ from pathlib import Path
154
+ from supermemory import Supermemory
155
+
156
+ client = Supermemory()
157
+
158
+ client.memories.upload_file(
159
+ file=Path("/path/to/file"),
160
+ )
161
+ ```
162
+
163
+ The async client uses the exact same interface. If you pass a [`PathLike`](https://docs.python.org/3/library/os.html#os.PathLike) instance, the file contents will be read asynchronously automatically.
164
+
148
165
  ## Handling errors
149
166
 
150
167
  When the library is unable to connect to the API (for example, due to network connection problems or a timeout), a subclass of `supermemory.APIConnectionError` is raised.
@@ -111,6 +111,23 @@ Nested request parameters are [TypedDicts](https://docs.python.org/3/library/typ
111
111
 
112
112
  Typed requests and responses provide autocomplete and documentation within your editor. If you would like to see type errors in VS Code to help catch bugs earlier, set `python.analysis.typeCheckingMode` to `basic`.
113
113
 
114
+ ## File uploads
115
+
116
+ Request parameters that correspond to file uploads can be passed as `bytes`, or a [`PathLike`](https://docs.python.org/3/library/os.html#os.PathLike) instance or a tuple of `(filename, contents, media type)`.
117
+
118
+ ```python
119
+ from pathlib import Path
120
+ from supermemory import Supermemory
121
+
122
+ client = Supermemory()
123
+
124
+ client.memories.upload_file(
125
+ file=Path("/path/to/file"),
126
+ )
127
+ ```
128
+
129
+ The async client uses the exact same interface. If you pass a [`PathLike`](https://docs.python.org/3/library/os.html#os.PathLike) instance, the file contents will be read asynchronously automatically.
130
+
114
131
  ## Handling errors
115
132
 
116
133
  When the library is unable to connect to the API (for example, due to network connection problems or a timeout), a subclass of `supermemory.APIConnectionError` is raised.
@@ -3,7 +3,12 @@
3
3
  Types:
4
4
 
5
5
  ```python
6
- from supermemory.types import MemoryUpdateResponse, MemoryAddResponse, MemoryGetResponse
6
+ from supermemory.types import (
7
+ MemoryUpdateResponse,
8
+ MemoryAddResponse,
9
+ MemoryGetResponse,
10
+ MemoryUploadFileResponse,
11
+ )
7
12
  ```
8
13
 
9
14
  Methods:
@@ -12,6 +17,7 @@ Methods:
12
17
  - <code title="delete /v3/memories/{id}">client.memories.<a href="./src/supermemory/resources/memories.py">delete</a>(id) -> None</code>
13
18
  - <code title="post /v3/memories">client.memories.<a href="./src/supermemory/resources/memories.py">add</a>(\*\*<a href="src/supermemory/types/memory_add_params.py">params</a>) -> <a href="./src/supermemory/types/memory_add_response.py">MemoryAddResponse</a></code>
14
19
  - <code title="get /v3/memories/{id}">client.memories.<a href="./src/supermemory/resources/memories.py">get</a>(id) -> <a href="./src/supermemory/types/memory_get_response.py">MemoryGetResponse</a></code>
20
+ - <code title="post /v3/memories/file">client.memories.<a href="./src/supermemory/resources/memories.py">upload_file</a>(\*\*<a href="src/supermemory/types/memory_upload_file_params.py">params</a>) -> <a href="./src/supermemory/types/memory_upload_file_response.py">MemoryUploadFileResponse</a></code>
15
21
 
16
22
  # Settings
17
23
 
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "supermemory"
3
- version = "3.0.0-alpha.2"
3
+ version = "3.0.0-alpha.19"
4
4
  description = "The official Python library for the supermemory API"
5
5
  dynamic = ["readme"]
6
6
  license = "Apache-2.0"
@@ -34,7 +34,7 @@ def assert_is_file_content(obj: object, *, key: str | None = None) -> None:
34
34
  if not is_file_content(obj):
35
35
  prefix = f"Expected entry at `{key}`" if key is not None else f"Expected file input `{obj!r}`"
36
36
  raise RuntimeError(
37
- f"{prefix} to be bytes, an io.IOBase instance, PathLike or a tuple but received {type(obj)} instead."
37
+ f"{prefix} to be bytes, an io.IOBase instance, PathLike or a tuple but received {type(obj)} instead. See https://github.com/supermemoryai/python-sdk/tree/main#file-uploads"
38
38
  ) from None
39
39
 
40
40
 
@@ -1,4 +1,4 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  __title__ = "supermemory"
4
- __version__ = "3.0.0-alpha.2" # x-release-please-version
4
+ __version__ = "3.0.0-alpha.19" # x-release-please-version
@@ -2,13 +2,13 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
- from typing import Dict, List, Union
5
+ from typing import Dict, List, Union, Mapping, cast
6
6
 
7
7
  import httpx
8
8
 
9
- from ..types import memory_add_params, memory_update_params
10
- from .._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven
11
- from .._utils import maybe_transform, async_maybe_transform
9
+ from ..types import memory_add_params, memory_update_params, memory_upload_file_params
10
+ from .._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven, FileTypes
11
+ from .._utils import extract_files, maybe_transform, deepcopy_minimal, async_maybe_transform
12
12
  from .._compat import cached_property
13
13
  from .._resource import SyncAPIResource, AsyncAPIResource
14
14
  from .._response import (
@@ -21,6 +21,7 @@ from .._base_client import make_request_options
21
21
  from ..types.memory_add_response import MemoryAddResponse
22
22
  from ..types.memory_get_response import MemoryGetResponse
23
23
  from ..types.memory_update_response import MemoryUpdateResponse
24
+ from ..types.memory_upload_file_response import MemoryUploadFileResponse
24
25
 
25
26
  __all__ = ["MemoriesResource", "AsyncMemoriesResource"]
26
27
 
@@ -243,6 +244,45 @@ class MemoriesResource(SyncAPIResource):
243
244
  cast_to=MemoryGetResponse,
244
245
  )
245
246
 
247
+ def upload_file(
248
+ self,
249
+ *,
250
+ file: FileTypes,
251
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
252
+ # The extra values given here take precedence over values defined on the client or passed to this method.
253
+ extra_headers: Headers | None = None,
254
+ extra_query: Query | None = None,
255
+ extra_body: Body | None = None,
256
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
257
+ ) -> MemoryUploadFileResponse:
258
+ """
259
+ Upload a file to be processed
260
+
261
+ Args:
262
+ extra_headers: Send extra headers
263
+
264
+ extra_query: Add additional query parameters to the request
265
+
266
+ extra_body: Add additional JSON properties to the request
267
+
268
+ timeout: Override the client-level default timeout for this request, in seconds
269
+ """
270
+ body = deepcopy_minimal({"file": file})
271
+ files = extract_files(cast(Mapping[str, object], body), paths=[["file"]])
272
+ # It should be noted that the actual Content-Type header that will be
273
+ # sent to the server will contain a `boundary` parameter, e.g.
274
+ # multipart/form-data; boundary=---abc--
275
+ extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})}
276
+ return self._post(
277
+ "/v3/memories/file",
278
+ body=maybe_transform(body, memory_upload_file_params.MemoryUploadFileParams),
279
+ files=files,
280
+ options=make_request_options(
281
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
282
+ ),
283
+ cast_to=MemoryUploadFileResponse,
284
+ )
285
+
246
286
 
247
287
  class AsyncMemoriesResource(AsyncAPIResource):
248
288
  @cached_property
@@ -462,6 +502,45 @@ class AsyncMemoriesResource(AsyncAPIResource):
462
502
  cast_to=MemoryGetResponse,
463
503
  )
464
504
 
505
+ async def upload_file(
506
+ self,
507
+ *,
508
+ file: FileTypes,
509
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
510
+ # The extra values given here take precedence over values defined on the client or passed to this method.
511
+ extra_headers: Headers | None = None,
512
+ extra_query: Query | None = None,
513
+ extra_body: Body | None = None,
514
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
515
+ ) -> MemoryUploadFileResponse:
516
+ """
517
+ Upload a file to be processed
518
+
519
+ Args:
520
+ extra_headers: Send extra headers
521
+
522
+ extra_query: Add additional query parameters to the request
523
+
524
+ extra_body: Add additional JSON properties to the request
525
+
526
+ timeout: Override the client-level default timeout for this request, in seconds
527
+ """
528
+ body = deepcopy_minimal({"file": file})
529
+ files = extract_files(cast(Mapping[str, object], body), paths=[["file"]])
530
+ # It should be noted that the actual Content-Type header that will be
531
+ # sent to the server will contain a `boundary` parameter, e.g.
532
+ # multipart/form-data; boundary=---abc--
533
+ extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})}
534
+ return await self._post(
535
+ "/v3/memories/file",
536
+ body=await async_maybe_transform(body, memory_upload_file_params.MemoryUploadFileParams),
537
+ files=files,
538
+ options=make_request_options(
539
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
540
+ ),
541
+ cast_to=MemoryUploadFileResponse,
542
+ )
543
+
465
544
 
466
545
  class MemoriesResourceWithRawResponse:
467
546
  def __init__(self, memories: MemoriesResource) -> None:
@@ -479,6 +558,9 @@ class MemoriesResourceWithRawResponse:
479
558
  self.get = to_raw_response_wrapper(
480
559
  memories.get,
481
560
  )
561
+ self.upload_file = to_raw_response_wrapper(
562
+ memories.upload_file,
563
+ )
482
564
 
483
565
 
484
566
  class AsyncMemoriesResourceWithRawResponse:
@@ -497,6 +579,9 @@ class AsyncMemoriesResourceWithRawResponse:
497
579
  self.get = async_to_raw_response_wrapper(
498
580
  memories.get,
499
581
  )
582
+ self.upload_file = async_to_raw_response_wrapper(
583
+ memories.upload_file,
584
+ )
500
585
 
501
586
 
502
587
  class MemoriesResourceWithStreamingResponse:
@@ -515,6 +600,9 @@ class MemoriesResourceWithStreamingResponse:
515
600
  self.get = to_streamed_response_wrapper(
516
601
  memories.get,
517
602
  )
603
+ self.upload_file = to_streamed_response_wrapper(
604
+ memories.upload_file,
605
+ )
518
606
 
519
607
 
520
608
  class AsyncMemoriesResourceWithStreamingResponse:
@@ -533,3 +621,6 @@ class AsyncMemoriesResourceWithStreamingResponse:
533
621
  self.get = async_to_streamed_response_wrapper(
534
622
  memories.get,
535
623
  )
624
+ self.upload_file = async_to_streamed_response_wrapper(
625
+ memories.upload_file,
626
+ )
@@ -12,4 +12,6 @@ from .memory_update_response import MemoryUpdateResponse as MemoryUpdateResponse
12
12
  from .connection_get_response import ConnectionGetResponse as ConnectionGetResponse
13
13
  from .setting_update_response import SettingUpdateResponse as SettingUpdateResponse
14
14
  from .connection_create_params import ConnectionCreateParams as ConnectionCreateParams
15
+ from .memory_upload_file_params import MemoryUploadFileParams as MemoryUploadFileParams
15
16
  from .connection_create_response import ConnectionCreateResponse as ConnectionCreateResponse
17
+ from .memory_upload_file_response import MemoryUploadFileResponse as MemoryUploadFileResponse
@@ -0,0 +1,13 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing_extensions import Required, TypedDict
6
+
7
+ from .._types import FileTypes
8
+
9
+ __all__ = ["MemoryUploadFileParams"]
10
+
11
+
12
+ class MemoryUploadFileParams(TypedDict, total=False):
13
+ file: Required[FileTypes]
@@ -0,0 +1,11 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from .._models import BaseModel
4
+
5
+ __all__ = ["MemoryUploadFileResponse"]
6
+
7
+
8
+ class MemoryUploadFileResponse(BaseModel):
9
+ id: str
10
+
11
+ status: str
@@ -13,6 +13,7 @@ from supermemory.types import (
13
13
  MemoryAddResponse,
14
14
  MemoryGetResponse,
15
15
  MemoryUpdateResponse,
16
+ MemoryUploadFileResponse,
16
17
  )
17
18
 
18
19
  base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
@@ -222,6 +223,40 @@ class TestMemories:
222
223
  "",
223
224
  )
224
225
 
226
+ @pytest.mark.skip()
227
+ @parametrize
228
+ def test_method_upload_file(self, client: Supermemory) -> None:
229
+ memory = client.memories.upload_file(
230
+ file=b"raw file contents",
231
+ )
232
+ assert_matches_type(MemoryUploadFileResponse, memory, path=["response"])
233
+
234
+ @pytest.mark.skip()
235
+ @parametrize
236
+ def test_raw_response_upload_file(self, client: Supermemory) -> None:
237
+ response = client.memories.with_raw_response.upload_file(
238
+ file=b"raw file contents",
239
+ )
240
+
241
+ assert response.is_closed is True
242
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
243
+ memory = response.parse()
244
+ assert_matches_type(MemoryUploadFileResponse, memory, path=["response"])
245
+
246
+ @pytest.mark.skip()
247
+ @parametrize
248
+ def test_streaming_response_upload_file(self, client: Supermemory) -> None:
249
+ with client.memories.with_streaming_response.upload_file(
250
+ file=b"raw file contents",
251
+ ) as response:
252
+ assert not response.is_closed
253
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
254
+
255
+ memory = response.parse()
256
+ assert_matches_type(MemoryUploadFileResponse, memory, path=["response"])
257
+
258
+ assert cast(Any, response.is_closed) is True
259
+
225
260
 
226
261
  class TestAsyncMemories:
227
262
  parametrize = pytest.mark.parametrize(
@@ -428,3 +463,37 @@ class TestAsyncMemories:
428
463
  await async_client.memories.with_raw_response.get(
429
464
  "",
430
465
  )
466
+
467
+ @pytest.mark.skip()
468
+ @parametrize
469
+ async def test_method_upload_file(self, async_client: AsyncSupermemory) -> None:
470
+ memory = await async_client.memories.upload_file(
471
+ file=b"raw file contents",
472
+ )
473
+ assert_matches_type(MemoryUploadFileResponse, memory, path=["response"])
474
+
475
+ @pytest.mark.skip()
476
+ @parametrize
477
+ async def test_raw_response_upload_file(self, async_client: AsyncSupermemory) -> None:
478
+ response = await async_client.memories.with_raw_response.upload_file(
479
+ file=b"raw file contents",
480
+ )
481
+
482
+ assert response.is_closed is True
483
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
484
+ memory = await response.parse()
485
+ assert_matches_type(MemoryUploadFileResponse, memory, path=["response"])
486
+
487
+ @pytest.mark.skip()
488
+ @parametrize
489
+ async def test_streaming_response_upload_file(self, async_client: AsyncSupermemory) -> None:
490
+ async with async_client.memories.with_streaming_response.upload_file(
491
+ file=b"raw file contents",
492
+ ) as response:
493
+ assert not response.is_closed
494
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
495
+
496
+ memory = await response.parse()
497
+ assert_matches_type(MemoryUploadFileResponse, memory, path=["response"])
498
+
499
+ assert cast(Any, response.is_closed) is True
@@ -1,3 +0,0 @@
1
- {
2
- ".": "3.0.0-alpha.2"
3
- }
File without changes
File without changes
File without changes
File without changes