id
stringlengths 7
77
| text
stringlengths 0
3.4k
| metadata
dict |
---|---|---|
astrapy.cursors.BC
|
{
"kind": "attribute",
"name": "BC",
"path": "astrapy.cursors.BC",
"parameters": null,
"returns": null,
"gathered_types": null,
"value": "BC = TypeVar('BC', bound='BaseCursor')",
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": null,
"attributes": null
}
|
|
astrapy.cursors.T
|
{
"kind": "attribute",
"name": "T",
"path": "astrapy.cursors.T",
"parameters": null,
"returns": null,
"gathered_types": null,
"value": "T = TypeVar('T')",
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": null,
"attributes": null
}
|
|
astrapy.cursors.IndexPairType
|
{
"kind": "attribute",
"name": "IndexPairType",
"path": "astrapy.cursors.IndexPairType",
"parameters": null,
"returns": null,
"gathered_types": null,
"value": "IndexPairType = Tuple[str, Optional[int]]",
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": null,
"attributes": null
}
|
|
astrapy.cursors.CursorState
|
{
"kind": "class",
"name": "CursorState",
"path": "astrapy.cursors.CursorState",
"parameters": null,
"returns": null,
"gathered_types": [
"Enum"
],
"value": null,
"yields": null,
"imports": null,
"properties": null,
"bases": [
"Enum"
],
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": null,
"attributes": null
}
|
|
astrapy.cursors.CursorState.IDLE
|
{
"kind": "attribute",
"name": "IDLE",
"path": "astrapy.cursors.CursorState.IDLE",
"parameters": null,
"returns": null,
"gathered_types": null,
"value": "IDLE = 'idle'",
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": null,
"attributes": null
}
|
|
astrapy.cursors.CursorState.STARTED
|
{
"kind": "attribute",
"name": "STARTED",
"path": "astrapy.cursors.CursorState.STARTED",
"parameters": null,
"returns": null,
"gathered_types": null,
"value": "STARTED = 'started'",
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": null,
"attributes": null
}
|
|
astrapy.cursors.CursorState.CLOSED
|
{
"kind": "attribute",
"name": "CLOSED",
"path": "astrapy.cursors.CursorState.CLOSED",
"parameters": null,
"returns": null,
"gathered_types": null,
"value": "CLOSED = 'closed'",
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": null,
"attributes": null
}
|
|
astrapy.cursors._LookAheadIterator.iterator
|
{
"kind": "attribute",
"name": "iterator",
"path": "astrapy.cursors._LookAheadIterator.iterator",
"parameters": null,
"returns": null,
"gathered_types": null,
"value": "iterator = iterator",
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": null,
"attributes": null
}
|
|
astrapy.cursors._LookAheadIterator.preread_item
|
{
"kind": "attribute",
"name": "preread_item",
"path": "astrapy.cursors._LookAheadIterator.preread_item",
"parameters": null,
"returns": null,
"gathered_types": [
"astrapy.constants.DocumentType"
],
"value": "preread_item: DocumentType | None = None",
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": null,
"attributes": null
}
|
|
astrapy.cursors._LookAheadIterator.has_preread
|
{
"kind": "attribute",
"name": "has_preread",
"path": "astrapy.cursors._LookAheadIterator.has_preread",
"parameters": null,
"returns": null,
"gathered_types": null,
"value": "has_preread = False",
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": null,
"attributes": null
}
|
|
astrapy.cursors._LookAheadIterator.preread_exhausted
|
{
"kind": "attribute",
"name": "preread_exhausted",
"path": "astrapy.cursors._LookAheadIterator.preread_exhausted",
"parameters": null,
"returns": null,
"gathered_types": null,
"value": "preread_exhausted = False",
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": null,
"attributes": null
}
|
|
astrapy.cursors._LookAheadIterator.preread
|
{
"kind": "function",
"name": "preread",
"path": "astrapy.cursors._LookAheadIterator.preread",
"parameters": null,
"returns": [
{
"name": null,
"type": "None",
"description": null
}
],
"gathered_types": null,
"value": null,
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": null,
"attributes": null
}
|
|
astrapy.cursors._AsyncLookAheadIterator.async_iterator
|
{
"kind": "attribute",
"name": "async_iterator",
"path": "astrapy.cursors._AsyncLookAheadIterator.async_iterator",
"parameters": null,
"returns": null,
"gathered_types": null,
"value": "async_iterator = async_iterator",
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": null,
"attributes": null
}
|
|
astrapy.cursors._AsyncLookAheadIterator.preread_item
|
{
"kind": "attribute",
"name": "preread_item",
"path": "astrapy.cursors._AsyncLookAheadIterator.preread_item",
"parameters": null,
"returns": null,
"gathered_types": [
"astrapy.constants.DocumentType"
],
"value": "preread_item: DocumentType | None = None",
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": null,
"attributes": null
}
|
|
astrapy.cursors._AsyncLookAheadIterator.has_preread
|
{
"kind": "attribute",
"name": "has_preread",
"path": "astrapy.cursors._AsyncLookAheadIterator.has_preread",
"parameters": null,
"returns": null,
"gathered_types": null,
"value": "has_preread = False",
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": null,
"attributes": null
}
|
|
astrapy.cursors._AsyncLookAheadIterator.preread_exhausted
|
{
"kind": "attribute",
"name": "preread_exhausted",
"path": "astrapy.cursors._AsyncLookAheadIterator.preread_exhausted",
"parameters": null,
"returns": null,
"gathered_types": null,
"value": "preread_exhausted = False",
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": null,
"attributes": null
}
|
|
astrapy.cursors._AsyncLookAheadIterator.preread
|
{
"kind": "function",
"name": "preread",
"path": "astrapy.cursors._AsyncLookAheadIterator.preread",
"parameters": null,
"returns": [
{
"name": null,
"type": "None",
"description": null
}
],
"gathered_types": null,
"value": null,
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": null,
"attributes": null
}
|
|
astrapy.cursors.BaseCursor
|
Represents a generic Cursor over query results, regardless of whether
synchronous or asynchronous. It cannot be instantiated.
See classes Cursor and AsyncCursor for more information.
|
{
"kind": "class",
"name": "BaseCursor",
"path": "astrapy.cursors.BaseCursor",
"parameters": [
{
"name": "collection",
"type": "Collection | AsyncCollection",
"description": null,
"default": null,
"value": null
},
{
"name": "filter",
"type": "dict[str, Any] | None",
"description": null,
"default": null,
"value": null
},
{
"name": "projection",
"type": "ProjectionType | None",
"description": null,
"default": null,
"value": null
},
{
"name": "max_time_ms",
"type": "int | None",
"description": null,
"default": null,
"value": null
},
{
"name": "overall_max_time_ms",
"type": "int | None",
"description": null,
"default": null,
"value": null
}
],
"returns": null,
"gathered_types": [
"astrapy.constants.ProjectionType",
"astrapy.collection.AsyncCollection"
],
"value": null,
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": null,
"attributes": null
}
|
astrapy.cursors.BaseCursor.state
|
The current state of this cursor, which can be one of
the astrapy.cursors.CursorState enum.
|
{
"kind": "attribute",
"name": "state",
"path": "astrapy.cursors.BaseCursor.state",
"parameters": null,
"returns": null,
"gathered_types": null,
"value": "state: str",
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": null,
"attributes": null
}
|
astrapy.cursors.BaseCursor.address
|
The API endpoint used by this cursor when issuing
requests to the database.
|
{
"kind": "attribute",
"name": "address",
"path": "astrapy.cursors.BaseCursor.address",
"parameters": null,
"returns": null,
"gathered_types": null,
"value": "address: str",
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": null,
"attributes": null
}
|
astrapy.cursors.BaseCursor.alive
|
Whether the cursor has the potential to yield more data.
|
{
"kind": "attribute",
"name": "alive",
"path": "astrapy.cursors.BaseCursor.alive",
"parameters": null,
"returns": null,
"gathered_types": null,
"value": "alive: bool",
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": null,
"attributes": null
}
|
astrapy.cursors.BaseCursor.clone
|
Clone the cursor into a new, fresh one.
|
{
"kind": "function",
"name": "clone",
"path": "astrapy.cursors.BaseCursor.clone",
"parameters": null,
"returns": [
{
"name": null,
"type": "BC",
"description": "a copy of this cursor, reset to its pristine state,"
},
{
"name": null,
"type": "BC",
"description": "i.e. fully un-consumed."
}
],
"gathered_types": [
"BC"
],
"value": null,
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": null,
"attributes": null
}
|
astrapy.cursors.BaseCursor.close
|
Stop/kill the cursor, regardless of its status.
|
{
"kind": "function",
"name": "close",
"path": "astrapy.cursors.BaseCursor.close",
"parameters": null,
"returns": [
{
"name": null,
"type": "None",
"description": null
}
],
"gathered_types": null,
"value": null,
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": null,
"attributes": null
}
|
astrapy.cursors.BaseCursor.cursor_id
|
An integer uniquely identifying this cursor.
|
{
"kind": "attribute",
"name": "cursor_id",
"path": "astrapy.cursors.BaseCursor.cursor_id",
"parameters": null,
"returns": null,
"gathered_types": null,
"value": "cursor_id: int",
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": null,
"attributes": null
}
|
astrapy.cursors.BaseCursor.limit
|
Set a new `limit` value for this cursor.
|
{
"kind": "function",
"name": "limit",
"path": "astrapy.cursors.BaseCursor.limit",
"parameters": [
{
"name": "limit",
"type": "int | None",
"description": "the new value to set",
"default": null,
"value": null
}
],
"returns": [
{
"name": null,
"type": "BC",
"description": "this cursor itself."
}
],
"gathered_types": [
"BC"
],
"value": null,
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": null,
"attributes": null
}
|
astrapy.cursors.BaseCursor.include_similarity
|
Set a new `include_similarity` value for this cursor.
|
{
"kind": "function",
"name": "include_similarity",
"path": "astrapy.cursors.BaseCursor.include_similarity",
"parameters": [
{
"name": "include_similarity",
"type": "bool | None",
"description": "the new value to set",
"default": null,
"value": null
}
],
"returns": [
{
"name": null,
"type": "BC",
"description": "this cursor itself."
}
],
"gathered_types": [
"BC"
],
"value": null,
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": null,
"attributes": null
}
|
astrapy.cursors.BaseCursor.include_sort_vector
|
Set a new `include_sort_vector` value for this cursor.
|
{
"kind": "function",
"name": "include_sort_vector",
"path": "astrapy.cursors.BaseCursor.include_sort_vector",
"parameters": [
{
"name": "include_sort_vector",
"type": "bool | None",
"description": "the new value to set",
"default": null,
"value": null
}
],
"returns": [
{
"name": null,
"type": "BC",
"description": "this cursor itself."
}
],
"gathered_types": [
"BC"
],
"value": null,
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": null,
"attributes": null
}
|
astrapy.cursors.BaseCursor.retrieved
|
The number of documents consumed so far (by the code consuming the cursor).
|
{
"kind": "attribute",
"name": "retrieved",
"path": "astrapy.cursors.BaseCursor.retrieved",
"parameters": null,
"returns": null,
"gathered_types": null,
"value": "retrieved: int",
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": null,
"attributes": null
}
|
astrapy.cursors.BaseCursor.consumed
|
The number of documents consumed so far (by the code consuming the cursor).
|
{
"kind": "attribute",
"name": "consumed",
"path": "astrapy.cursors.BaseCursor.consumed",
"parameters": null,
"returns": null,
"gathered_types": null,
"value": "consumed: int",
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": null,
"attributes": null
}
|
astrapy.cursors.BaseCursor.rewind
|
Reset the cursor to its pristine state, i.e. fully unconsumed.
|
{
"kind": "function",
"name": "rewind",
"path": "astrapy.cursors.BaseCursor.rewind",
"parameters": null,
"returns": [
{
"name": null,
"type": "BC",
"description": "this cursor itself."
}
],
"gathered_types": [
"BC"
],
"value": null,
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": null,
"attributes": null
}
|
astrapy.cursors.BaseCursor.skip
|
Set a new `skip` value for this cursor.
|
{
"kind": "function",
"name": "skip",
"path": "astrapy.cursors.BaseCursor.skip",
"parameters": [
{
"name": "skip",
"type": "int | None",
"description": "the new value to set",
"default": null,
"value": null
}
],
"returns": [
{
"name": null,
"type": "BC",
"description": "this cursor itself."
}
],
"gathered_types": [
"BC"
],
"value": null,
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,
"references": null,
"note": "This parameter can be used only in conjunction with an explicit\n`sort` criterion of the ascending/descending type (i.e. it cannot\nbe used when not sorting, nor with vector-based ANN search).",
"implemented_by": null,
"attributes": null
}
|
astrapy.cursors.BaseCursor.sort
|
Set a new `sort` value for this cursor.
|
{
"kind": "function",
"name": "sort",
"path": "astrapy.cursors.BaseCursor.sort",
"parameters": [
{
"name": "sort",
"type": "dict[str, Any] | None",
"description": "the new sorting prescription to set",
"default": null,
"value": null
}
],
"returns": [
{
"name": null,
"type": "BC",
"description": "this cursor itself."
}
],
"gathered_types": [
"BC"
],
"value": null,
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,
"references": null,
"note": "Some combinations of arguments impose an implicit upper bound on the\nnumber of documents that are returned by the Data API. More specifically:\n(a) Vector ANN searches cannot return more than a number of documents\nthat at the time of writing is set to 1000 items.\n(b) When using a sort criterion of the ascending/descending type,\nthe Data API will return a smaller number of documents, set to 20\nat the time of writing, and stop there. The returned documents are\nthe top results across the whole collection according to the requested\ncriterion.\nThese provisions should be kept in mind even when subsequently running\na command such as `.distinct()` on a cursor.",
"implemented_by": null,
"attributes": null
}
|
astrapy.cursors.Cursor
|
Represents a (synchronous) cursor over documents in a collection.
A cursor is iterated over, e.g. with a for loop, and keeps track of
its progress.
Generally cursors are not supposed to be instantiated directly,
rather they are obtained by invoking the `find` method on a collection.
|
{
"kind": "class",
"name": "Cursor",
"path": "astrapy.cursors.Cursor",
"parameters": [
{
"name": "collection",
"type": "Collection",
"description": null,
"default": null,
"value": null
},
{
"name": "filter",
"type": "dict[str, Any] | None",
"description": null,
"default": null,
"value": null
},
{
"name": "projection",
"type": "ProjectionType | None",
"description": null,
"default": null,
"value": null
},
{
"name": "max_time_ms",
"type": "int | None",
"description": null,
"default": null,
"value": null
},
{
"name": "overall_max_time_ms",
"type": "int | None",
"description": null,
"default": null,
"value": null
}
],
"returns": null,
"gathered_types": [
"astrapy.constants.ProjectionType",
"BaseCursor"
],
"value": null,
"yields": null,
"imports": null,
"properties": null,
"bases": [
"BaseCursor"
],
"exports": null,
"example": null,
"references": null,
"note": "When not specifying sorting criteria at all (by vector or otherwise),\nthe cursor can scroll through an arbitrary number of documents as\nthe Data API and the client periodically exchange new chunks of documents.\nIt should be noted that the behavior of the cursor in the case documents\nhave been added/removed after the cursor was started depends on database\ninternals and it is not guaranteed, nor excluded, that such \"real-time\"\nchanges in the data would be picked up by the cursor.",
"implemented_by": null,
"attributes": [
{
"name": "collection",
"type": "Collection",
"description": "the collection to find documents in\nfilter: a predicate expressed as a dictionary according to the\n Data API filter syntax. Examples are:\n {}\n {\"name\": \"John\"}\n {\"price\": {\"$le\": 100}}\n {\"$and\": [{\"name\": \"John\"}, {\"price\": {\"$le\": 100}}]}\n See the Data API documentation for the full set of operators.\nprojection: used to select a subset of fields in the document being\n returned. The projection can be: an iterable over the field names\n to return; a dictionary {field_name: True} to positively select\n certain fields; or a dictionary {field_name: False} if one wants\n to discard some fields from the response.\n The default is to return the whole documents.\nmax_time_ms: a timeout, in milliseconds, for each single one\n of the underlying HTTP requests used to fetch documents as the\n cursor is iterated over."
}
]
}
|
astrapy.cursors.Cursor.get_sort_vector
|
Return the vector used in this ANN search, if applicable.
If this is not an ANN search, or it was invoked without the
`include_sort_vector` parameter, return None.
Invoking this method on a pristine cursor will trigger an API call
to get the first page of results.
|
{
"kind": "function",
"name": "get_sort_vector",
"path": "astrapy.cursors.Cursor.get_sort_vector",
"parameters": null,
"returns": [
{
"name": null,
"type": "list[float] | None",
"description": null
}
],
"gathered_types": null,
"value": null,
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": null,
"attributes": null
}
|
astrapy.cursors.Cursor.collection
|
The (synchronous) collection this cursor is targeting.
|
{
"kind": "attribute",
"name": "collection",
"path": "astrapy.cursors.Cursor.collection",
"parameters": null,
"returns": null,
"gathered_types": null,
"value": "collection: Collection",
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": null,
"attributes": null
}
|
astrapy.cursors.Cursor.data_source
|
The (synchronous) collection this cursor is targeting.
|
{
"kind": "attribute",
"name": "data_source",
"path": "astrapy.cursors.Cursor.data_source",
"parameters": null,
"returns": null,
"gathered_types": null,
"value": "data_source: Collection",
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": null,
"attributes": null
}
|
astrapy.cursors.Cursor.distinct
|
Compute a list of unique values for a specific field across all
documents the cursor iterates through.
Invoking this method has no effect on the cursor state, i.e.
the position of the cursor is unchanged.
|
{
"kind": "function",
"name": "distinct",
"path": "astrapy.cursors.Cursor.distinct",
"parameters": [
{
"name": "key",
"type": "str",
"description": "the name of the field whose value is inspected across documents.\nKeys can use dot-notation to descend to deeper document levels.\nExample of acceptable `key` values:\n \"field\"\n \"field.subfield\"\n \"field.3\"\n \"field.3.subfield\"\nif lists are encountered and no numeric index is specified,\nall items in the list are visited.",
"default": null,
"value": null
},
{
"name": "max_time_ms",
"type": "int | None",
"description": "a timeout, in milliseconds, for the operation.",
"default": "None",
"value": "None"
}
],
"returns": [
{
"name": null,
"type": "list[Any]",
"description": null
}
],
"gathered_types": null,
"value": null,
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,
"references": null,
"note": "this operation works at client-side by scrolling through all\ndocuments matching the cursor parameters (such as `filter`).\nPlease be aware of this fact, especially for a very large\namount of documents, for this may have implications on latency,\nnetwork traffic and possibly billing.",
"implemented_by": null,
"attributes": null
}
|
astrapy.cursors.AsyncCursor
|
Represents a (asynchronous) cursor over documents in a collection.
An asynchronous cursor is iterated over, e.g. with a for loop,
and keeps track of its progress.
Generally cursors are not supposed to be instantiated directly,
rather they are obtained by invoking the `find` method on a collection.
|
{
"kind": "class",
"name": "AsyncCursor",
"path": "astrapy.cursors.AsyncCursor",
"parameters": [
{
"name": "collection",
"type": "AsyncCollection",
"description": null,
"default": null,
"value": null
},
{
"name": "filter",
"type": "dict[str, Any] | None",
"description": null,
"default": null,
"value": null
},
{
"name": "projection",
"type": "ProjectionType | None",
"description": null,
"default": null,
"value": null
},
{
"name": "max_time_ms",
"type": "int | None",
"description": null,
"default": null,
"value": null
},
{
"name": "overall_max_time_ms",
"type": "int | None",
"description": null,
"default": null,
"value": null
}
],
"returns": null,
"gathered_types": [
"astrapy.constants.ProjectionType",
"astrapy.collection.AsyncCollection",
"BaseCursor"
],
"value": null,
"yields": null,
"imports": null,
"properties": null,
"bases": [
"BaseCursor"
],
"exports": null,
"example": null,
"references": null,
"note": "When not specifying sorting criteria at all (by vector or otherwise),\nthe cursor can scroll through an arbitrary number of documents as\nthe Data API and the client periodically exchange new chunks of documents.\nIt should be noted that the behavior of the cursor in the case documents\nhave been added/removed after the cursor was started depends on database\ninternals and it is not guaranteed, nor excluded, that such \"real-time\"\nchanges in the data would be picked up by the cursor.",
"implemented_by": null,
"attributes": [
{
"name": "collection",
"type": "AsyncCollection",
"description": "the collection to find documents in\nfilter: a predicate expressed as a dictionary according to the\n Data API filter syntax. Examples are:\n {}\n {\"name\": \"John\"}\n {\"price\": {\"$le\": 100}}\n {\"$and\": [{\"name\": \"John\"}, {\"price\": {\"$le\": 100}}]}\n See the Data API documentation for the full set of operators.\nprojection: used to select a subset of fields in the document being\n returned. The projection can be: an iterable over the field names\n to return; a dictionary {field_name: True} to positively select\n certain fields; or a dictionary {field_name: False} if one wants\n to discard some fields from the response.\n The default is to return the whole documents.\nmax_time_ms: a timeout, in milliseconds, for each single one\n of the underlying HTTP requests used to fetch documents as the\n cursor is iterated over."
}
]
}
|
astrapy.cursors.AsyncCursor.get_sort_vector
|
Return the vector used in this ANN search, if applicable.
If this is not an ANN search, or it was invoked without the
`include_sort_vector` parameter, return None.
Invoking this method on a pristine cursor will trigger an API call
to get the first page of results.
|
{
"kind": "function",
"name": "get_sort_vector",
"path": "astrapy.cursors.AsyncCursor.get_sort_vector",
"parameters": null,
"returns": [
{
"name": null,
"type": "list[float] | None",
"description": null
}
],
"gathered_types": null,
"value": null,
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": null,
"attributes": null
}
|
astrapy.cursors.AsyncCursor.collection
|
The (asynchronous) collection this cursor is targeting.
|
{
"kind": "attribute",
"name": "collection",
"path": "astrapy.cursors.AsyncCursor.collection",
"parameters": null,
"returns": null,
"gathered_types": [
"astrapy.collection.AsyncCollection"
],
"value": "collection: AsyncCollection",
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": null,
"attributes": null
}
|
astrapy.cursors.AsyncCursor.data_source
|
The (asynchronous) collection this cursor is targeting.
|
{
"kind": "attribute",
"name": "data_source",
"path": "astrapy.cursors.AsyncCursor.data_source",
"parameters": null,
"returns": null,
"gathered_types": [
"astrapy.collection.AsyncCollection"
],
"value": "data_source: AsyncCollection",
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": null,
"attributes": null
}
|
astrapy.cursors.AsyncCursor.distinct
|
Compute a list of unique values for a specific field across all
documents the cursor iterates through.
Invoking this method has no effect on the cursor state, i.e.
the position of the cursor is unchanged.
|
{
"kind": "function",
"name": "distinct",
"path": "astrapy.cursors.AsyncCursor.distinct",
"parameters": [
{
"name": "key",
"type": "str",
"description": "the name of the field whose value is inspected across documents.\nKeys can use dot-notation to descend to deeper document levels.\nExample of acceptable `key` values:\n \"field\"\n \"field.subfield\"\n \"field.3\"\n \"field.3.subfield\"\nif lists are encountered and no numeric index is specified,\nall items in the list are visited.",
"default": null,
"value": null
},
{
"name": "max_time_ms",
"type": "int | None",
"description": "a timeout, in milliseconds, for the operation.",
"default": "None",
"value": "None"
}
],
"returns": [
{
"name": null,
"type": "list[Any]",
"description": null
}
],
"gathered_types": null,
"value": null,
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,
"references": null,
"note": "this operation works at client-side by scrolling through all\ndocuments matching the cursor parameters (such as `filter`).\nPlease be aware of this fact, especially for a very large\namount of documents, for this may have implications on latency,\nnetwork traffic and possibly billing.",
"implemented_by": null,
"attributes": null
}
|
astrapy.cursors.CommandCursor
|
A (synchronous) cursor over the results of a Data API command
(as opposed to a cursor over data as one would get with a `find` method).
Command cursors are iterated over, e.g. with a for loop.
Generally command cursors are not supposed to be instantiated directly,
rather they are obtained by invoking methods on a collection/database
(such as the database `list_collections` method).
|
{
"kind": "class",
"name": "CommandCursor",
"path": "astrapy.cursors.CommandCursor",
"parameters": [
{
"name": "address",
"type": "str",
"description": null,
"default": null,
"value": null
},
{
"name": "items",
"type": "list[T]",
"description": null,
"default": null,
"value": null
}
],
"returns": null,
"gathered_types": null,
"value": null,
"yields": null,
"imports": null,
"properties": null,
"bases": [
"Generic[T]"
],
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": null,
"attributes": null
}
|
astrapy.cursors.CommandCursor.items
|
{
"kind": "attribute",
"name": "items",
"path": "astrapy.cursors.CommandCursor.items",
"parameters": null,
"returns": null,
"gathered_types": null,
"value": "items = items",
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": null,
"attributes": null
}
|
|
astrapy.cursors.CommandCursor.iterable
|
{
"kind": "attribute",
"name": "iterable",
"path": "astrapy.cursors.CommandCursor.iterable",
"parameters": null,
"returns": null,
"gathered_types": [
"__iter__"
],
"value": "iterable = items.__iter__()",
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": null,
"attributes": null
}
|
|
astrapy.cursors.CommandCursor.state
|
The current state of this cursor, which can be:
- "alive": the cursor has still the potential to return items.
- "exhausted": the cursor has finished and won't return documents
|
{
"kind": "attribute",
"name": "state",
"path": "astrapy.cursors.CommandCursor.state",
"parameters": null,
"returns": null,
"gathered_types": null,
"value": "state: str",
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": null,
"attributes": null
}
|
astrapy.cursors.CommandCursor.address
|
The API endpoint used by this cursor when issuing
requests to the database.
|
{
"kind": "attribute",
"name": "address",
"path": "astrapy.cursors.CommandCursor.address",
"parameters": null,
"returns": null,
"gathered_types": null,
"value": "address: str",
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": null,
"attributes": null
}
|
astrapy.cursors.CommandCursor.alive
|
Whether the cursor has the potential to yield more data.
|
{
"kind": "attribute",
"name": "alive",
"path": "astrapy.cursors.CommandCursor.alive",
"parameters": null,
"returns": null,
"gathered_types": null,
"value": "alive: bool",
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": null,
"attributes": null
}
|
astrapy.cursors.CommandCursor.cursor_id
|
An integer uniquely identifying this cursor.
|
{
"kind": "attribute",
"name": "cursor_id",
"path": "astrapy.cursors.CommandCursor.cursor_id",
"parameters": null,
"returns": null,
"gathered_types": null,
"value": "cursor_id: int",
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": null,
"attributes": null
}
|
astrapy.cursors.CommandCursor.close
|
Stop/kill the cursor, regardless of its status.
|
{
"kind": "function",
"name": "close",
"path": "astrapy.cursors.CommandCursor.close",
"parameters": null,
"returns": [
{
"name": null,
"type": "None",
"description": null
}
],
"gathered_types": null,
"value": null,
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": null,
"attributes": null
}
|
astrapy.cursors.AsyncCommandCursor
|
A (asynchronous) cursor over the results of a Data API command
(as opposed to a cursor over data as one would get with a `find` method).
Asynchronous command cursors are iterated over, e.g. with an async for loop.
Generally command cursors are not supposed to be instantiated directly,
rather they are obtained by invoking methods on a collection/database
(such as the database `list_collections` method).
|
{
"kind": "class",
"name": "AsyncCommandCursor",
"path": "astrapy.cursors.AsyncCommandCursor",
"parameters": [
{
"name": "address",
"type": "str",
"description": null,
"default": null,
"value": null
},
{
"name": "items",
"type": "list[T]",
"description": null,
"default": null,
"value": null
}
],
"returns": null,
"gathered_types": null,
"value": null,
"yields": null,
"imports": null,
"properties": null,
"bases": [
"Generic[T]"
],
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": null,
"attributes": null
}
|
astrapy.cursors.AsyncCommandCursor.items
|
{
"kind": "attribute",
"name": "items",
"path": "astrapy.cursors.AsyncCommandCursor.items",
"parameters": null,
"returns": null,
"gathered_types": null,
"value": "items = items",
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": null,
"attributes": null
}
|
|
astrapy.cursors.AsyncCommandCursor.iterable
|
{
"kind": "attribute",
"name": "iterable",
"path": "astrapy.cursors.AsyncCommandCursor.iterable",
"parameters": null,
"returns": null,
"gathered_types": [
"__iter__"
],
"value": "iterable = items.__iter__()",
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": null,
"attributes": null
}
|
|
astrapy.cursors.AsyncCommandCursor.state
|
The current state of this cursor, which can be:
- "alive": the cursor has still the potential to return items.
- "exhausted": the cursor has finished and won't return documents
|
{
"kind": "attribute",
"name": "state",
"path": "astrapy.cursors.AsyncCommandCursor.state",
"parameters": null,
"returns": null,
"gathered_types": null,
"value": "state: str",
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": null,
"attributes": null
}
|
astrapy.cursors.AsyncCommandCursor.address
|
The API endpoint used by this cursor when issuing
requests to the database.
|
{
"kind": "attribute",
"name": "address",
"path": "astrapy.cursors.AsyncCommandCursor.address",
"parameters": null,
"returns": null,
"gathered_types": null,
"value": "address: str",
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": null,
"attributes": null
}
|
astrapy.cursors.AsyncCommandCursor.alive
|
Whether the cursor has the potential to yield more data.
|
{
"kind": "attribute",
"name": "alive",
"path": "astrapy.cursors.AsyncCommandCursor.alive",
"parameters": null,
"returns": null,
"gathered_types": null,
"value": "alive: bool",
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": null,
"attributes": null
}
|
astrapy.cursors.AsyncCommandCursor.cursor_id
|
An integer uniquely identifying this cursor.
|
{
"kind": "attribute",
"name": "cursor_id",
"path": "astrapy.cursors.AsyncCommandCursor.cursor_id",
"parameters": null,
"returns": null,
"gathered_types": null,
"value": "cursor_id: int",
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": null,
"attributes": null
}
|
astrapy.cursors.AsyncCommandCursor.close
|
Stop/kill the cursor, regardless of its status.
|
{
"kind": "function",
"name": "close",
"path": "astrapy.cursors.AsyncCommandCursor.close",
"parameters": null,
"returns": [
{
"name": null,
"type": "None",
"description": null
}
],
"gathered_types": null,
"value": null,
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": null,
"attributes": null
}
|
astrapy.constants
|
{
"kind": "module",
"name": "constants",
"path": "astrapy.constants",
"parameters": null,
"returns": null,
"gathered_types": null,
"value": null,
"yields": null,
"imports": {
"annotations": "__future__.annotations",
"logging": null,
"Any": "typing.Any",
"cast": null,
"httpx": null,
"API_RESPONSE": null,
"amake_request": null,
"make_request": null,
"TypedDict": null,
"APIRequestError": null,
"api_request": null,
"async_api_request": null,
"async_raw_api_request": null,
"raw_api_request": null,
"OPS_API_RESPONSE": null,
"DEFAULT_DEV_OPS_API_VERSION": null,
"DEFAULT_DEV_OPS_AUTH_HEADER": null,
"DEFAULT_DEV_OPS_URL": null,
"TimeoutInfoWideType": null,
"http_methods": null,
"to_httpx_timeout": null,
"Dict": "typing.Dict",
"List": null,
"Protocol": null,
"Union": "typing.Union",
"datetime": null,
"json": null,
"time": null,
"Iterable": "typing.Iterable",
"__version__": null,
"DEFAULT_REDACTED_HEADERS": null,
"DEFAULT_TIMEOUT": null,
"UUID": null,
"ObjectId": null,
"uuid1": null,
"uuid3": null,
"uuid4": null,
"uuid5": null,
"uuid6": null,
"uuid7": null,
"uuid8": null,
"AstraDB": null,
"AstraDBCollection": null,
"AsyncAstraDB": null,
"AsyncAstraDBCollection": null,
"logger": null,
"AstraDBOps": null,
"asyncio": null,
"warnings": null,
"ThreadPoolExecutor": null,
"TracebackType": null,
"TYPE_CHECKING": null,
"Sequence": null,
"deprecation": null,
"APICommander": null,
"CollectionAPIOptions": null,
"coerce_embedding_headers_provider": null,
"CallerType": null,
"DocumentType": null,
"FilterType": null,
"ProjectionType": null,
"ReturnDocument": null,
"SortType": null,
"VectorType": null,
"normalize_optional_projection": null,
"AsyncCursor": null,
"Cursor": null,
"AsyncDatabase": null,
"Database": null,
"DEFAULT_BULK_WRITE_CONCURRENCY": null,
"DEFAULT_DATA_API_AUTH_HEADER": null,
"DEFAULT_INSERT_MANY_CHUNK_SIZE": null,
"DEFAULT_INSERT_MANY_CONCURRENCY": null,
"NAMESPACE_DEPRECATION_NOTICE_METHOD": null,
"SET_CALLER_DEPRECATION_NOTICE": null,
"BulkWriteException": null,
"CollectionNotFoundException": null,
"CumulativeOperationException": null,
"DataAPIFaultyResponseException": null,
"DataAPIResponseException": null,
"DeleteManyException": null,
"InsertManyException": null,
"MultiCallTimeoutManager": null,
"TooManyDocumentsToCountException": null,
"UpdateManyException": null,
"base_timeout_info": null,
"CollectionInfo": null,
"CollectionOptions": null,
"check_caller_parameters": null,
"check_deprecated_vector_ize": null,
"check_namespace_keyspace": null,
"BulkWriteResult": null,
"DeleteResult": null,
"InsertManyResult": null,
"InsertOneResult": null,
"UpdateResult": null,
"EmbeddingHeadersProvider": null,
"AsyncBaseOperation": null,
"BaseOperation": null,
"dataclass": null,
"TimeoutInfo": null,
"OperationResult": null,
"DEFAULT_REDACTED_HEADER_NAMES": null,
"DEFAULT_REQUEST_TIMEOUT_MS": null,
"HEADER_REDACT_PLACEHOLDER": null,
"DataAPIHttpException": null,
"DevOpsAPIFaultyResponseException": null,
"DevOpsAPIHttpException": null,
"DevOpsAPIResponseException": null,
"to_dataapi_timeout_exception": null,
"to_devopsapi_timeout_exception": null,
"HttpMethod": null,
"log_httpx_request": null,
"log_httpx_response": null,
"normalize_for_api": null,
"restore_from_api": null,
"compose_full_user_agent": null,
"detect_astrapy_user_agent": null,
"DeprecatedWarning": null,
"CALLER_NAME_VERSION_DEPRECATION_NOTICE_DETAILS": null,
"NAMESPACE_DEPRECATION_NOTICE_NS_DETAILS": null,
"NAMESPACE_DEPRECATION_NOTICE_NS_SUBJECT": null,
"NAMESPACE_DEPRECATION_NOTICE_UPDATEDBNS_DETAILS": null,
"NAMESPACE_DEPRECATION_NOTICE_UPDATEDBNS_SUBJECT": null,
"inspect": null,
"queue": null,
"threading": null,
"weakref": null,
"AsyncGenerator": null,
"AsyncIterator": null,
"partial": null,
"Callable": null,
"Iterator": null,
"API_DOC": null,
"AsyncPaginableRequestMethod": null,
"PaginableRequestMethod": null,
"DEFAULT_AUTH_HEADER": null,
"DEFAULT_INSERT_NUM_DOCUMENTS": null,
"DEFAULT_JSON_API_PATH": null,
"DEFAULT_JSON_API_VERSION": null,
"DEFAULT_KEYSPACE_NAME": null,
"convert_vector_to_floats": null,
"make_payload": null,
"importlib": null,
"os": null,
"toml": null,
"astrapy": null,
"AstraDBAdmin": null,
"AstraDBDatabaseAdmin": null,
"DataAPIDatabaseAdmin": null,
"DataAPIClient": null,
"AsyncCollection": null,
"Collection": null,
"field": null,
"TypeVar": null,
"EmbeddingAPIKeyHeaderProvider": null,
"ABC": null,
"abstractmethod": null,
"fetch_database_info": null,
"parse_api_endpoint": null,
"coerce_token_provider": null,
"redact_secret": null,
"Environment": null,
"AsyncCommandCursor": null,
"CommandCursor": null,
"API_PATH_ENV_MAP": null,
"API_VERSION_ENV_MAP": null,
"DEFAULT_ASTRA_DB_KEYSPACE": null,
"CollectionAlreadyExistsException": null,
"DevOpsAPIException": null,
"CollectionDescriptor": null,
"CollectionVectorServiceOptions": null,
"DatabaseInfo": null,
"DatabaseAdmin": null,
"TokenProvider": null,
"api_endpoint_parsing_error_message": null,
"build_api_endpoint": null,
"check_id_endpoint_parg_kwargs": null,
"generic_api_url_parsing_error_message": null,
"normalize_region_for_id": null,
"parse_generic_api_url": null,
"check_deprecated_id_region": null,
"hashlib": null,
"Enum": null,
"Generic": null,
"Optional": null,
"Tuple": "typing.Tuple",
"CursorIsStartedException": null,
"DataAPITimeoutException": null,
"normalize_payload_value": null,
"DATA_API_ENVIRONMENT_CASSANDRA": "astrapy.defaults.DATA_API_ENVIRONMENT_CASSANDRA",
"DATA_API_ENVIRONMENT_DEV": "astrapy.defaults.DATA_API_ENVIRONMENT_DEV",
"DATA_API_ENVIRONMENT_DSE": "astrapy.defaults.DATA_API_ENVIRONMENT_DSE",
"DATA_API_ENVIRONMENT_HCD": "astrapy.defaults.DATA_API_ENVIRONMENT_HCD",
"DATA_API_ENVIRONMENT_OTHER": "astrapy.defaults.DATA_API_ENVIRONMENT_OTHER",
"DATA_API_ENVIRONMENT_PROD": "astrapy.defaults.DATA_API_ENVIRONMENT_PROD",
"DATA_API_ENVIRONMENT_TEST": "astrapy.defaults.DATA_API_ENVIRONMENT_TEST",
"reduce": null,
"re": null,
"API_ENDPOINT_TEMPLATE_ENV_MAP": null,
"DEFAULT_DEV_OPS_AUTH_PREFIX": null,
"DEV_OPS_DATABASE_POLL_INTERVAL_S": null,
"DEV_OPS_DATABASE_STATUS_ACTIVE": null,
"DEV_OPS_DATABASE_STATUS_INITIALIZING": null,
"DEV_OPS_DATABASE_STATUS_MAINTENANCE": null,
"DEV_OPS_DATABASE_STATUS_PENDING": null,
"DEV_OPS_DATABASE_STATUS_TERMINATING": null,
"DEV_OPS_DEFAULT_DATABASES_PAGE_SIZE": null,
"DEV_OPS_KEYSPACE_POLL_INTERVAL_S": null,
"DEV_OPS_RESPONSE_HTTP_ACCEPTED": null,
"DEV_OPS_RESPONSE_HTTP_CREATED": null,
"DEV_OPS_URL_ENV_MAP": null,
"DEV_OPS_VERSION_ENV_MAP": null,
"AdminDatabaseInfo": null,
"FindEmbeddingProvidersResult": null,
"check_update_db_namespace_keyspace": null,
"base64": null,
"EMBEDDING_HEADER_API_KEY": null,
"EMBEDDING_HEADER_AWS_ACCESS_ID": null,
"EMBEDDING_HEADER_AWS_SECRET_ID": null,
"SECRETS_REDACT_CHAR": null,
"SECRETS_REDACT_ENDING": null,
"SECRETS_REDACT_ENDING_LENGTH": null
},
"properties": {
"is_init_module": false,
"is_package": false,
"is_subpackage": false,
"is_namespace_package": false,
"is_namespace_subpackage": false
},
"bases": null,
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": null,
"attributes": null
}
|
|
astrapy.constants.DocumentType
|
{
"kind": "attribute",
"name": "DocumentType",
"path": "astrapy.constants.DocumentType",
"parameters": null,
"returns": null,
"gathered_types": null,
"value": "DocumentType = Dict[str, Any]",
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": null,
"attributes": null
}
|
|
astrapy.constants.ProjectionType
|
{
"kind": "attribute",
"name": "ProjectionType",
"path": "astrapy.constants.ProjectionType",
"parameters": null,
"returns": null,
"gathered_types": null,
"value": "ProjectionType = Union[Iterable[str], Dict[str, Union[bool, Dict[str, Union[int, Iterable[int]]]]]]",
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": null,
"attributes": null
}
|
|
astrapy.constants.SortType
|
{
"kind": "attribute",
"name": "SortType",
"path": "astrapy.constants.SortType",
"parameters": null,
"returns": null,
"gathered_types": null,
"value": "SortType = Dict[str, Any]",
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": null,
"attributes": null
}
|
|
astrapy.constants.FilterType
|
{
"kind": "attribute",
"name": "FilterType",
"path": "astrapy.constants.FilterType",
"parameters": null,
"returns": null,
"gathered_types": null,
"value": "FilterType = Dict[str, Any]",
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": null,
"attributes": null
}
|
|
astrapy.constants.VectorType
|
{
"kind": "attribute",
"name": "VectorType",
"path": "astrapy.constants.VectorType",
"parameters": null,
"returns": null,
"gathered_types": null,
"value": "VectorType = Iterable[float]",
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": null,
"attributes": null
}
|
|
astrapy.constants.CallerType
|
{
"kind": "attribute",
"name": "CallerType",
"path": "astrapy.constants.CallerType",
"parameters": null,
"returns": null,
"gathered_types": null,
"value": "CallerType = Tuple[Union[str, None], Union[str, None]]",
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": null,
"attributes": null
}
|
|
astrapy.constants.normalize_optional_projection
|
{
"kind": "function",
"name": "normalize_optional_projection",
"path": "astrapy.constants.normalize_optional_projection",
"parameters": [
{
"name": "projection",
"type": "ProjectionType | None",
"description": null,
"default": null,
"value": null
}
],
"returns": [
{
"name": null,
"type": "dict[str, bool | dict[str, int | Iterable[int]]] | None",
"description": null
}
],
"gathered_types": [
"astrapy.constants.ProjectionType"
],
"value": null,
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": null,
"attributes": null
}
|
|
astrapy.constants.ReturnDocument
|
Admitted values for the `return_document` parameter in
`find_one_and_replace` and `find_one_and_update` collection
methods.
|
{
"kind": "class",
"name": "ReturnDocument",
"path": "astrapy.constants.ReturnDocument",
"parameters": null,
"returns": null,
"gathered_types": null,
"value": null,
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": null,
"attributes": null
}
|
astrapy.constants.ReturnDocument.BEFORE
|
{
"kind": "attribute",
"name": "BEFORE",
"path": "astrapy.constants.ReturnDocument.BEFORE",
"parameters": null,
"returns": null,
"gathered_types": null,
"value": "BEFORE = 'before'",
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": null,
"attributes": null
}
|
|
astrapy.constants.ReturnDocument.AFTER
|
{
"kind": "attribute",
"name": "AFTER",
"path": "astrapy.constants.ReturnDocument.AFTER",
"parameters": null,
"returns": null,
"gathered_types": null,
"value": "AFTER = 'after'",
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": null,
"attributes": null
}
|
|
astrapy.constants.SortDocuments
|
Admitted values for the `sort` parameter in the find collection methods,
e.g. `sort={"field": SortDocuments.ASCENDING}`.
|
{
"kind": "class",
"name": "SortDocuments",
"path": "astrapy.constants.SortDocuments",
"parameters": null,
"returns": null,
"gathered_types": null,
"value": null,
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": null,
"attributes": null
}
|
astrapy.constants.SortDocuments.ASCENDING
|
{
"kind": "attribute",
"name": "ASCENDING",
"path": "astrapy.constants.SortDocuments.ASCENDING",
"parameters": null,
"returns": null,
"gathered_types": null,
"value": "ASCENDING = 1",
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": null,
"attributes": null
}
|
|
astrapy.constants.SortDocuments.DESCENDING
|
{
"kind": "attribute",
"name": "DESCENDING",
"path": "astrapy.constants.SortDocuments.DESCENDING",
"parameters": null,
"returns": null,
"gathered_types": null,
"value": "DESCENDING = -1",
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": null,
"attributes": null
}
|
|
astrapy.constants.VectorMetric
|
Admitted values for the "metric" parameter when creating vector collections
through the database `create_collection` method.
|
{
"kind": "class",
"name": "VectorMetric",
"path": "astrapy.constants.VectorMetric",
"parameters": null,
"returns": null,
"gathered_types": null,
"value": null,
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": null,
"attributes": null
}
|
astrapy.constants.VectorMetric.DOT_PRODUCT
|
{
"kind": "attribute",
"name": "DOT_PRODUCT",
"path": "astrapy.constants.VectorMetric.DOT_PRODUCT",
"parameters": null,
"returns": null,
"gathered_types": null,
"value": "DOT_PRODUCT = 'dot_product'",
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": null,
"attributes": null
}
|
|
astrapy.constants.VectorMetric.EUCLIDEAN
|
{
"kind": "attribute",
"name": "EUCLIDEAN",
"path": "astrapy.constants.VectorMetric.EUCLIDEAN",
"parameters": null,
"returns": null,
"gathered_types": null,
"value": "EUCLIDEAN = 'euclidean'",
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": null,
"attributes": null
}
|
|
astrapy.constants.VectorMetric.COSINE
|
{
"kind": "attribute",
"name": "COSINE",
"path": "astrapy.constants.VectorMetric.COSINE",
"parameters": null,
"returns": null,
"gathered_types": null,
"value": "COSINE = 'cosine'",
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": null,
"attributes": null
}
|
|
astrapy.constants.DefaultIdType
|
Admitted values for the "default_id_type" parameter when creating collections
through the database `create_collection` method.
|
{
"kind": "class",
"name": "DefaultIdType",
"path": "astrapy.constants.DefaultIdType",
"parameters": null,
"returns": null,
"gathered_types": null,
"value": null,
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": null,
"attributes": null
}
|
astrapy.constants.DefaultIdType.UUID
|
{
"kind": "attribute",
"name": "UUID",
"path": "astrapy.constants.DefaultIdType.UUID",
"parameters": null,
"returns": null,
"gathered_types": null,
"value": "UUID = 'uuid'",
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": null,
"attributes": null
}
|
|
astrapy.constants.DefaultIdType.OBJECTID
|
{
"kind": "attribute",
"name": "OBJECTID",
"path": "astrapy.constants.DefaultIdType.OBJECTID",
"parameters": null,
"returns": null,
"gathered_types": null,
"value": "OBJECTID = 'objectId'",
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": null,
"attributes": null
}
|
|
astrapy.constants.DefaultIdType.UUIDV6
|
{
"kind": "attribute",
"name": "UUIDV6",
"path": "astrapy.constants.DefaultIdType.UUIDV6",
"parameters": null,
"returns": null,
"gathered_types": null,
"value": "UUIDV6 = 'uuidv6'",
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": null,
"attributes": null
}
|
|
astrapy.constants.DefaultIdType.UUIDV7
|
{
"kind": "attribute",
"name": "UUIDV7",
"path": "astrapy.constants.DefaultIdType.UUIDV7",
"parameters": null,
"returns": null,
"gathered_types": null,
"value": "UUIDV7 = 'uuidv7'",
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": null,
"attributes": null
}
|
|
astrapy.constants.DefaultIdType.DEFAULT
|
{
"kind": "attribute",
"name": "DEFAULT",
"path": "astrapy.constants.DefaultIdType.DEFAULT",
"parameters": null,
"returns": null,
"gathered_types": null,
"value": "DEFAULT = 'uuid'",
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": null,
"attributes": null
}
|
|
astrapy.constants.Environment
|
Admitted values for `environment` property,
denoting the targeted API deployment type.
|
{
"kind": "class",
"name": "Environment",
"path": "astrapy.constants.Environment",
"parameters": null,
"returns": null,
"gathered_types": null,
"value": null,
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": null,
"attributes": null
}
|
astrapy.constants.Environment.PROD
|
{
"kind": "attribute",
"name": "PROD",
"path": "astrapy.constants.Environment.PROD",
"parameters": null,
"returns": null,
"gathered_types": [
"astrapy.defaults.DATA_API_ENVIRONMENT_PROD"
],
"value": "PROD = DATA_API_ENVIRONMENT_PROD",
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": null,
"attributes": null
}
|
|
astrapy.constants.Environment.DEV
|
{
"kind": "attribute",
"name": "DEV",
"path": "astrapy.constants.Environment.DEV",
"parameters": null,
"returns": null,
"gathered_types": [
"astrapy.defaults.DATA_API_ENVIRONMENT_DEV"
],
"value": "DEV = DATA_API_ENVIRONMENT_DEV",
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": null,
"attributes": null
}
|
|
astrapy.constants.Environment.TEST
|
{
"kind": "attribute",
"name": "TEST",
"path": "astrapy.constants.Environment.TEST",
"parameters": null,
"returns": null,
"gathered_types": [
"astrapy.defaults.DATA_API_ENVIRONMENT_TEST"
],
"value": "TEST = DATA_API_ENVIRONMENT_TEST",
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": null,
"attributes": null
}
|
|
astrapy.constants.Environment.DSE
|
{
"kind": "attribute",
"name": "DSE",
"path": "astrapy.constants.Environment.DSE",
"parameters": null,
"returns": null,
"gathered_types": [
"astrapy.defaults.DATA_API_ENVIRONMENT_DSE"
],
"value": "DSE = DATA_API_ENVIRONMENT_DSE",
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": null,
"attributes": null
}
|
|
astrapy.constants.Environment.HCD
|
{
"kind": "attribute",
"name": "HCD",
"path": "astrapy.constants.Environment.HCD",
"parameters": null,
"returns": null,
"gathered_types": [
"astrapy.defaults.DATA_API_ENVIRONMENT_HCD"
],
"value": "HCD = DATA_API_ENVIRONMENT_HCD",
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": null,
"attributes": null
}
|
|
astrapy.constants.Environment.CASSANDRA
|
{
"kind": "attribute",
"name": "CASSANDRA",
"path": "astrapy.constants.Environment.CASSANDRA",
"parameters": null,
"returns": null,
"gathered_types": [
"astrapy.defaults.DATA_API_ENVIRONMENT_CASSANDRA"
],
"value": "CASSANDRA = DATA_API_ENVIRONMENT_CASSANDRA",
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": null,
"attributes": null
}
|
|
astrapy.constants.Environment.OTHER
|
{
"kind": "attribute",
"name": "OTHER",
"path": "astrapy.constants.Environment.OTHER",
"parameters": null,
"returns": null,
"gathered_types": [
"astrapy.defaults.DATA_API_ENVIRONMENT_OTHER"
],
"value": "OTHER = DATA_API_ENVIRONMENT_OTHER",
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": null,
"attributes": null
}
|
|
astrapy.constants.Environment.values
|
{
"kind": "attribute",
"name": "values",
"path": "astrapy.constants.Environment.values",
"parameters": null,
"returns": null,
"gathered_types": [
"PROD",
"OTHER",
"DSE",
"DEV",
"HCD",
"TEST",
"CASSANDRA"
],
"value": "values = {PROD, DEV, TEST, DSE, HCD, CASSANDRA, OTHER}",
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": null,
"attributes": null
}
|
|
astrapy.constants.Environment.astra_db_values
|
{
"kind": "attribute",
"name": "astra_db_values",
"path": "astrapy.constants.Environment.astra_db_values",
"parameters": null,
"returns": null,
"gathered_types": [
"PROD",
"TEST",
"DEV"
],
"value": "astra_db_values = {PROD, DEV, TEST}",
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": null,
"attributes": null
}
|
|
astrapy.operations
|
{
"kind": "module",
"name": "operations",
"path": "astrapy.operations",
"parameters": null,
"returns": null,
"gathered_types": null,
"value": null,
"yields": null,
"imports": {
"annotations": "__future__.annotations",
"logging": null,
"Any": "typing.Any",
"cast": null,
"httpx": null,
"API_RESPONSE": null,
"amake_request": null,
"make_request": null,
"TypedDict": null,
"APIRequestError": null,
"api_request": null,
"async_api_request": null,
"async_raw_api_request": null,
"raw_api_request": null,
"OPS_API_RESPONSE": null,
"DEFAULT_DEV_OPS_API_VERSION": null,
"DEFAULT_DEV_OPS_AUTH_HEADER": null,
"DEFAULT_DEV_OPS_URL": null,
"TimeoutInfoWideType": null,
"http_methods": null,
"to_httpx_timeout": null,
"Dict": null,
"List": null,
"Protocol": null,
"Union": null,
"datetime": null,
"json": null,
"time": null,
"Iterable": "typing.Iterable",
"__version__": null,
"DEFAULT_REDACTED_HEADERS": null,
"DEFAULT_TIMEOUT": null,
"UUID": null,
"ObjectId": null,
"uuid1": null,
"uuid3": null,
"uuid4": null,
"uuid5": null,
"uuid6": null,
"uuid7": null,
"uuid8": null,
"AstraDB": null,
"AstraDBCollection": null,
"AsyncAstraDB": null,
"AsyncAstraDBCollection": null,
"logger": null,
"AstraDBOps": null,
"asyncio": null,
"warnings": null,
"ThreadPoolExecutor": null,
"TracebackType": null,
"TYPE_CHECKING": null,
"Sequence": null,
"deprecation": null,
"APICommander": null,
"CollectionAPIOptions": null,
"coerce_embedding_headers_provider": null,
"CallerType": null,
"DocumentType": "astrapy.constants.DocumentType",
"FilterType": null,
"ProjectionType": null,
"ReturnDocument": null,
"SortType": "astrapy.constants.SortType",
"VectorType": "astrapy.constants.VectorType",
"normalize_optional_projection": null,
"AsyncCursor": null,
"Cursor": null,
"AsyncDatabase": null,
"Database": null,
"DEFAULT_BULK_WRITE_CONCURRENCY": null,
"DEFAULT_DATA_API_AUTH_HEADER": null,
"DEFAULT_INSERT_MANY_CHUNK_SIZE": null,
"DEFAULT_INSERT_MANY_CONCURRENCY": null,
"NAMESPACE_DEPRECATION_NOTICE_METHOD": null,
"SET_CALLER_DEPRECATION_NOTICE": null,
"BulkWriteException": null,
"CollectionNotFoundException": null,
"CumulativeOperationException": null,
"DataAPIFaultyResponseException": null,
"DataAPIResponseException": null,
"DeleteManyException": null,
"InsertManyException": null,
"MultiCallTimeoutManager": null,
"TooManyDocumentsToCountException": null,
"UpdateManyException": null,
"base_timeout_info": null,
"CollectionInfo": null,
"CollectionOptions": null,
"check_caller_parameters": null,
"check_deprecated_vector_ize": "astrapy.meta.check_deprecated_vector_ize",
"check_namespace_keyspace": null,
"BulkWriteResult": "astrapy.results.BulkWriteResult",
"DeleteResult": "astrapy.results.DeleteResult",
"InsertManyResult": "astrapy.results.InsertManyResult",
"InsertOneResult": "astrapy.results.InsertOneResult",
"UpdateResult": "astrapy.results.UpdateResult",
"EmbeddingHeadersProvider": null,
"AsyncBaseOperation": null,
"BaseOperation": null,
"dataclass": "dataclasses.dataclass",
"TimeoutInfo": null,
"OperationResult": null,
"DEFAULT_REDACTED_HEADER_NAMES": null,
"DEFAULT_REQUEST_TIMEOUT_MS": null,
"HEADER_REDACT_PLACEHOLDER": null,
"DataAPIHttpException": null,
"DevOpsAPIFaultyResponseException": null,
"DevOpsAPIHttpException": null,
"DevOpsAPIResponseException": null,
"to_dataapi_timeout_exception": null,
"to_devopsapi_timeout_exception": null,
"HttpMethod": null,
"log_httpx_request": null,
"log_httpx_response": null,
"normalize_for_api": null,
"restore_from_api": null,
"compose_full_user_agent": null,
"detect_astrapy_user_agent": null,
"DeprecatedWarning": null,
"CALLER_NAME_VERSION_DEPRECATION_NOTICE_DETAILS": null,
"NAMESPACE_DEPRECATION_NOTICE_NS_DETAILS": null,
"NAMESPACE_DEPRECATION_NOTICE_NS_SUBJECT": null,
"NAMESPACE_DEPRECATION_NOTICE_UPDATEDBNS_DETAILS": null,
"NAMESPACE_DEPRECATION_NOTICE_UPDATEDBNS_SUBJECT": null,
"inspect": null,
"queue": null,
"threading": null,
"weakref": null,
"AsyncGenerator": null,
"AsyncIterator": null,
"partial": null,
"Callable": null,
"Iterator": null,
"API_DOC": null,
"AsyncPaginableRequestMethod": null,
"PaginableRequestMethod": null,
"DEFAULT_AUTH_HEADER": null,
"DEFAULT_INSERT_NUM_DOCUMENTS": null,
"DEFAULT_JSON_API_PATH": null,
"DEFAULT_JSON_API_VERSION": null,
"DEFAULT_KEYSPACE_NAME": null,
"convert_vector_to_floats": null,
"make_payload": null,
"importlib": null,
"os": null,
"toml": null,
"astrapy": null,
"AstraDBAdmin": null,
"AstraDBDatabaseAdmin": null,
"DataAPIDatabaseAdmin": null,
"DataAPIClient": null,
"AsyncCollection": "astrapy.collection.AsyncCollection",
"Collection": "astrapy.collection.Collection",
"field": null,
"TypeVar": null,
"EmbeddingAPIKeyHeaderProvider": null,
"ABC": "abc.ABC",
"abstractmethod": "abc.abstractmethod",
"fetch_database_info": null,
"parse_api_endpoint": null,
"coerce_token_provider": null,
"redact_secret": null,
"Environment": null,
"AsyncCommandCursor": null,
"CommandCursor": null,
"API_PATH_ENV_MAP": null,
"API_VERSION_ENV_MAP": null,
"DEFAULT_ASTRA_DB_KEYSPACE": null,
"CollectionAlreadyExistsException": null,
"DevOpsAPIException": null,
"CollectionDescriptor": null,
"CollectionVectorServiceOptions": null,
"DatabaseInfo": null,
"DatabaseAdmin": null,
"TokenProvider": null,
"api_endpoint_parsing_error_message": null,
"build_api_endpoint": null,
"check_id_endpoint_parg_kwargs": null,
"generic_api_url_parsing_error_message": null,
"normalize_region_for_id": null,
"parse_generic_api_url": null,
"check_deprecated_id_region": null,
"hashlib": null,
"Enum": null,
"Generic": null,
"Optional": null,
"Tuple": null,
"CursorIsStartedException": null,
"DataAPITimeoutException": null,
"normalize_payload_value": null,
"DATA_API_ENVIRONMENT_CASSANDRA": null,
"DATA_API_ENVIRONMENT_DEV": null,
"DATA_API_ENVIRONMENT_DSE": null,
"DATA_API_ENVIRONMENT_HCD": null,
"DATA_API_ENVIRONMENT_OTHER": null,
"DATA_API_ENVIRONMENT_PROD": null,
"DATA_API_ENVIRONMENT_TEST": null,
"reduce": "functools.reduce",
"re": null,
"API_ENDPOINT_TEMPLATE_ENV_MAP": null,
"DEFAULT_DEV_OPS_AUTH_PREFIX": null,
"DEV_OPS_DATABASE_POLL_INTERVAL_S": null,
"DEV_OPS_DATABASE_STATUS_ACTIVE": null,
"DEV_OPS_DATABASE_STATUS_INITIALIZING": null,
"DEV_OPS_DATABASE_STATUS_MAINTENANCE": null,
"DEV_OPS_DATABASE_STATUS_PENDING": null,
"DEV_OPS_DATABASE_STATUS_TERMINATING": null,
"DEV_OPS_DEFAULT_DATABASES_PAGE_SIZE": null,
"DEV_OPS_KEYSPACE_POLL_INTERVAL_S": null,
"DEV_OPS_RESPONSE_HTTP_ACCEPTED": null,
"DEV_OPS_RESPONSE_HTTP_CREATED": null,
"DEV_OPS_URL_ENV_MAP": null,
"DEV_OPS_VERSION_ENV_MAP": null,
"AdminDatabaseInfo": null,
"FindEmbeddingProvidersResult": null,
"check_update_db_namespace_keyspace": null,
"base64": null,
"EMBEDDING_HEADER_API_KEY": null,
"EMBEDDING_HEADER_AWS_ACCESS_ID": null,
"EMBEDDING_HEADER_AWS_SECRET_ID": null,
"SECRETS_REDACT_CHAR": null,
"SECRETS_REDACT_ENDING": null,
"SECRETS_REDACT_ENDING_LENGTH": null
},
"properties": {
"is_init_module": false,
"is_package": false,
"is_subpackage": false,
"is_namespace_package": false,
"is_namespace_subpackage": false
},
"bases": null,
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": null,
"attributes": null
}
|
|
astrapy.operations.reduce_bulk_write_results
|
Reduce a list of bulk write results into a single one.
|
{
"kind": "function",
"name": "reduce_bulk_write_results",
"path": "astrapy.operations.reduce_bulk_write_results",
"parameters": [
{
"name": "results",
"type": "list[BulkWriteResult]",
"description": "a list of BulkWriteResult instances.",
"default": null,
"value": null
}
],
"returns": [
{
"name": null,
"type": "BulkWriteResult",
"description": "A new BulkWRiteResult object which summarized the whole input list."
}
],
"gathered_types": [
"astrapy.results.BulkWriteResult"
],
"value": null,
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": null,
"attributes": null
}
|
astrapy.operations.BaseOperation
|
Base class for all operations amenable to be used
in bulk writes on (sync) collections.
|
{
"kind": "class",
"name": "BaseOperation",
"path": "astrapy.operations.BaseOperation",
"parameters": null,
"returns": null,
"gathered_types": [
"ABC"
],
"value": null,
"yields": null,
"imports": null,
"properties": null,
"bases": [
"ABC"
],
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": [
"astrapy.operations.ReplaceOne",
"astrapy.operations.UpdateMany",
"astrapy.operations.DeleteMany",
"astrapy.operations.UpdateOne",
"astrapy.operations.InsertOne",
"astrapy.operations.DeleteOne",
"astrapy.operations.InsertMany"
],
"attributes": null
}
|
astrapy.operations.BaseOperation.execute
|
{
"kind": "function",
"name": "execute",
"path": "astrapy.operations.BaseOperation.execute",
"parameters": [
{
"name": "collection",
"type": "Collection",
"description": null,
"default": null,
"value": null
},
{
"name": "index_in_bulk_write",
"type": "int",
"description": null,
"default": null,
"value": null
},
{
"name": "bulk_write_timeout_ms",
"type": "int | None",
"description": null,
"default": null,
"value": null
}
],
"returns": [
{
"name": null,
"type": "BulkWriteResult",
"description": null
}
],
"gathered_types": [
"astrapy.results.BulkWriteResult"
],
"value": null,
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": null,
"attributes": null
}
|
|
astrapy.operations.InsertOne
|
Represents an `insert_one` operation on a (sync) collection.
See the documentation on the collection method for more information.
|
{
"kind": "class",
"name": "InsertOne",
"path": "astrapy.operations.InsertOne",
"parameters": [
{
"name": "document",
"type": "DocumentType",
"description": null,
"default": null,
"value": null
},
{
"name": "vector",
"type": "VectorType | None",
"description": null,
"default": "None",
"value": null
},
{
"name": "vectorize",
"type": "str | None",
"description": null,
"default": "None",
"value": null
}
],
"returns": null,
"gathered_types": [
"astrapy.constants.VectorType",
"astrapy.constants.DocumentType",
"astrapy.operations.BaseOperation"
],
"value": null,
"yields": null,
"imports": null,
"properties": null,
"bases": [
"astrapy.operations.BaseOperation"
],
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": null,
"attributes": [
{
"name": "document",
"type": "DocumentType",
"description": "the document to insert."
},
{
"name": "vector",
"type": "VectorType | None",
"description": "an optional suitable vector to enrich the document at insertion.\n*DEPRECATED* (removal in 2.0). Use a `$vector` key in the document instead."
},
{
"name": "vectorize",
"type": "str | None",
"description": "a string to be made into a vector, with the same result as the\n`vector` attribute, through an embedding service, assuming one is\nconfigured for the collection.\n*DEPRECATED* (removal in 2.0). Use a `$vectorize` key in the documents instead."
}
]
}
|
astrapy.operations.InsertOne.document
|
{
"kind": "attribute",
"name": "document",
"path": "astrapy.operations.InsertOne.document",
"parameters": null,
"returns": null,
"gathered_types": [
"astrapy.constants.DocumentType"
],
"value": "document: DocumentType = document",
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": null,
"attributes": null
}
|
|
astrapy.operations.InsertOne.vector
|
{
"kind": "attribute",
"name": "vector",
"path": "astrapy.operations.InsertOne.vector",
"parameters": null,
"returns": null,
"gathered_types": [
"astrapy.constants.VectorType"
],
"value": "vector: VectorType | None = vector",
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": null,
"attributes": null
}
|
|
astrapy.operations.InsertOne.vectorize
|
{
"kind": "attribute",
"name": "vectorize",
"path": "astrapy.operations.InsertOne.vectorize",
"parameters": null,
"returns": null,
"gathered_types": null,
"value": "vectorize: str | None = vectorize",
"yields": null,
"imports": null,
"properties": null,
"bases": null,
"exports": null,
"example": null,
"references": null,
"note": null,
"implemented_by": null,
"attributes": null
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.