supermemory 3.62.0__tar.gz → 5.0.0rc2__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.
- supermemory-5.0.0rc2/.github/workflows/ci.yml +70 -0
- supermemory-5.0.0rc2/.github/workflows/generate.yml +75 -0
- supermemory-5.0.0rc2/.github/workflows/publish-pypi.yml +50 -0
- supermemory-5.0.0rc2/.gitignore +10 -0
- supermemory-5.0.0rc2/.python-version +1 -0
- {supermemory-3.62.0 → supermemory-5.0.0rc2}/CHANGELOG.md +19 -0
- supermemory-5.0.0rc2/MIGRATION.md +99 -0
- supermemory-5.0.0rc2/PKG-INFO +224 -0
- supermemory-5.0.0rc2/README.md +195 -0
- supermemory-5.0.0rc2/custom/__init__.tail.py +14 -0
- supermemory-5.0.0rc2/custom/patches/0001-compat-response-and-model-helpers.patch +93 -0
- supermemory-5.0.0rc2/custom/patches/0002-resolve-recursive-forward-refs.patch +62 -0
- supermemory-5.0.0rc2/custom/patches/0003-retry-timeouts.patch +21 -0
- supermemory-5.0.0rc2/custom/supermemory/_compat.py +543 -0
- supermemory-5.0.0rc2/custom/supermemory/_types.py +19 -0
- supermemory-5.0.0rc2/examples/chat_with_memory.py +32 -0
- supermemory-5.0.0rc2/examples/errors_and_retries.py +22 -0
- supermemory-5.0.0rc2/examples/quickstart.py +21 -0
- supermemory-5.0.0rc2/fern/fern.config.json +1 -0
- supermemory-5.0.0rc2/fern/generators.yml +38 -0
- supermemory-5.0.0rc2/fern/openapi.json +8239 -0
- supermemory-5.0.0rc2/fern/overlay.yaml +43 -0
- supermemory-5.0.0rc2/fern/schemas.yaml +103 -0
- supermemory-5.0.0rc2/pyproject.toml +67 -0
- supermemory-5.0.0rc2/reference.md +2851 -0
- supermemory-5.0.0rc2/scripts/apply_custom.py +110 -0
- supermemory-5.0.0rc2/scripts/bump_version.py +30 -0
- supermemory-5.0.0rc2/scripts/generate +48 -0
- supermemory-5.0.0rc2/scripts/name_schemas.py +176 -0
- supermemory-5.0.0rc2/src/supermemory/__init__.py +721 -0
- supermemory-5.0.0rc2/src/supermemory/_compat.py +543 -0
- supermemory-5.0.0rc2/src/supermemory/_default_clients.py +30 -0
- supermemory-5.0.0rc2/src/supermemory/_types.py +19 -0
- supermemory-5.0.0rc2/src/supermemory/client.py +1000 -0
- supermemory-5.0.0rc2/src/supermemory/connectors/__init__.py +4 -0
- supermemory-5.0.0rc2/src/supermemory/connectors/client.py +814 -0
- supermemory-5.0.0rc2/src/supermemory/connectors/raw_client.py +1749 -0
- supermemory-5.0.0rc2/src/supermemory/core/__init__.py +134 -0
- supermemory-5.0.0rc2/src/supermemory/core/api_error.py +23 -0
- supermemory-5.0.0rc2/src/supermemory/core/client_wrapper.py +145 -0
- supermemory-5.0.0rc2/src/supermemory/core/datetime_utils.py +70 -0
- supermemory-5.0.0rc2/src/supermemory/core/file.py +67 -0
- supermemory-5.0.0rc2/src/supermemory/core/force_multipart.py +18 -0
- supermemory-5.0.0rc2/src/supermemory/core/http_client.py +851 -0
- supermemory-5.0.0rc2/src/supermemory/core/http_response.py +72 -0
- supermemory-5.0.0rc2/src/supermemory/core/http_sse/__init__.py +42 -0
- supermemory-5.0.0rc2/src/supermemory/core/http_sse/_api.py +455 -0
- supermemory-5.0.0rc2/src/supermemory/core/http_sse/_decoders.py +74 -0
- supermemory-5.0.0rc2/src/supermemory/core/http_sse/_exceptions.py +7 -0
- supermemory-5.0.0rc2/src/supermemory/core/http_sse/_models.py +17 -0
- supermemory-5.0.0rc2/src/supermemory/core/jsonable_encoder.py +120 -0
- supermemory-5.0.0rc2/src/supermemory/core/logging.py +107 -0
- supermemory-5.0.0rc2/src/supermemory/core/parse_error.py +36 -0
- supermemory-5.0.0rc2/src/supermemory/core/pydantic_utilities.py +508 -0
- supermemory-5.0.0rc2/src/supermemory/core/query_encoder.py +58 -0
- supermemory-5.0.0rc2/src/supermemory/core/remove_none_from_dict.py +11 -0
- supermemory-5.0.0rc2/src/supermemory/core/request_options.py +40 -0
- supermemory-5.0.0rc2/src/supermemory/core/serialization.py +383 -0
- supermemory-5.0.0rc2/src/supermemory/core/unchecked_base_model.py +539 -0
- supermemory-5.0.0rc2/src/supermemory/documents/__init__.py +4 -0
- supermemory-5.0.0rc2/src/supermemory/documents/client.py +1140 -0
- supermemory-5.0.0rc2/src/supermemory/documents/raw_client.py +2184 -0
- supermemory-5.0.0rc2/src/supermemory/environment.py +7 -0
- supermemory-5.0.0rc2/src/supermemory/errors/__init__.py +59 -0
- supermemory-5.0.0rc2/src/supermemory/errors/bad_request_error.py +11 -0
- supermemory-5.0.0rc2/src/supermemory/errors/conflict_error.py +11 -0
- supermemory-5.0.0rc2/src/supermemory/errors/forbidden_error.py +11 -0
- supermemory-5.0.0rc2/src/supermemory/errors/internal_server_error.py +11 -0
- supermemory-5.0.0rc2/src/supermemory/errors/not_found_error.py +11 -0
- supermemory-5.0.0rc2/src/supermemory/errors/payment_required_error.py +11 -0
- supermemory-5.0.0rc2/src/supermemory/errors/service_unavailable_error.py +11 -0
- supermemory-5.0.0rc2/src/supermemory/errors/unauthorized_error.py +11 -0
- supermemory-5.0.0rc2/src/supermemory/memories/__init__.py +4 -0
- supermemory-5.0.0rc2/src/supermemory/memories/client.py +257 -0
- supermemory-5.0.0rc2/src/supermemory/memories/raw_client.py +467 -0
- supermemory-5.0.0rc2/src/supermemory/namespaces/__init__.py +4 -0
- supermemory-5.0.0rc2/src/supermemory/namespaces/client.py +409 -0
- supermemory-5.0.0rc2/src/supermemory/namespaces/raw_client.py +895 -0
- supermemory-5.0.0rc2/src/supermemory/organization/__init__.py +4 -0
- supermemory-5.0.0rc2/src/supermemory/organization/client.py +211 -0
- supermemory-5.0.0rc2/src/supermemory/organization/raw_client.py +396 -0
- supermemory-5.0.0rc2/src/supermemory/profiles/__init__.py +4 -0
- supermemory-5.0.0rc2/src/supermemory/profiles/client.py +331 -0
- supermemory-5.0.0rc2/src/supermemory/profiles/raw_client.py +713 -0
- supermemory-5.0.0rc2/src/supermemory/raw_client.py +1203 -0
- supermemory-5.0.0rc2/src/supermemory/requests/__init__.py +317 -0
- supermemory-5.0.0rc2/src/supermemory/requests/bad_request_error_body.py +8 -0
- supermemory-5.0.0rc2/src/supermemory/requests/batch_add_item_result.py +30 -0
- supermemory-5.0.0rc2/src/supermemory/requests/batch_add_result.py +23 -0
- supermemory-5.0.0rc2/src/supermemory/requests/chunk.py +42 -0
- supermemory-5.0.0rc2/src/supermemory/requests/chunk_list_item.py +44 -0
- supermemory-5.0.0rc2/src/supermemory/requests/chunk_system.py +17 -0
- supermemory-5.0.0rc2/src/supermemory/requests/connector.py +84 -0
- supermemory-5.0.0rc2/src/supermemory/requests/connector_capabilities.py +15 -0
- supermemory-5.0.0rc2/src/supermemory/requests/connector_config_value.py +5 -0
- supermemory-5.0.0rc2/src/supermemory/requests/connector_deleted.py +10 -0
- supermemory-5.0.0rc2/src/supermemory/requests/connector_last_sync.py +21 -0
- supermemory-5.0.0rc2/src/supermemory/requests/connector_list.py +15 -0
- supermemory-5.0.0rc2/src/supermemory/requests/connector_picker.py +15 -0
- supermemory-5.0.0rc2/src/supermemory/requests/connector_selection.py +31 -0
- supermemory-5.0.0rc2/src/supermemory/requests/connector_selection_item.py +8 -0
- supermemory-5.0.0rc2/src/supermemory/requests/connector_setup.py +89 -0
- supermemory-5.0.0rc2/src/supermemory/requests/connector_setup_github.py +18 -0
- supermemory-5.0.0rc2/src/supermemory/requests/connector_setup_gmail.py +18 -0
- supermemory-5.0.0rc2/src/supermemory/requests/connector_setup_google_drive.py +21 -0
- supermemory-5.0.0rc2/src/supermemory/requests/connector_setup_granola.py +19 -0
- supermemory-5.0.0rc2/src/supermemory/requests/connector_setup_notion.py +18 -0
- supermemory-5.0.0rc2/src/supermemory/requests/connector_setup_onedrive.py +18 -0
- supermemory-5.0.0rc2/src/supermemory/requests/connector_setup_result.py +26 -0
- supermemory-5.0.0rc2/src/supermemory/requests/connector_setup_s3.py +19 -0
- supermemory-5.0.0rc2/src/supermemory/requests/connector_setup_web_crawler.py +19 -0
- supermemory-5.0.0rc2/src/supermemory/requests/connector_sync.py +31 -0
- supermemory-5.0.0rc2/src/supermemory/requests/connector_sync_failure.py +14 -0
- supermemory-5.0.0rc2/src/supermemory/requests/connector_sync_started.py +14 -0
- supermemory-5.0.0rc2/src/supermemory/requests/delete_document_error.py +15 -0
- supermemory-5.0.0rc2/src/supermemory/requests/delete_documents_result.py +19 -0
- supermemory-5.0.0rc2/src/supermemory/requests/document.py +59 -0
- supermemory-5.0.0rc2/src/supermemory/requests/document_input.py +41 -0
- supermemory-5.0.0rc2/src/supermemory/requests/document_list_item.py +47 -0
- supermemory-5.0.0rc2/src/supermemory/requests/document_ref.py +15 -0
- supermemory-5.0.0rc2/src/supermemory/requests/document_system.py +27 -0
- supermemory-5.0.0rc2/src/supermemory/requests/error_response.py +15 -0
- supermemory-5.0.0rc2/src/supermemory/requests/file_upload_result.py +17 -0
- supermemory-5.0.0rc2/src/supermemory/requests/filter_and.py +22 -0
- supermemory-5.0.0rc2/src/supermemory/requests/filter_array_contains.py +21 -0
- supermemory-5.0.0rc2/src/supermemory/requests/filter_expression.py +12 -0
- supermemory-5.0.0rc2/src/supermemory/requests/filter_number_compare.py +21 -0
- supermemory-5.0.0rc2/src/supermemory/requests/filter_or.py +22 -0
- supermemory-5.0.0rc2/src/supermemory/requests/filter_predicate.py +17 -0
- supermemory-5.0.0rc2/src/supermemory/requests/filter_string_contains.py +29 -0
- supermemory-5.0.0rc2/src/supermemory/requests/filter_string_equals.py +29 -0
- supermemory-5.0.0rc2/src/supermemory/requests/filter_value_equals.py +22 -0
- supermemory-5.0.0rc2/src/supermemory/requests/filter_value_equals_value.py +5 -0
- supermemory-5.0.0rc2/src/supermemory/requests/forget_error.py +15 -0
- supermemory-5.0.0rc2/src/supermemory/requests/forget_match.py +15 -0
- supermemory-5.0.0rc2/src/supermemory/requests/forget_result.py +24 -0
- supermemory-5.0.0rc2/src/supermemory/requests/google_drive_config.py +14 -0
- supermemory-5.0.0rc2/src/supermemory/requests/granola_config.py +12 -0
- supermemory-5.0.0rc2/src/supermemory/requests/list_request_limit.py +5 -0
- supermemory-5.0.0rc2/src/supermemory/requests/list_request_page.py +5 -0
- supermemory-5.0.0rc2/src/supermemory/requests/list_response.py +35 -0
- supermemory-5.0.0rc2/src/supermemory/requests/memory.py +58 -0
- supermemory-5.0.0rc2/src/supermemory/requests/memory_system.py +22 -0
- supermemory-5.0.0rc2/src/supermemory/requests/metadata_value.py +5 -0
- supermemory-5.0.0rc2/src/supermemory/requests/namespace.py +39 -0
- supermemory-5.0.0rc2/src/supermemory/requests/namespace_deleted.py +27 -0
- supermemory-5.0.0rc2/src/supermemory/requests/namespace_deleted_deleted.py +28 -0
- supermemory-5.0.0rc2/src/supermemory/requests/namespace_deleted_queued.py +28 -0
- supermemory-5.0.0rc2/src/supermemory/requests/namespace_details.py +24 -0
- supermemory-5.0.0rc2/src/supermemory/requests/namespace_system.py +22 -0
- supermemory-5.0.0rc2/src/supermemory/requests/organization.py +20 -0
- supermemory-5.0.0rc2/src/supermemory/requests/pagination.py +30 -0
- supermemory-5.0.0rc2/src/supermemory/requests/profile.py +27 -0
- supermemory-5.0.0rc2/src/supermemory/requests/profile_buckets.py +12 -0
- supermemory-5.0.0rc2/src/supermemory/requests/profile_fact.py +15 -0
- supermemory-5.0.0rc2/src/supermemory/requests/profile_response.py +11 -0
- supermemory-5.0.0rc2/src/supermemory/requests/related_memories.py +27 -0
- supermemory-5.0.0rc2/src/supermemory/requests/related_memory.py +34 -0
- supermemory-5.0.0rc2/src/supermemory/requests/related_memory_system.py +15 -0
- supermemory-5.0.0rc2/src/supermemory/requests/s3config.py +24 -0
- supermemory-5.0.0rc2/src/supermemory/requests/search_request_attach.py +24 -0
- supermemory-5.0.0rc2/src/supermemory/requests/search_response.py +19 -0
- supermemory-5.0.0rc2/src/supermemory/requests/search_result.py +50 -0
- supermemory-5.0.0rc2/src/supermemory/requests/search_result_included.py +21 -0
- supermemory-5.0.0rc2/src/supermemory/requests/search_result_included_document.py +47 -0
- supermemory-5.0.0rc2/src/supermemory/requests/search_result_system.py +20 -0
- supermemory-5.0.0rc2/src/supermemory/requests/validation_error_response.py +23 -0
- supermemory-5.0.0rc2/src/supermemory/requests/validation_error_response_error_item.py +11 -0
- supermemory-5.0.0rc2/src/supermemory/requests/validation_error_response_error_item_path_item.py +5 -0
- supermemory-5.0.0rc2/src/supermemory/requests/web_crawler_config.py +16 -0
- supermemory-5.0.0rc2/src/supermemory/types/__init__.py +380 -0
- supermemory-5.0.0rc2/src/supermemory/types/bad_request_error_body.py +8 -0
- supermemory-5.0.0rc2/src/supermemory/types/batch_add_item_result.py +43 -0
- supermemory-5.0.0rc2/src/supermemory/types/batch_add_result.py +34 -0
- supermemory-5.0.0rc2/src/supermemory/types/chunk.py +53 -0
- supermemory-5.0.0rc2/src/supermemory/types/chunk_list_item.py +60 -0
- supermemory-5.0.0rc2/src/supermemory/types/chunk_system.py +34 -0
- supermemory-5.0.0rc2/src/supermemory/types/connector.py +121 -0
- supermemory-5.0.0rc2/src/supermemory/types/connector_capabilities.py +28 -0
- supermemory-5.0.0rc2/src/supermemory/types/connector_config_value.py +5 -0
- supermemory-5.0.0rc2/src/supermemory/types/connector_deleted.py +21 -0
- supermemory-5.0.0rc2/src/supermemory/types/connector_error_code.py +7 -0
- supermemory-5.0.0rc2/src/supermemory/types/connector_last_sync.py +39 -0
- supermemory-5.0.0rc2/src/supermemory/types/connector_list.py +26 -0
- supermemory-5.0.0rc2/src/supermemory/types/connector_picker.py +30 -0
- supermemory-5.0.0rc2/src/supermemory/types/connector_provider.py +7 -0
- supermemory-5.0.0rc2/src/supermemory/types/connector_selection.py +42 -0
- supermemory-5.0.0rc2/src/supermemory/types/connector_selection_item.py +21 -0
- supermemory-5.0.0rc2/src/supermemory/types/connector_setup.py +177 -0
- supermemory-5.0.0rc2/src/supermemory/types/connector_setup_github.py +38 -0
- supermemory-5.0.0rc2/src/supermemory/types/connector_setup_gmail.py +38 -0
- supermemory-5.0.0rc2/src/supermemory/types/connector_setup_google_drive.py +41 -0
- supermemory-5.0.0rc2/src/supermemory/types/connector_setup_granola.py +35 -0
- supermemory-5.0.0rc2/src/supermemory/types/connector_setup_notion.py +38 -0
- supermemory-5.0.0rc2/src/supermemory/types/connector_setup_onedrive.py +38 -0
- supermemory-5.0.0rc2/src/supermemory/types/connector_setup_result.py +47 -0
- supermemory-5.0.0rc2/src/supermemory/types/connector_setup_s3.py +35 -0
- supermemory-5.0.0rc2/src/supermemory/types/connector_setup_web_crawler.py +35 -0
- supermemory-5.0.0rc2/src/supermemory/types/connector_status.py +5 -0
- supermemory-5.0.0rc2/src/supermemory/types/connector_sync.py +53 -0
- supermemory-5.0.0rc2/src/supermemory/types/connector_sync_failure.py +28 -0
- supermemory-5.0.0rc2/src/supermemory/types/connector_sync_started.py +25 -0
- supermemory-5.0.0rc2/src/supermemory/types/connector_sync_status.py +5 -0
- supermemory-5.0.0rc2/src/supermemory/types/connector_sync_trigger.py +5 -0
- supermemory-5.0.0rc2/src/supermemory/types/delete_document_error.py +28 -0
- supermemory-5.0.0rc2/src/supermemory/types/delete_documents_result.py +35 -0
- supermemory-5.0.0rc2/src/supermemory/types/document.py +70 -0
- supermemory-5.0.0rc2/src/supermemory/types/document_attachment.py +5 -0
- supermemory-5.0.0rc2/src/supermemory/types/document_input.py +58 -0
- supermemory-5.0.0rc2/src/supermemory/types/document_list_item.py +58 -0
- supermemory-5.0.0rc2/src/supermemory/types/document_ref.py +28 -0
- supermemory-5.0.0rc2/src/supermemory/types/document_system.py +48 -0
- supermemory-5.0.0rc2/src/supermemory/types/dreaming_mode.py +5 -0
- supermemory-5.0.0rc2/src/supermemory/types/error_response.py +28 -0
- supermemory-5.0.0rc2/src/supermemory/types/file_type.py +5 -0
- supermemory-5.0.0rc2/src/supermemory/types/file_upload_result.py +28 -0
- supermemory-5.0.0rc2/src/supermemory/types/filter_and.py +36 -0
- supermemory-5.0.0rc2/src/supermemory/types/filter_array_contains.py +34 -0
- supermemory-5.0.0rc2/src/supermemory/types/filter_array_contains_operator.py +5 -0
- supermemory-5.0.0rc2/src/supermemory/types/filter_expression.py +12 -0
- supermemory-5.0.0rc2/src/supermemory/types/filter_number_compare.py +34 -0
- supermemory-5.0.0rc2/src/supermemory/types/filter_number_compare_operator.py +5 -0
- supermemory-5.0.0rc2/src/supermemory/types/filter_or.py +36 -0
- supermemory-5.0.0rc2/src/supermemory/types/filter_predicate.py +13 -0
- supermemory-5.0.0rc2/src/supermemory/types/filter_string_contains.py +45 -0
- supermemory-5.0.0rc2/src/supermemory/types/filter_string_contains_operator.py +5 -0
- supermemory-5.0.0rc2/src/supermemory/types/filter_string_equals.py +45 -0
- supermemory-5.0.0rc2/src/supermemory/types/filter_string_equals_operator.py +5 -0
- supermemory-5.0.0rc2/src/supermemory/types/filter_value_equals.py +35 -0
- supermemory-5.0.0rc2/src/supermemory/types/filter_value_equals_operator.py +5 -0
- supermemory-5.0.0rc2/src/supermemory/types/filter_value_equals_value.py +5 -0
- supermemory-5.0.0rc2/src/supermemory/types/forget_error.py +28 -0
- supermemory-5.0.0rc2/src/supermemory/types/forget_match.py +28 -0
- supermemory-5.0.0rc2/src/supermemory/types/forget_result.py +35 -0
- supermemory-5.0.0rc2/src/supermemory/types/google_drive_config.py +33 -0
- supermemory-5.0.0rc2/src/supermemory/types/google_drive_config_sync_scope.py +5 -0
- supermemory-5.0.0rc2/src/supermemory/types/granola_config.py +26 -0
- supermemory-5.0.0rc2/src/supermemory/types/list_request_limit.py +5 -0
- supermemory-5.0.0rc2/src/supermemory/types/list_request_page.py +5 -0
- supermemory-5.0.0rc2/src/supermemory/types/list_response.py +46 -0
- supermemory-5.0.0rc2/src/supermemory/types/list_sort.py +5 -0
- supermemory-5.0.0rc2/src/supermemory/types/list_type.py +5 -0
- supermemory-5.0.0rc2/src/supermemory/types/memory.py +88 -0
- supermemory-5.0.0rc2/src/supermemory/types/memory_relation.py +5 -0
- supermemory-5.0.0rc2/src/supermemory/types/memory_system.py +43 -0
- supermemory-5.0.0rc2/src/supermemory/types/metadata_value.py +5 -0
- supermemory-5.0.0rc2/src/supermemory/types/namespace.py +59 -0
- supermemory-5.0.0rc2/src/supermemory/types/namespace_deleted.py +56 -0
- supermemory-5.0.0rc2/src/supermemory/types/namespace_deleted_deleted.py +48 -0
- supermemory-5.0.0rc2/src/supermemory/types/namespace_deleted_queued.py +48 -0
- supermemory-5.0.0rc2/src/supermemory/types/namespace_details.py +43 -0
- supermemory-5.0.0rc2/src/supermemory/types/namespace_system.py +43 -0
- supermemory-5.0.0rc2/src/supermemory/types/organization.py +41 -0
- supermemory-5.0.0rc2/src/supermemory/types/pagination.py +56 -0
- supermemory-5.0.0rc2/src/supermemory/types/profile.py +38 -0
- supermemory-5.0.0rc2/src/supermemory/types/profile_buckets.py +23 -0
- supermemory-5.0.0rc2/src/supermemory/types/profile_fact.py +28 -0
- supermemory-5.0.0rc2/src/supermemory/types/profile_response.py +24 -0
- supermemory-5.0.0rc2/src/supermemory/types/related_memories.py +38 -0
- supermemory-5.0.0rc2/src/supermemory/types/related_memory.py +45 -0
- supermemory-5.0.0rc2/src/supermemory/types/related_memory_system.py +33 -0
- supermemory-5.0.0rc2/src/supermemory/types/s3config.py +42 -0
- supermemory-5.0.0rc2/src/supermemory/types/search_mode.py +5 -0
- supermemory-5.0.0rc2/src/supermemory/types/search_request_attach.py +37 -0
- supermemory-5.0.0rc2/src/supermemory/types/search_request_rerank.py +5 -0
- supermemory-5.0.0rc2/src/supermemory/types/search_response.py +35 -0
- supermemory-5.0.0rc2/src/supermemory/types/search_result.py +69 -0
- supermemory-5.0.0rc2/src/supermemory/types/search_result_included.py +34 -0
- supermemory-5.0.0rc2/src/supermemory/types/search_result_included_document.py +67 -0
- supermemory-5.0.0rc2/src/supermemory/types/search_result_system.py +42 -0
- supermemory-5.0.0rc2/src/supermemory/types/sort_order.py +5 -0
- supermemory-5.0.0rc2/src/supermemory/types/task_type.py +5 -0
- supermemory-5.0.0rc2/src/supermemory/types/validation_error_response.py +34 -0
- supermemory-5.0.0rc2/src/supermemory/types/validation_error_response_error_item.py +22 -0
- supermemory-5.0.0rc2/src/supermemory/types/validation_error_response_error_item_path_item.py +5 -0
- supermemory-5.0.0rc2/src/supermemory/types/web_crawler_config.py +34 -0
- supermemory-5.0.0rc2/tests/live/test_live.py +84 -0
- supermemory-5.0.0rc2/tests/test_client.py +150 -0
- supermemory-5.0.0rc2/tests/test_compat.py +242 -0
- supermemory-5.0.0rc2/tests/test_docs.py +86 -0
- supermemory-5.0.0rc2/uv.lock +1522 -0
- supermemory-3.62.0/.gitignore +0 -16
- supermemory-3.62.0/.release-please-manifest.json +0 -3
- supermemory-3.62.0/CONTRIBUTING.md +0 -121
- supermemory-3.62.0/PKG-INFO +0 -458
- supermemory-3.62.0/README.md +0 -423
- supermemory-3.62.0/api.md +0 -113
- supermemory-3.62.0/bin/check-release-environment +0 -21
- supermemory-3.62.0/bin/publish-pypi +0 -6
- supermemory-3.62.0/examples/.keep +0 -4
- supermemory-3.62.0/noxfile.py +0 -9
- supermemory-3.62.0/pyproject.toml +0 -269
- supermemory-3.62.0/release-please-config.json +0 -66
- supermemory-3.62.0/requirements-dev.lock +0 -149
- supermemory-3.62.0/requirements.lock +0 -76
- supermemory-3.62.0/src/supermemory/__init__.py +0 -102
- supermemory-3.62.0/src/supermemory/_base_client.py +0 -2131
- supermemory-3.62.0/src/supermemory/_client.py +0 -994
- supermemory-3.62.0/src/supermemory/_compat.py +0 -226
- supermemory-3.62.0/src/supermemory/_constants.py +0 -14
- supermemory-3.62.0/src/supermemory/_exceptions.py +0 -108
- supermemory-3.62.0/src/supermemory/_files.py +0 -173
- supermemory-3.62.0/src/supermemory/_models.py +0 -952
- supermemory-3.62.0/src/supermemory/_qs.py +0 -149
- supermemory-3.62.0/src/supermemory/_resource.py +0 -43
- supermemory-3.62.0/src/supermemory/_response.py +0 -835
- supermemory-3.62.0/src/supermemory/_streaming.py +0 -338
- supermemory-3.62.0/src/supermemory/_types.py +0 -273
- supermemory-3.62.0/src/supermemory/_utils/__init__.py +0 -64
- supermemory-3.62.0/src/supermemory/_utils/_compat.py +0 -45
- supermemory-3.62.0/src/supermemory/_utils/_datetime_parse.py +0 -136
- supermemory-3.62.0/src/supermemory/_utils/_json.py +0 -35
- supermemory-3.62.0/src/supermemory/_utils/_logs.py +0 -25
- supermemory-3.62.0/src/supermemory/_utils/_path.py +0 -127
- supermemory-3.62.0/src/supermemory/_utils/_proxy.py +0 -65
- supermemory-3.62.0/src/supermemory/_utils/_reflection.py +0 -42
- supermemory-3.62.0/src/supermemory/_utils/_resources_proxy.py +0 -24
- supermemory-3.62.0/src/supermemory/_utils/_streams.py +0 -12
- supermemory-3.62.0/src/supermemory/_utils/_sync.py +0 -58
- supermemory-3.62.0/src/supermemory/_utils/_transform.py +0 -457
- supermemory-3.62.0/src/supermemory/_utils/_typing.py +0 -156
- supermemory-3.62.0/src/supermemory/_utils/_utils.py +0 -433
- supermemory-3.62.0/src/supermemory/_version.py +0 -4
- supermemory-3.62.0/src/supermemory/lib/.keep +0 -4
- supermemory-3.62.0/src/supermemory/resources/__init__.py +0 -75
- supermemory-3.62.0/src/supermemory/resources/connections.py +0 -1028
- supermemory-3.62.0/src/supermemory/resources/documents.py +0 -1510
- supermemory-3.62.0/src/supermemory/resources/memories.py +0 -374
- supermemory-3.62.0/src/supermemory/resources/search.py +0 -739
- supermemory-3.62.0/src/supermemory/resources/settings.py +0 -302
- supermemory-3.62.0/src/supermemory/types/__init__.py +0 -57
- supermemory-3.62.0/src/supermemory/types/add_response.py +0 -13
- supermemory-3.62.0/src/supermemory/types/client_add_params.py +0 -80
- supermemory-3.62.0/src/supermemory/types/client_profile_params.py +0 -140
- supermemory-3.62.0/src/supermemory/types/connection_configure_params.py +0 -12
- supermemory-3.62.0/src/supermemory/types/connection_configure_response.py +0 -17
- supermemory-3.62.0/src/supermemory/types/connection_create_params.py +0 -23
- supermemory-3.62.0/src/supermemory/types/connection_create_response.py +0 -19
- supermemory-3.62.0/src/supermemory/types/connection_delete_by_id_params.py +0 -14
- supermemory-3.62.0/src/supermemory/types/connection_delete_by_id_response.py +0 -17
- supermemory-3.62.0/src/supermemory/types/connection_delete_by_provider_params.py +0 -15
- supermemory-3.62.0/src/supermemory/types/connection_delete_by_provider_response.py +0 -17
- supermemory-3.62.0/src/supermemory/types/connection_get_by_id_response.py +0 -44
- supermemory-3.62.0/src/supermemory/types/connection_get_by_tag_params.py +0 -15
- supermemory-3.62.0/src/supermemory/types/connection_get_by_tag_response.py +0 -44
- supermemory-3.62.0/src/supermemory/types/connection_import_params.py +0 -15
- supermemory-3.62.0/src/supermemory/types/connection_import_response.py +0 -7
- supermemory-3.62.0/src/supermemory/types/connection_list_documents_params.py +0 -15
- supermemory-3.62.0/src/supermemory/types/connection_list_documents_response.py +0 -29
- supermemory-3.62.0/src/supermemory/types/connection_list_params.py +0 -15
- supermemory-3.62.0/src/supermemory/types/connection_list_response.py +0 -47
- supermemory-3.62.0/src/supermemory/types/connection_resources_params.py +0 -15
- supermemory-3.62.0/src/supermemory/types/connection_resources_response.py +0 -13
- supermemory-3.62.0/src/supermemory/types/document_add_params.py +0 -80
- supermemory-3.62.0/src/supermemory/types/document_add_response.py +0 -13
- supermemory-3.62.0/src/supermemory/types/document_batch_add_params.py +0 -178
- supermemory-3.62.0/src/supermemory/types/document_batch_add_response.py +0 -40
- supermemory-3.62.0/src/supermemory/types/document_delete_bulk_params.py +0 -24
- supermemory-3.62.0/src/supermemory/types/document_delete_bulk_response.py +0 -37
- supermemory-3.62.0/src/supermemory/types/document_get_response.py +0 -153
- supermemory-3.62.0/src/supermemory/types/document_list_params.py +0 -139
- supermemory-3.62.0/src/supermemory/types/document_list_processing_params.py +0 -28
- supermemory-3.62.0/src/supermemory/types/document_list_processing_response.py +0 -110
- supermemory-3.62.0/src/supermemory/types/document_list_response.py +0 -106
- supermemory-3.62.0/src/supermemory/types/document_update_params.py +0 -87
- supermemory-3.62.0/src/supermemory/types/document_update_response.py +0 -13
- supermemory-3.62.0/src/supermemory/types/document_upload_file_params.py +0 -95
- supermemory-3.62.0/src/supermemory/types/document_upload_file_response.py +0 -13
- supermemory-3.62.0/src/supermemory/types/memory_forget_params.py +0 -26
- supermemory-3.62.0/src/supermemory/types/memory_forget_response.py +0 -15
- supermemory-3.62.0/src/supermemory/types/memory_update_memory_params.py +0 -64
- supermemory-3.62.0/src/supermemory/types/memory_update_memory_response.py +0 -43
- supermemory-3.62.0/src/supermemory/types/profile_response.py +0 -200
- supermemory-3.62.0/src/supermemory/types/search_documents_params.py +0 -183
- supermemory-3.62.0/src/supermemory/types/search_documents_response.py +0 -69
- supermemory-3.62.0/src/supermemory/types/search_execute_params.py +0 -183
- supermemory-3.62.0/src/supermemory/types/search_execute_response.py +0 -69
- supermemory-3.62.0/src/supermemory/types/search_memories_params.py +0 -191
- supermemory-3.62.0/src/supermemory/types/search_memories_response.py +0 -186
- supermemory-3.62.0/src/supermemory/types/setting_get_response.py +0 -62
- supermemory-3.62.0/src/supermemory/types/setting_update_params.py +0 -63
- supermemory-3.62.0/src/supermemory/types/setting_update_response.py +0 -70
- supermemory-3.62.0/src/supermemory_new/lib/.keep +0 -4
- supermemory-3.62.0/tests/__init__.py +0 -1
- supermemory-3.62.0/tests/api_resources/__init__.py +0 -1
- supermemory-3.62.0/tests/api_resources/test_client.py +0 -244
- supermemory-3.62.0/tests/api_resources/test_connections.py +0 -904
- supermemory-3.62.0/tests/api_resources/test_documents.py +0 -1001
- supermemory-3.62.0/tests/api_resources/test_memories.py +0 -227
- supermemory-3.62.0/tests/api_resources/test_search.py +0 -436
- supermemory-3.62.0/tests/api_resources/test_settings.py +0 -196
- supermemory-3.62.0/tests/conftest.py +0 -84
- supermemory-3.62.0/tests/sample_file.txt +0 -1
- supermemory-3.62.0/tests/test_client.py +0 -1980
- supermemory-3.62.0/tests/test_extract_files.py +0 -91
- supermemory-3.62.0/tests/test_files.py +0 -148
- supermemory-3.62.0/tests/test_models.py +0 -1017
- supermemory-3.62.0/tests/test_qs.py +0 -78
- supermemory-3.62.0/tests/test_required_args.py +0 -111
- supermemory-3.62.0/tests/test_response.py +0 -277
- supermemory-3.62.0/tests/test_streaming.py +0 -252
- supermemory-3.62.0/tests/test_transform.py +0 -460
- supermemory-3.62.0/tests/test_utils/test_datetime_parse.py +0 -110
- supermemory-3.62.0/tests/test_utils/test_json.py +0 -126
- supermemory-3.62.0/tests/test_utils/test_path.py +0 -89
- supermemory-3.62.0/tests/test_utils/test_proxy.py +0 -34
- supermemory-3.62.0/tests/test_utils/test_typing.py +0 -73
- supermemory-3.62.0/tests/utils.py +0 -167
- {supermemory-3.62.0 → supermemory-5.0.0rc2}/LICENSE +0 -0
- {supermemory-3.62.0 → supermemory-5.0.0rc2}/SECURITY.md +0 -0
- {supermemory-3.62.0 → supermemory-5.0.0rc2}/src/supermemory/py.typed +0 -0
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
on:
|
|
3
|
+
push:
|
|
4
|
+
branches: [main]
|
|
5
|
+
pull_request:
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
test:
|
|
13
|
+
name: test (py${{ matrix.python }}${{ matrix.pydantic == 'v1' && ', pydantic v1' || '' }})
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
strategy:
|
|
16
|
+
fail-fast: false
|
|
17
|
+
matrix:
|
|
18
|
+
python: ["3.10", "3.11", "3.12", "3.13", "3.14"]
|
|
19
|
+
pydantic: [v2]
|
|
20
|
+
include:
|
|
21
|
+
- python: "3.10"
|
|
22
|
+
pydantic: v1
|
|
23
|
+
steps:
|
|
24
|
+
- uses: actions/checkout@v4
|
|
25
|
+
- uses: astral-sh/setup-uv@v6
|
|
26
|
+
- if: matrix.pydantic == 'v2'
|
|
27
|
+
run: uv run --python ${{ matrix.python }} --group dev pytest -q
|
|
28
|
+
- if: matrix.pydantic == 'v1'
|
|
29
|
+
run: uv run --python ${{ matrix.python }} --with 'pydantic<2' --group dev pytest -q
|
|
30
|
+
|
|
31
|
+
lint:
|
|
32
|
+
runs-on: ubuntu-latest
|
|
33
|
+
steps:
|
|
34
|
+
- uses: actions/checkout@v4
|
|
35
|
+
- uses: astral-sh/setup-uv@v6
|
|
36
|
+
- run: uv run --group dev ruff check .
|
|
37
|
+
- run: uv run --group dev ruff format --check custom tests scripts examples
|
|
38
|
+
- run: uv run --group dev mypy
|
|
39
|
+
- run: uv build
|
|
40
|
+
|
|
41
|
+
# src/supermemory must be exactly what scripts/generate produces from the
|
|
42
|
+
# committed spec + fern/ + custom/ — no hand edits.
|
|
43
|
+
generated:
|
|
44
|
+
runs-on: ubuntu-latest
|
|
45
|
+
steps:
|
|
46
|
+
- uses: actions/checkout@v4
|
|
47
|
+
- uses: oven-sh/setup-bun@v2
|
|
48
|
+
- uses: astral-sh/setup-uv@v6
|
|
49
|
+
- run: SKIP_FETCH=1 scripts/generate
|
|
50
|
+
- name: Check for drift
|
|
51
|
+
run: |
|
|
52
|
+
if [ -n "$(git status --porcelain)" ]; then
|
|
53
|
+
git status --short
|
|
54
|
+
echo "::error::src/supermemory doesn't match scripts/generate. Edit fern/ or custom/ instead of src/, then run SKIP_FETCH=1 scripts/generate and commit."
|
|
55
|
+
exit 1
|
|
56
|
+
fi
|
|
57
|
+
|
|
58
|
+
# Against the real API; runs when the SUPERMEMORY_LIVE_API_KEY secret exists.
|
|
59
|
+
live:
|
|
60
|
+
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
|
|
61
|
+
runs-on: ubuntu-latest
|
|
62
|
+
env:
|
|
63
|
+
SUPERMEMORY_LIVE_API_KEY: ${{ secrets.SUPERMEMORY_LIVE_API_KEY }}
|
|
64
|
+
steps:
|
|
65
|
+
- uses: actions/checkout@v4
|
|
66
|
+
if: env.SUPERMEMORY_LIVE_API_KEY != ''
|
|
67
|
+
- uses: astral-sh/setup-uv@v6
|
|
68
|
+
if: env.SUPERMEMORY_LIVE_API_KEY != ''
|
|
69
|
+
- if: env.SUPERMEMORY_LIVE_API_KEY != ''
|
|
70
|
+
run: uv run --group dev pytest tests/live -q
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
name: Generate SDK
|
|
2
|
+
on:
|
|
3
|
+
# Sent by the API deploy when /v5/openapi changes:
|
|
4
|
+
# gh api repos/supermemoryai/python-sdk/dispatches -f event_type=openapi-updated
|
|
5
|
+
repository_dispatch:
|
|
6
|
+
types: [openapi-updated]
|
|
7
|
+
# Backstop in case a deploy didn't dispatch.
|
|
8
|
+
schedule:
|
|
9
|
+
- cron: "0 0 * * *"
|
|
10
|
+
workflow_dispatch:
|
|
11
|
+
inputs:
|
|
12
|
+
version:
|
|
13
|
+
description: Set the SDK version (PEP 440, e.g. 5.0.0rc2 or 5.0.0). Empty = bump automatically if the SDK changed.
|
|
14
|
+
type: string
|
|
15
|
+
required: false
|
|
16
|
+
|
|
17
|
+
permissions:
|
|
18
|
+
contents: write
|
|
19
|
+
pull-requests: write
|
|
20
|
+
|
|
21
|
+
concurrency:
|
|
22
|
+
group: generate-sdk
|
|
23
|
+
cancel-in-progress: true
|
|
24
|
+
|
|
25
|
+
jobs:
|
|
26
|
+
generate:
|
|
27
|
+
runs-on: ubuntu-latest
|
|
28
|
+
steps:
|
|
29
|
+
- uses: actions/checkout@v4
|
|
30
|
+
- uses: oven-sh/setup-bun@v2
|
|
31
|
+
- uses: astral-sh/setup-uv@v6
|
|
32
|
+
|
|
33
|
+
- name: Generate from https://api.supermemory.ai/v5/openapi
|
|
34
|
+
run: scripts/generate
|
|
35
|
+
|
|
36
|
+
- name: Version
|
|
37
|
+
id: meta
|
|
38
|
+
env:
|
|
39
|
+
VERSION: ${{ inputs.version }}
|
|
40
|
+
run: |
|
|
41
|
+
if [ -n "$VERSION" ]; then
|
|
42
|
+
sed -i "s/^version = \".*\"/version = \"$VERSION\"/" pyproject.toml
|
|
43
|
+
SKIP_FETCH=1 scripts/generate # re-stamp the User-Agent version
|
|
44
|
+
elif [ -n "$(git status --porcelain -- src)" ]; then
|
|
45
|
+
python3 scripts/bump_version.py
|
|
46
|
+
SKIP_FETCH=1 scripts/generate
|
|
47
|
+
fi
|
|
48
|
+
echo "version=$(grep -m1 '^version' pyproject.toml | cut -d'"' -f2)" >> "$GITHUB_OUTPUT"
|
|
49
|
+
{
|
|
50
|
+
echo 'stat<<EOF'
|
|
51
|
+
git diff --stat -- fern/openapi.json src | tail -n 25
|
|
52
|
+
echo EOF
|
|
53
|
+
} >> "$GITHUB_OUTPUT"
|
|
54
|
+
|
|
55
|
+
- name: Test
|
|
56
|
+
run: uv run --group dev pytest -q
|
|
57
|
+
|
|
58
|
+
# Opens (or updates) one PR; no-op if nothing changed. A PR opened with the
|
|
59
|
+
# default GITHUB_TOKEN doesn't trigger CI, so set CODEGEN_PR_TOKEN (a
|
|
60
|
+
# fine-grained PAT or app token with contents + pull-requests write).
|
|
61
|
+
- uses: peter-evans/create-pull-request@v7
|
|
62
|
+
with:
|
|
63
|
+
token: ${{ secrets.CODEGEN_PR_TOKEN || github.token }}
|
|
64
|
+
branch: codegen/regenerate
|
|
65
|
+
delete-branch: true
|
|
66
|
+
commit-message: "chore: regenerate SDK from v5 OpenAPI spec (${{ steps.meta.outputs.version }})"
|
|
67
|
+
title: "chore: regenerate SDK (${{ steps.meta.outputs.version }})"
|
|
68
|
+
body: |
|
|
69
|
+
Regenerated `src/supermemory` from `https://api.supermemory.ai/v5/openapi` (`scripts/generate`).
|
|
70
|
+
|
|
71
|
+
Merging publishes **supermemory ${{ steps.meta.outputs.version }}** to PyPI.
|
|
72
|
+
|
|
73
|
+
```
|
|
74
|
+
${{ steps.meta.outputs.stat }}
|
|
75
|
+
```
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
on:
|
|
3
|
+
push:
|
|
4
|
+
branches: [main]
|
|
5
|
+
workflow_dispatch:
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
contents: write # tag + GitHub release
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
publish:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
steps:
|
|
14
|
+
- uses: actions/checkout@v4
|
|
15
|
+
- uses: astral-sh/setup-uv@v6
|
|
16
|
+
|
|
17
|
+
# Merges that don't bump the version (docs, CI tweaks) are no-ops.
|
|
18
|
+
- name: Check version
|
|
19
|
+
id: meta
|
|
20
|
+
run: |
|
|
21
|
+
VERSION=$(grep -m1 '^version' pyproject.toml | cut -d'"' -f2)
|
|
22
|
+
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
|
|
23
|
+
if curl -fsS "https://pypi.org/pypi/supermemory/$VERSION/json" >/dev/null 2>&1; then
|
|
24
|
+
echo "supermemory $VERSION is already on PyPI — skipping."
|
|
25
|
+
echo "publish=false" >> "$GITHUB_OUTPUT"
|
|
26
|
+
else
|
|
27
|
+
echo "publish=true" >> "$GITHUB_OUTPUT"
|
|
28
|
+
fi
|
|
29
|
+
|
|
30
|
+
- if: steps.meta.outputs.publish == 'true'
|
|
31
|
+
run: uv run --group dev pytest -q
|
|
32
|
+
|
|
33
|
+
- if: steps.meta.outputs.publish == 'true'
|
|
34
|
+
run: uv build
|
|
35
|
+
|
|
36
|
+
- name: Publish ${{ steps.meta.outputs.version }}
|
|
37
|
+
if: steps.meta.outputs.publish == 'true'
|
|
38
|
+
run: uv publish
|
|
39
|
+
env:
|
|
40
|
+
UV_PUBLISH_TOKEN: ${{ secrets.SUPERMEMORY_PYPI_TOKEN || secrets.PYPI_TOKEN }}
|
|
41
|
+
|
|
42
|
+
- name: Tag and release
|
|
43
|
+
if: steps.meta.outputs.publish == 'true'
|
|
44
|
+
env:
|
|
45
|
+
GH_TOKEN: ${{ github.token }}
|
|
46
|
+
VERSION: ${{ steps.meta.outputs.version }}
|
|
47
|
+
run: |
|
|
48
|
+
flags=(--target "$GITHUB_SHA" --generate-notes)
|
|
49
|
+
[[ "$VERSION" =~ (a|b|rc|dev)[0-9]+$ ]] && flags+=(--prerelease)
|
|
50
|
+
gh release create "v$VERSION" dist/* "${flags[@]}"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.10
|
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 5.0.0rc1 (2026-10-04)
|
|
4
|
+
|
|
5
|
+
Generated from the Supermemory **v5 API** (`/v5/openapi`) with Fern's open-source generator, replacing Stainless. See [MIGRATION.md](MIGRATION.md).
|
|
6
|
+
|
|
7
|
+
### Breaking
|
|
8
|
+
|
|
9
|
+
- Namespace-first methods matching the TypeScript SDK: `client.add(namespace, ...)`, `client.search(namespace, query=...)`, `client.profile`, `client.list`, `documents.*`, `memories.*`, `profiles.*`, `namespaces.*`, `organization.*`.
|
|
10
|
+
- Container tags are replaced by namespaces; `q` → `query`, `custom_id` → `id`, `filters` → `filter`, `include` → `attach`.
|
|
11
|
+
- Requires Python 3.10+.
|
|
12
|
+
|
|
13
|
+
### Kept from 3.x
|
|
14
|
+
|
|
15
|
+
- Client options, environment variables, per-call `extra_headers` / `extra_query` / `extra_body` / `timeout`, `with_options`, the exception hierarchy, `with_raw_response`, `to_dict()` / `to_json()`, and dict-typed request params.
|
|
16
|
+
|
|
17
|
+
### New
|
|
18
|
+
|
|
19
|
+
- `client.connectors.*` for Notion, Google Drive, OneDrive, Gmail, GitHub, S3, web crawler, and Granola.
|
|
20
|
+
- Named types (`Document`, `Memory`, `SearchResult`, `Connector`, …) and typed filter expressions.
|
|
21
|
+
|
|
3
22
|
## 3.62.0 (2026-09-14)
|
|
4
23
|
|
|
5
24
|
Full Changelog: [v3.61.0...v3.62.0](https://github.com/supermemoryai/python-sdk/compare/v3.61.0...v3.62.0)
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# Migrating from `supermemory` 3.x to 5.x
|
|
2
|
+
|
|
3
|
+
Starting with **5.0.0**, the Python SDK is generated from the Supermemory **v5 API** (`/v5/openapi`) using Fern's open-source generator instead of Stainless. The method names match the TypeScript SDK ([sdk-ts](https://github.com/supermemoryai/sdk-ts)) v5.
|
|
4
|
+
|
|
5
|
+
v5 is namespace-first. Every content operation is scoped to a namespace, which replaces container tags, and the namespace is passed as the first argument.
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
pip install --pre supermemory # while 5.0 is in release candidate
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## TL;DR
|
|
12
|
+
|
|
13
|
+
Only the API methods change. Everything around them works as before:
|
|
14
|
+
|
|
15
|
+
| | 3.x | 5.x |
|
|
16
|
+
|---|---|---|
|
|
17
|
+
| Import / auth / env vars | `from supermemory import Supermemory`, `SUPERMEMORY_API_KEY`, `SUPERMEMORY_BASE_URL` | unchanged |
|
|
18
|
+
| Client options | `api_key`, `base_url`, `timeout`, `max_retries`, `default_headers`, `default_query`, `http_client` | unchanged |
|
|
19
|
+
| Per-call options | `extra_headers`, `extra_query`, `extra_body`, `timeout`; `client.with_options(...)` | unchanged |
|
|
20
|
+
| Retries / timeout | 2 retries, 60s | unchanged |
|
|
21
|
+
| Errors | `supermemory.APIStatusError`, `NotFoundError`, `RateLimitError`, `APIConnectionError`, … | unchanged |
|
|
22
|
+
| Raw responses | `client.with_raw_response.<method>(...).parse()` | unchanged |
|
|
23
|
+
| Models | `.to_dict()`, `.to_json()` | unchanged |
|
|
24
|
+
| Scoping | `container_tag` / `container_tags` in the body | `namespace` positional argument (one per call) |
|
|
25
|
+
| Add | `client.add(content=..., container_tag="u")` | `client.add("u", content=...)` |
|
|
26
|
+
| Search | `client.search.memories(q=...)` | `client.search("u", query=...)` |
|
|
27
|
+
| Profile | profile + optional search (`q`) | profile only. Run `client.search` alongside it |
|
|
28
|
+
| Python | 3.9+ | 3.10+ |
|
|
29
|
+
|
|
30
|
+
## Method map
|
|
31
|
+
|
|
32
|
+
| 3.x call | 5.x call |
|
|
33
|
+
|---|---|
|
|
34
|
+
| `client.add(...)` / `client.documents.add(...)` | `client.add(namespace, content=...)` |
|
|
35
|
+
| `client.search.memories(...)` / `client.search.documents(...)` | `client.search(namespace, query=...)` |
|
|
36
|
+
| `client.profile(...)` | `client.profile(namespace)` |
|
|
37
|
+
| `client.documents.list(...)` / `client.memories.list(...)` | `client.list(namespace, "documents" \| "chunks" \| "memories")` |
|
|
38
|
+
| `client.documents.get(id)` | `client.documents.get(namespace, id)` |
|
|
39
|
+
| `client.documents.update(id, ...)` | `client.documents.update(namespace, id, ...)` |
|
|
40
|
+
| `client.documents.delete(...)` / `delete_bulk(...)` | `client.documents.delete(namespace, ids=[...])` |
|
|
41
|
+
| `client.documents.batch_add(...)` | `client.documents.batch_add(namespace, documents=[...])` |
|
|
42
|
+
| `client.documents.upload_file(...)` | `client.documents.upload_file(namespace, file=...)` |
|
|
43
|
+
| — | `client.documents.replace_with_file(...)`, `update_file(...)` |
|
|
44
|
+
| `client.memories.forget(...)` | `client.memories.forget(namespace, ids=[...])` |
|
|
45
|
+
| — | `client.memories.forget_matching(...)` |
|
|
46
|
+
| — | `client.profiles.{get_buckets, set_buckets, delete_buckets}` |
|
|
47
|
+
| `client.connections.*` | `client.connectors.{list_all, list, create, get, update, delete, sync}` |
|
|
48
|
+
| container tag management | `client.namespaces.{list, get, update, delete}` |
|
|
49
|
+
| `client.settings.{get, update}` | `client.organization.{get, update}` |
|
|
50
|
+
|
|
51
|
+
### Renamed request fields
|
|
52
|
+
|
|
53
|
+
| 3.x | 5.x |
|
|
54
|
+
|---|---|
|
|
55
|
+
| `container_tag` / `container_tags` | `namespace` (first argument) |
|
|
56
|
+
| `custom_id` | `id` |
|
|
57
|
+
| `q` | `query` |
|
|
58
|
+
| `filters` | `filter` (typed filter expression) |
|
|
59
|
+
| `include` | `attach` |
|
|
60
|
+
| search `timing` / `total` | `search_time` |
|
|
61
|
+
|
|
62
|
+
## Profile no longer searches
|
|
63
|
+
|
|
64
|
+
```python
|
|
65
|
+
import asyncio
|
|
66
|
+
from supermemory import AsyncSupermemory
|
|
67
|
+
|
|
68
|
+
client = AsyncSupermemory()
|
|
69
|
+
|
|
70
|
+
profile, search = await asyncio.gather(
|
|
71
|
+
client.profile("user_alex"),
|
|
72
|
+
client.search("user_alex", query="upcoming meetings"),
|
|
73
|
+
)
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Several container tags
|
|
77
|
+
|
|
78
|
+
v5 operations take exactly one namespace. To search several, fan out and merge:
|
|
79
|
+
|
|
80
|
+
```python
|
|
81
|
+
responses = await asyncio.gather(*(client.search(ns, query="roadmap") for ns in ["user_alex", "team_design"]))
|
|
82
|
+
results = [r for resp in responses for r in resp.results]
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## Smaller differences
|
|
86
|
+
|
|
87
|
+
- Response types are generated from the v5 spec, so their names changed (e.g. `SearchMemoriesResponse` became `SearchResponse`). Import them from `supermemory.types`.
|
|
88
|
+
- `client.with_streaming_response` is gone. None of the v5 endpoints stream.
|
|
89
|
+
- `NOT_GIVEN` is gone. Leave out an argument (or pass `None`) to omit it.
|
|
90
|
+
|
|
91
|
+
## Removed
|
|
92
|
+
|
|
93
|
+
These 3.x methods have no v5 endpoint yet. Stay on `supermemory<4` if you depend on them:
|
|
94
|
+
|
|
95
|
+
- `client.settings.{reset, suggest_buckets}` and chunking settings
|
|
96
|
+
- `client.conversations.add`
|
|
97
|
+
- `client.documents.{list_processing, chunks, file_url}`
|
|
98
|
+
- container tag merge
|
|
99
|
+
- `client.memories.{add, update_memory}`
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: supermemory
|
|
3
|
+
Version: 5.0.0rc2
|
|
4
|
+
Summary: The official Python library for the Supermemory API
|
|
5
|
+
Project-URL: Homepage, https://supermemory.ai
|
|
6
|
+
Project-URL: Documentation, https://docs.supermemory.ai
|
|
7
|
+
Project-URL: Repository, https://github.com/supermemoryai/python-sdk
|
|
8
|
+
Author-email: Supermemory <dhravya@supermemory.com>
|
|
9
|
+
License-Expression: Apache-2.0
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
13
|
+
Classifier: Operating System :: OS Independent
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
19
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
20
|
+
Classifier: Typing :: Typed
|
|
21
|
+
Requires-Python: >=3.10
|
|
22
|
+
Requires-Dist: httpx>=0.21.2
|
|
23
|
+
Requires-Dist: pydantic-core>=2.18.2
|
|
24
|
+
Requires-Dist: pydantic>=1.9.2
|
|
25
|
+
Requires-Dist: typing-extensions>=4.0.0
|
|
26
|
+
Provides-Extra: aiohttp
|
|
27
|
+
Requires-Dist: httpx-aiohttp>=0.1.8; extra == 'aiohttp'
|
|
28
|
+
Description-Content-Type: text/markdown
|
|
29
|
+
|
|
30
|
+
# Supermemory Python SDK
|
|
31
|
+
|
|
32
|
+
[](https://pypi.org/project/supermemory/)
|
|
33
|
+
|
|
34
|
+
The official Python library for the [Supermemory](https://supermemory.ai) v5 API, with sync and async clients built on [httpx](https://github.com/encode/httpx).
|
|
35
|
+
|
|
36
|
+
> **Upgrading from 3.x?** v5 moves to the namespace-first v5 API. See [MIGRATION.md](MIGRATION.md).
|
|
37
|
+
|
|
38
|
+
## Installation
|
|
39
|
+
|
|
40
|
+
```sh
|
|
41
|
+
pip install --pre supermemory # 5.0 release candidates
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Usage
|
|
45
|
+
|
|
46
|
+
```python
|
|
47
|
+
from supermemory import Supermemory
|
|
48
|
+
|
|
49
|
+
client = Supermemory() # reads SUPERMEMORY_API_KEY; or Supermemory(api_key="...")
|
|
50
|
+
|
|
51
|
+
client.add("user_alex", content="Alex prefers morning meetings.", id="pref-1")
|
|
52
|
+
|
|
53
|
+
response = client.search("user_alex", query="when does alex like to meet?", limit=5)
|
|
54
|
+
for result in response.results:
|
|
55
|
+
print(result)
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Every content operation is scoped to a **namespace** (a user ID, project ID, or anything you want to isolate memories by), passed as the first argument.
|
|
59
|
+
|
|
60
|
+
### Async
|
|
61
|
+
|
|
62
|
+
```python
|
|
63
|
+
import asyncio
|
|
64
|
+
from supermemory import AsyncSupermemory
|
|
65
|
+
|
|
66
|
+
async_client = AsyncSupermemory()
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
async def main() -> None:
|
|
70
|
+
profile, results = await asyncio.gather(
|
|
71
|
+
async_client.profile("user_alex"),
|
|
72
|
+
async_client.search("user_alex", query="upcoming meetings"),
|
|
73
|
+
)
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
asyncio.run(main())
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Install `supermemory[aiohttp]` to use aiohttp as the async transport.
|
|
80
|
+
|
|
81
|
+
## API surface
|
|
82
|
+
|
|
83
|
+
| Call | Endpoint |
|
|
84
|
+
|---|---|
|
|
85
|
+
| `client.add(namespace, content=...)` | `POST /ns/{namespace}/document` |
|
|
86
|
+
| `client.search(namespace, query=...)` | `POST /ns/{namespace}/search` |
|
|
87
|
+
| `client.profile(namespace)` | `POST /ns/{namespace}/profile` |
|
|
88
|
+
| `client.list(namespace, "documents" \| "chunks" \| "memories")` | `POST /ns/{namespace}/list/{type}` |
|
|
89
|
+
| `client.documents.{get, update, delete, batch_add, upload_file, replace_with_file, update_file}` | `/ns/{namespace}/document…` |
|
|
90
|
+
| `client.memories.{forget, forget_matching}` | `/ns/{namespace}/memories…` |
|
|
91
|
+
| `client.profiles.{get_buckets, set_buckets, delete_buckets}` | `/ns/{namespace}/profile/buckets` |
|
|
92
|
+
| `client.connectors.{list_all, list, create, get, update, delete, sync}` | `/connectors`, `/ns/{namespace}/connectors…` |
|
|
93
|
+
| `client.namespaces.{list, get, update, delete}` | `/ns`, `/ns/{namespace}` |
|
|
94
|
+
| `client.organization.{get, update}` | `/organization` |
|
|
95
|
+
|
|
96
|
+
Full parameter reference: [reference.md](reference.md).
|
|
97
|
+
|
|
98
|
+
## Filtering
|
|
99
|
+
|
|
100
|
+
Filters are plain dicts (typed as `FilterExpressionParams`), combinable with `and` / `or`:
|
|
101
|
+
|
|
102
|
+
```python
|
|
103
|
+
response = client.search(
|
|
104
|
+
"user_alex",
|
|
105
|
+
query="launch plans",
|
|
106
|
+
filter={
|
|
107
|
+
"operator": "and",
|
|
108
|
+
"operands": [
|
|
109
|
+
{"field": "source", "operator": "eq", "value": "slack"},
|
|
110
|
+
{"field": "priority", "operator": "gte", "value": 3},
|
|
111
|
+
],
|
|
112
|
+
},
|
|
113
|
+
)
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
The same filter shape works for `client.list(...)` and `client.profile(...)`.
|
|
117
|
+
|
|
118
|
+
## Listing
|
|
119
|
+
|
|
120
|
+
```python
|
|
121
|
+
page = client.list("user_alex", "documents", page=1, limit=50, sort="createdAt", order="desc")
|
|
122
|
+
for document in page.documents or []:
|
|
123
|
+
print(document.id, document.title)
|
|
124
|
+
print(page.pagination)
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
## File uploads
|
|
128
|
+
|
|
129
|
+
```python
|
|
130
|
+
with open("notes.pdf", "rb") as f:
|
|
131
|
+
client.documents.upload_file("user_alex", file=f)
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
## Errors
|
|
135
|
+
|
|
136
|
+
Same exception classes as 3.x. Non-2xx responses raise a subclass of `supermemory.APIStatusError` with `status_code`, `body`, `message`, `request`, and `response`. Network failures raise `APIConnectionError` (`APITimeoutError` for timeouts):
|
|
137
|
+
|
|
138
|
+
```python
|
|
139
|
+
import supermemory
|
|
140
|
+
from supermemory import Supermemory
|
|
141
|
+
|
|
142
|
+
client = Supermemory()
|
|
143
|
+
|
|
144
|
+
try:
|
|
145
|
+
client.documents.get("user_alex", "missing-id")
|
|
146
|
+
except supermemory.NotFoundError:
|
|
147
|
+
...
|
|
148
|
+
except supermemory.RateLimitError as e:
|
|
149
|
+
print(e.response.headers.get("retry-after"))
|
|
150
|
+
except supermemory.APIStatusError as e:
|
|
151
|
+
print(e.status_code, e.body)
|
|
152
|
+
except supermemory.APIConnectionError:
|
|
153
|
+
...
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
| Status | Error |
|
|
157
|
+
|---|---|
|
|
158
|
+
| 400 | `BadRequestError` |
|
|
159
|
+
| 401 | `AuthenticationError` |
|
|
160
|
+
| 403 | `PermissionDeniedError` |
|
|
161
|
+
| 404 | `NotFoundError` |
|
|
162
|
+
| 409 | `ConflictError` |
|
|
163
|
+
| 422 | `UnprocessableEntityError` |
|
|
164
|
+
| 429 | `RateLimitError` |
|
|
165
|
+
| >=500 | `InternalServerError` |
|
|
166
|
+
|
|
167
|
+
## Retries, timeouts, and per-request options
|
|
168
|
+
|
|
169
|
+
Connection errors, 408, 429, and 5xx responses are retried twice with exponential backoff, and requests time out after 60 seconds (5 seconds to connect). All of these can be set on the client, or for one request with `with_options`:
|
|
170
|
+
|
|
171
|
+
```python
|
|
172
|
+
import httpx
|
|
173
|
+
|
|
174
|
+
client = Supermemory(max_retries=5, timeout=20.0, default_headers={"X-App": "my-app"})
|
|
175
|
+
|
|
176
|
+
client.with_options(max_retries=0, timeout=httpx.Timeout(5.0)).search("user_alex", query="...")
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
Every method also takes `extra_headers`, `extra_query`, `extra_body`, and `timeout`:
|
|
180
|
+
|
|
181
|
+
```python
|
|
182
|
+
client.search("user_alex", query="...", extra_headers={"X-Trace": "1"}, timeout=5)
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
The client reads `SUPERMEMORY_API_KEY`, `SUPERMEMORY_BASE_URL`, and `SUPERMEMORY_CUSTOM_HEADERS` from the environment.
|
|
186
|
+
|
|
187
|
+
## Raw responses
|
|
188
|
+
|
|
189
|
+
```python
|
|
190
|
+
response = client.with_raw_response.search("user_alex", query="...")
|
|
191
|
+
print(response.headers.get("x-request-id"))
|
|
192
|
+
results = response.parse() # SearchResponse
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
Response models have `.to_dict()` and `.to_json()`.
|
|
196
|
+
|
|
197
|
+
## Development
|
|
198
|
+
|
|
199
|
+
The SDK is generated from the live v5 OpenAPI spec with [Fern](https://buildwithfern.com)'s open-source Python generator, run locally in Docker. No hosted codegen service is involved. Don't edit `src/supermemory` by hand; CI fails if it doesn't match a fresh generation.
|
|
200
|
+
|
|
201
|
+
| To change | Edit |
|
|
202
|
+
|---|---|
|
|
203
|
+
| Method names, grouping, parameter names, hidden endpoints | `fern/overlay.yaml` (`x-fern-sdk-group-name`, `x-fern-sdk-method-name`, `x-fern-parameter-name`, `x-fern-ignore`) |
|
|
204
|
+
| Type names (`Document`, `Memory`, `Connector`, …) | `fern/schemas.yaml` |
|
|
205
|
+
| Generator options | `fern/generators.yml` |
|
|
206
|
+
| Client conventions (options, errors, per-call options) | `custom/supermemory/_compat.py` |
|
|
207
|
+
| Small fixes to Fern's generated core | `custom/patches/*.patch` |
|
|
208
|
+
|
|
209
|
+
`scripts/generate` fetches the spec, names its schemas, runs Fern, then layers `custom/` on top.
|
|
210
|
+
|
|
211
|
+
```sh
|
|
212
|
+
scripts/generate # fetch /v5/openapi and regenerate (needs Docker, bun, uv)
|
|
213
|
+
SKIP_FETCH=1 scripts/generate # regenerate from the committed fern/openapi.json
|
|
214
|
+
uv run --group dev pytest # offline tests, including every snippet in README.md and MIGRATION.md
|
|
215
|
+
SUPERMEMORY_LIVE_API_KEY=... uv run --group dev pytest tests/live # against the real API
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
Runnable examples are in [`examples/`](examples).
|
|
219
|
+
|
|
220
|
+
### Releases
|
|
221
|
+
|
|
222
|
+
- When the API deploy sends `openapi-updated` (or on the daily backstop run), **Generate SDK** regenerates. If the SDK changed, it bumps the version and opens a PR with the tests already run.
|
|
223
|
+
- Merging a PR that changes the version in `pyproject.toml` publishes it to PyPI and creates a GitHub release.
|
|
224
|
+
- To cut a specific version, run **Generate SDK** manually with `version` set.
|