Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
497 changes: 476 additions & 21 deletions fern/openapi.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "supermemory"
version = "5.0.1"
version = "5.0.2"
description = "The official Python library for the Supermemory API"
readme = "README.md"
license = "Apache-2.0"
Expand Down
121 changes: 121 additions & 0 deletions reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,14 @@ client.list(
<dl>
<dd>

**cursor:** `typing.Optional[str]` — Opaque cursor from a previous response's `pagination.nextCursor`. When present, `page` is ignored and results continue after the last item of the previous page. Filters, sort, order and limit must match the request that produced the cursor.

</dd>
</dl>

<dl>
<dd>

**page:** `typing.Optional[int]` — One-based page number

</dd>
Expand Down Expand Up @@ -3062,6 +3070,119 @@ client.content_management.post_ns_by_namespace_list_documents_memory_counts(
</dl>


</dd>
</dl>
</details>

<details><summary><code>client.content_management.<a href="src/supermemory/content_management/client.py">post_ns_by_namespace_graph</a>(...) -> PostNsByNamespaceGraphResponse</code></summary>
<dl>
<dd>

#### 📝 Description

<dl>
<dd>

<dl>
<dd>

Page through a namespace's documents with their memories as graph nodes and edges, for example to render @supermemory/memory-graph. Pass nextCursor back as cursor until it is null.
</dd>
</dl>
</dd>
</dl>

#### 🔌 Usage

<dl>
<dd>

<dl>
<dd>

```python
from supermemory import Supermemory
from supermemory.environment import SupermemoryEnvironment

client = Supermemory(
api_key="<token>",
environment=SupermemoryEnvironment.DEFAULT,
)

client.content_management.post_ns_by_namespace_graph(
namespace="user_alex",
)

```
</dd>
</dl>
</dd>
</dl>

#### ⚙️ Parameters

<dl>
<dd>

<dl>
<dd>

**namespace:** `str` — The isolated namespace. This can be an ID for your user, a project ID, or any other identifier you wish to use to scope documents.

</dd>
</dl>

<dl>
<dd>

**cursor:** `typing.Optional[str]`

</dd>
</dl>

<dl>
<dd>

**limit:** `typing.Optional[int]`

</dd>
</dl>

<dl>
<dd>

**filter:** `typing.Optional[FilterExpression]` — A type-safe metadata filter predicate or nested and/or expression with up to 5 levels of nesting

</dd>
</dl>

<dl>
<dd>

**sort:** `typing.Optional[PostNsByNamespaceGraphRequestSort]`

</dd>
</dl>

<dl>
<dd>

**order:** `typing.Optional[SortOrder]`

</dd>
</dl>

<dl>
<dd>

**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.

</dd>
</dl>
</dd>
</dl>


</dd>
</dl>
</details>
Expand Down
69 changes: 69 additions & 0 deletions src/supermemory/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
ConnectorInclude,
ConnectorLink,
ConnectorList,
ConnectorListPagination,
ConnectorProvider,
ConnectorRun,
ConnectorRunStatus,
Expand Down Expand Up @@ -124,6 +125,7 @@
NamespaceDeleted_Queued,
NamespaceDetails,
NamespaceList,
NamespaceListPagination,
NamespaceSystem,
Organization,
Pagination,
Expand Down Expand Up @@ -162,6 +164,25 @@
from . import connectors, content_management, documents, feedback, memories, namespaces, organization, profiles
from ._default_clients import DefaultAioHttpClient, DefaultAsyncHttpxClient
from .content_management import (
PostNsByNamespaceGraphRequestSort,
PostNsByNamespaceGraphResponse,
PostNsByNamespaceGraphResponseEdgesItem,
PostNsByNamespaceGraphResponseEdgesItemOne,
PostNsByNamespaceGraphResponseEdgesItemOneParams,
PostNsByNamespaceGraphResponseEdgesItemParams,
PostNsByNamespaceGraphResponseEdgesItemSourceAddedAt,
PostNsByNamespaceGraphResponseEdgesItemSourceAddedAtParams,
PostNsByNamespaceGraphResponseNodesItem,
PostNsByNamespaceGraphResponseNodesItemDocument,
PostNsByNamespaceGraphResponseNodesItemDocumentParams,
PostNsByNamespaceGraphResponseNodesItemMemory,
PostNsByNamespaceGraphResponseNodesItemMemoryParams,
PostNsByNamespaceGraphResponseNodesItemParams,
PostNsByNamespaceGraphResponseNodesItem_Document,
PostNsByNamespaceGraphResponseNodesItem_DocumentParams,
PostNsByNamespaceGraphResponseNodesItem_Memory,
PostNsByNamespaceGraphResponseNodesItem_MemoryParams,
PostNsByNamespaceGraphResponseParams,
PostNsByNamespaceListDocumentsMemoryCountsResponse,
PostNsByNamespaceListDocumentsMemoryCountsResponseCountsItem,
PostNsByNamespaceListDocumentsMemoryCountsResponseCountsItemParams,
Expand All @@ -180,6 +201,7 @@
ConnectorConfigValueParams,
ConnectorDeletedParams,
ConnectorLinkParams,
ConnectorListPaginationParams,
ConnectorListParams,
ConnectorParams,
ConnectorRunParams,
Expand Down Expand Up @@ -261,6 +283,7 @@
NamespaceDeleted_DeletedParams,
NamespaceDeleted_QueuedParams,
NamespaceDetailsParams,
NamespaceListPaginationParams,
NamespaceListParams,
NamespaceParams,
NamespaceSystemParams,
Expand Down Expand Up @@ -313,6 +336,8 @@
"ConnectorLink": ".types",
"ConnectorLinkParams": ".requests",
"ConnectorList": ".types",
"ConnectorListPagination": ".types",
"ConnectorListPaginationParams": ".requests",
"ConnectorListParams": ".requests",
"ConnectorParams": ".requests",
"ConnectorProvider": ".types",
Expand Down Expand Up @@ -499,6 +524,8 @@
"NamespaceDetails": ".types",
"NamespaceDetailsParams": ".requests",
"NamespaceList": ".types",
"NamespaceListPagination": ".types",
"NamespaceListPaginationParams": ".requests",
"NamespaceListParams": ".requests",
"NamespaceParams": ".requests",
"NamespaceSystem": ".types",
Expand All @@ -511,6 +538,25 @@
"PostFeedbackRequestType": ".feedback",
"PostFeedbackResponse": ".feedback",
"PostFeedbackResponseParams": ".feedback",
"PostNsByNamespaceGraphRequestSort": ".content_management",
"PostNsByNamespaceGraphResponse": ".content_management",
"PostNsByNamespaceGraphResponseEdgesItem": ".content_management",
"PostNsByNamespaceGraphResponseEdgesItemOne": ".content_management",
"PostNsByNamespaceGraphResponseEdgesItemOneParams": ".content_management",
"PostNsByNamespaceGraphResponseEdgesItemParams": ".content_management",
"PostNsByNamespaceGraphResponseEdgesItemSourceAddedAt": ".content_management",
"PostNsByNamespaceGraphResponseEdgesItemSourceAddedAtParams": ".content_management",
"PostNsByNamespaceGraphResponseNodesItem": ".content_management",
"PostNsByNamespaceGraphResponseNodesItemDocument": ".content_management",
"PostNsByNamespaceGraphResponseNodesItemDocumentParams": ".content_management",
"PostNsByNamespaceGraphResponseNodesItemMemory": ".content_management",
"PostNsByNamespaceGraphResponseNodesItemMemoryParams": ".content_management",
"PostNsByNamespaceGraphResponseNodesItemParams": ".content_management",
"PostNsByNamespaceGraphResponseNodesItem_Document": ".content_management",
"PostNsByNamespaceGraphResponseNodesItem_DocumentParams": ".content_management",
"PostNsByNamespaceGraphResponseNodesItem_Memory": ".content_management",
"PostNsByNamespaceGraphResponseNodesItem_MemoryParams": ".content_management",
"PostNsByNamespaceGraphResponseParams": ".content_management",
"PostNsByNamespaceListDocumentsMemoryCountsResponse": ".content_management",
"PostNsByNamespaceListDocumentsMemoryCountsResponseCountsItem": ".content_management",
"PostNsByNamespaceListDocumentsMemoryCountsResponseCountsItemParams": ".content_management",
Expand Down Expand Up @@ -623,6 +669,8 @@ def __dir__():
"ConnectorLink",
"ConnectorLinkParams",
"ConnectorList",
"ConnectorListPagination",
"ConnectorListPaginationParams",
"ConnectorListParams",
"ConnectorParams",
"ConnectorProvider",
Expand Down Expand Up @@ -810,6 +858,8 @@ def __dir__():
"NamespaceDetails",
"NamespaceDetailsParams",
"NamespaceList",
"NamespaceListPagination",
"NamespaceListPaginationParams",
"NamespaceListParams",
"NamespaceParams",
"NamespaceSystem",
Expand All @@ -823,6 +873,25 @@ def __dir__():
"PostFeedbackRequestType",
"PostFeedbackResponse",
"PostFeedbackResponseParams",
"PostNsByNamespaceGraphRequestSort",
"PostNsByNamespaceGraphResponse",
"PostNsByNamespaceGraphResponseEdgesItem",
"PostNsByNamespaceGraphResponseEdgesItemOne",
"PostNsByNamespaceGraphResponseEdgesItemOneParams",
"PostNsByNamespaceGraphResponseEdgesItemParams",
"PostNsByNamespaceGraphResponseEdgesItemSourceAddedAt",
"PostNsByNamespaceGraphResponseEdgesItemSourceAddedAtParams",
"PostNsByNamespaceGraphResponseNodesItem",
"PostNsByNamespaceGraphResponseNodesItemDocument",
"PostNsByNamespaceGraphResponseNodesItemDocumentParams",
"PostNsByNamespaceGraphResponseNodesItemMemory",
"PostNsByNamespaceGraphResponseNodesItemMemoryParams",
"PostNsByNamespaceGraphResponseNodesItemParams",
"PostNsByNamespaceGraphResponseNodesItem_Document",
"PostNsByNamespaceGraphResponseNodesItem_DocumentParams",
"PostNsByNamespaceGraphResponseNodesItem_Memory",
"PostNsByNamespaceGraphResponseNodesItem_MemoryParams",
"PostNsByNamespaceGraphResponseParams",
"PostNsByNamespaceListDocumentsMemoryCountsResponse",
"PostNsByNamespaceListDocumentsMemoryCountsResponseCountsItem",
"PostNsByNamespaceListDocumentsMemoryCountsResponseCountsItemParams",
Expand Down
10 changes: 10 additions & 0 deletions src/supermemory/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,7 @@ def list(
namespace: str,
type: ListType,
*,
cursor: typing.Optional[str] = None,
page: typing.Optional[int] = None,
limit: typing.Optional[int] = None,
sort: typing.Optional[ListSort] = None,
Expand All @@ -396,6 +397,9 @@ def list(
type : ListType
Resource collection to list: source documents, extracted chunks, or learned memories

cursor : typing.Optional[str]
Opaque cursor from a previous response's `pagination.nextCursor`. When present, `page` is ignored and results continue after the last item of the previous page. Filters, sort, order and limit must match the request that produced the cursor.

page : typing.Optional[int]
One-based page number

Expand Down Expand Up @@ -439,6 +443,7 @@ def list(
_response = self._raw_client.list(
namespace,
type,
cursor=cursor,
page=page,
limit=limit,
sort=sort,
Expand Down Expand Up @@ -891,6 +896,7 @@ async def list(
namespace: str,
type: ListType,
*,
cursor: typing.Optional[str] = None,
page: typing.Optional[int] = None,
limit: typing.Optional[int] = None,
sort: typing.Optional[ListSort] = None,
Expand All @@ -914,6 +920,9 @@ async def list(
type : ListType
Resource collection to list: source documents, extracted chunks, or learned memories

cursor : typing.Optional[str]
Opaque cursor from a previous response's `pagination.nextCursor`. When present, `page` is ignored and results continue after the last item of the previous page. Filters, sort, order and limit must match the request that produced the cursor.

page : typing.Optional[int]
One-based page number

Expand Down Expand Up @@ -965,6 +974,7 @@ async def main() -> None:
_response = await self._raw_client.list(
namespace,
type,
cursor=cursor,
page=page,
limit=limit,
sort=sort,
Expand Down
Loading
Loading