MCPcopy Index your code

hub / github.com/datastax/astrapy / functions

Functions2,040 in github.com/datastax/astrapy

↓ 500 callersMethodfind
( self, filter: FilterType | None = None, *, projection: ProjectionType | None
astrapy/data/table.py:1913
↓ 407 callersMethodfind_one
Run a search according to the given filtering and sorting criteria and return the top row matching it, or nothing if there are none.
astrapy/data/table.py:2234
↓ 275 callersMethodinsert_one
Insert a single row in the table, with implied overwrite in case of primary key collision. Inserting a row whose primary key
astrapy/data/table.py:1369
↓ 259 callersMethodto_list
Materialize all rows that remain to be consumed from a cursor into a list. Calling this method on a CLOSED cursor results in an erro
astrapy/data/cursors/find_cursor.py:2128
↓ 251 callersMethodinsert_many
Insert a number of rows into the table, with implied overwrite in case of primary key collision. Inserting rows whose primar
astrapy/data/table.py:1566
↓ 250 callersMethodfrom_string
Parse a string, expressed according to the Data API format, into a DataAPITime. If the format is not recognized, a ValueError is rais
astrapy/data_types/data_api_time.py:237
↓ 175 callersMethoddelete_many
Delete all rows matching a provided filter condition. This operation can target from a single row to the entirety of the table.
astrapy/data/table.py:2939
↓ 173 callersMethodfind_and_rerank
( self, filter: FilterType | None = None, *, sort: HybridSortType, pro
astrapy/data/collection.py:1511
↓ 146 callersMethodget_sort_vector
Return the query vector used in the vector (ANN) search that originated this cursor, if applicable. If this is not an ANN search, or
astrapy/data/cursors/find_cursor.py:2221
↓ 139 callersMethodcount_documents
Count the row in the table matching the specified filter. Args: filter: a predicate expressed as a dictionary according
astrapy/data/table.py:2586
↓ 139 callersMethodwith_override
Given an "overriding" set of options, possibly not defined in all its attributes, apply the override logic and return a new full opti
astrapy/utils/api_options.py:1309
↓ 136 callersMethodwith_options
Create a clone of this table with some changed attributes. Args: embedding_api_key: optional API key(s) for interacting
astrapy/data/table.py:414
↓ 128 callersMethodas_dict
Recast this object into a dictionary.
astrapy/data/info/reranking.py:415
↓ 116 callersMethodinfo
Query the DevOps API for the full info on this database. Args: database_admin_timeout_ms: a timeout, in milliseconds, to
astrapy/admin/admin.py:3430
↓ 110 callersMethod__anext__
(self)
astrapy/data/cursors/find_cursor.py:2505
↓ 108 callersMethodmap
Return a copy of this cursor with a mapping function to transform the returned items. Calling this method on a cursor with a mapping
astrapy/data/cursors/find_cursor.py:1963
↓ 106 callersMethoddistinct
Return a list of the unique values of `key` across the rows in the table that match the provided filter. Args: k
astrapy/data/table.py:2457
↓ 104 callersMethodupdate_one
Update a single document on the table, changing some or all of the columns, with the implicit behaviour of inserting a new row if no
astrapy/data/table.py:2735
↓ 102 callersMethodinfo
Return information on the table. This should not be confused with the table definition (i.e. the schema). Args:
astrapy/data/table.py:579
↓ 90 callersFunction_assert_extracts
( document: dict[str, Any], key: str | list[str | int], expected: list[Any] )
tests/base/unit/test_document_extractors.py:63
↓ 85 callersMethodinfo
Information on the collection (name, location, database), in the form of a CollectionInfo object. Not to be confused with th
astrapy/data/collection.py:564
↓ 76 callersMethodcoerce
Accepts either a string or an instance of the Enum itself. If a string is passed, it converts it to the corresponding Enum va
astrapy/utils/str_enum.py:50
↓ 73 callersMethod_from_dict
Create an instance of RerankingProvider from a dictionary such as one from the Data API.
astrapy/data/info/reranking.py:445
↓ 65 callersMethodinfo
Additional information on the database as an AstraDBDatabaseInfo instance. Some of the returned properties are dynamic throughout th
astrapy/data/database.py:360
↓ 62 callersMethodrequest
( self, *, http_method: str = HttpMethod.POST, payload: dict[str, Any] | None
astrapy/utils/api_commander.py:647
↓ 61 callersMethodget_collection
( self, name: str, *, keyspace: str | None = None, embedding_api_key:
astrapy/data/database.py:510
↓ 60 callersMethod_ensure_idle
(self)
astrapy/data/cursors/cursor.py:167
↓ 59 callersMethodasync_request
( self, *, http_method: str = HttpMethod.POST, payload: dict[str, Any] | None
astrapy/utils/api_commander.py:676
↓ 57 callersMethodbuild
The final step in the fluent (builder) interface. Calling this method finalizes the definition that has been built so far and makes i
astrapy/data/info/collection_descriptor.py:1118
↓ 56 callersMethodfind_one_and_update
Find a document on the collection and update it as requested, optionally inserting a new one if no match is found. Args:
astrapy/data/collection.py:2270
↓ 56 callersMethodget_database
Get a Database object from this client, for doing data-related work. Args: api_endpoint: the API Endpoint for the target
astrapy/client.py:200
↓ 56 callersFunctionpreprocess_table_payload
Normalize a payload for API calls. This includes e.g. ensuring values for "$vector" key are made into plain lists of floats. Args:
astrapy/data/utils/table_converters.py:843
↓ 55 callersMethodcreate_collection
( self, name: str, *, definition: CollectionDefinition | dict[str, Any] | None
astrapy/data/database.py:629
↓ 55 callersMethodto_async
Create an AsyncTable from this one. Save for the arguments explicitly provided as overrides, everything else is kept identical
astrapy/data/table.py:463
↓ 54 callersFunctiondefaultAPIOptions
Return the default APIOptions object for a given environment, based on 'grand defaults' hardcoded in astrapy.
astrapy/utils/api_options.py:1447
↓ 54 callersMethodremaining_timeout
Ensure the deadline, if any, is not yet in the past. If it is, raise an appropriate timeout error. If not, return either None
astrapy/exceptions/__init__.py:223
↓ 50 callersMethodfetch_next_page
Retrieve a single, whole page of results from the Data API and return it at once, together with associated "out-of-band" information.
astrapy/data/cursors/find_cursor.py:2250
↓ 50 callersMethodfind_one_and_replace
Find a document on the collection and replace it entirely with a new one, optionally inserting a new one if no match is found.
astrapy/data/collection.py:2024
↓ 50 callersMethodfor_each
Consume the remaining rows in the cursor, invoking a provided callback function on each of them. Calling this method on a CL
astrapy/data/cursors/find_cursor.py:2041
↓ 47 callersMethodfrom_c_string
Parse a string, expressed according to the Data API "Apache Cassandra(R) notation", into a DataAPIDuration. If the format is
astrapy/data_types/data_api_duration.py:163
↓ 47 callersMethodrewind
Rewind the cursor, bringing it back to its pristine state of no items retrieved/consumed yet, regardless of its current state.
astrapy/data/cursors/cursor.py:234
↓ 46 callersFunction_first_valid_timeout
( *items: tuple[int | None, str | None], )
astrapy/exceptions/utils.py:20
↓ 46 callersMethodcreate_index
Create an index on a non-vector column of the table. This is a blocking operation: the method returns once the index is crea
astrapy/data/table.py:720
↓ 45 callersMethodget_database_admin
Return a DatabaseAdmin object corresponding to this database, for use in admin tasks such as managing keyspaces. This method
astrapy/data/database.py:2236
↓ 44 callersMethodcreate_table
( self, name: str, *, definition: CreateTableDefinition | dict[str, Any],
astrapy/data/database.py:1167
↓ 42 callersFunction_warn_residual_keys
( klass: type, raw_dict: dict[str, Any], known_keys: set[str] )
astrapy/utils/parsing.py:21
↓ 40 callersFunction_repaint_NaNs
(val: Any)
tests/base/conftest.py:136
↓ 40 callersFunction_select_singlereq_timeout_gm
Apply the logic for determining and labeling the timeout for (non-admin) single-request methods. If no int args are passed, pick (and co
astrapy/exceptions/utils.py:49
↓ 40 callersMethodproject
Return a copy of this cursor with a new projection setting. This operation is allowed only if the cursor state is still IDLE and if
astrapy/data/cursors/find_cursor.py:1809
↓ 38 callersMethod__next__
(self)
astrapy/data/cursors/find_cursor.py:1715
↓ 36 callersMethoddelete_one
Delete a row, matching the provided value of the primary key. If no row is found with that primary key, the method does nothing.
astrapy/data/table.py:2860
↓ 35 callersMethodbuilder
Create an "empty" builder for constructing a collection definition through a fluent interface. The resulting object has no defined pr
astrapy/data/info/collection_descriptor.py:394
↓ 34 callersMethodconsume_buffer
Consume (return) up to the requested number of buffered items (rows/documents). The returned items are marked as consumed, meaning th
astrapy/data/cursors/cursor.py:269
↓ 33 callersFunction_alist
( acursor: AsyncCollectionFindCursor[DefaultDocumentType, Any], )
tests/base/integration/collections/test_collection_dml_async.py:46
↓ 32 callersMethodclose
Close the cursor, regardless of its state. A cursor can be closed at any time, possibly discarding the portion of results that has no
astrapy/data/cursors/cursor.py:222
↓ 31 callersMethod_copy
( self: Table[ROW], *, embedding_api_key: str | EmbeddingHeadersProvider | UnsetType =
astrapy/data/table.py:393
↓ 31 callersMethodcreate_vector_index
Create a vector index on a vector column of the table, enabling vector similarity search operations on it. This is a blockin
astrapy/data/table.py:838
↓ 31 callersFunctiondict_equal_same_class
A strong equality that checks the class in each value is exactly the same.
tests/base/table_structure_assets.py:362
↓ 31 callersMethodlist_collection_names
List the names of all collections in a given keyspace of this database. Args: keyspace: the keyspace to be inspected. If
astrapy/data/database.py:983
↓ 30 callersFunction_select_singlereq_timeout_ta
Apply the logic for determining and labeling the timeout for (table-admin) single-request methods. If no int args are passed, pick (and
astrapy/exceptions/utils.py:117
↓ 30 callersMethoddrop_table_index
Drops (deletes) an index (of any kind) from the table it is associated to. This is a blocking operation: the method returns once the
astrapy/data/database.py:1476
↓ 30 callersMethodhas_next
Whether the cursor actually has more documents to return. `has_next` can be called on any cursor, but on a CLOSED cursor wil
astrapy/data/cursors/find_cursor.py:2193
↓ 30 callersMethodlimit
Return a copy of this cursor with a new limit setting. This operation is allowed only if the cursor state is still IDLE. Ins
astrapy/data/cursors/find_cursor.py:1853
↓ 29 callersMethodcreate_text_index
Create a text index on a vector column of the table, enabling lexicographical matching operations on it. This is a blocking
astrapy/data/table.py:968
↓ 28 callersMethodfilter
Return a copy of this cursor with a new filter setting. This operation is allowed only if the cursor state is still IDLE. In
astrapy/data/cursors/find_cursor.py:1790
↓ 28 callersMethodupdate_many
Apply an update operation to all documents matching a condition, optionally inserting one documents in absence of matches. A
astrapy/data/collection.py:2526
↓ 27 callersMethoddrop_collection
Drop a collection from the database, along with all documents therein. Args: name: the name of the collection to drop.
astrapy/data/database.py:854
↓ 26 callersMethodclone
Create a copy of this cursor with: - the same parameters (timeouts, filter, projection, etc) - and the cursor is rewound to i
astrapy/data/cursors/find_cursor.py:1742
↓ 26 callersMethodcommand
Send a POST request to the Data API for this table with an arbitrary, caller-provided payload. No transformations or type con
astrapy/data/table.py:3100
↓ 26 callersMethodget_async_database
Get an AsyncDatabase object from this client, for doing data-related work. Args: api_endpoint: the API Endpoint for the
astrapy/client.py:302
↓ 26 callersMethodto_string
Convert the DataAPITime to a string according to the Data API specification. Returns: a string expressing the time value
astrapy/data_types/data_api_time.py:143
↓ 25 callersMethodreceive
( self, event: ObservableEvent, sender: Any = None,
tests/base/unit/test_event_observers.py:74
↓ 24 callersMethod_ensure_alive
(self)
astrapy/data/cursors/cursor.py:160
↓ 24 callersMethod_imprint_internal_state
Mutably copy the internal state of this cursor onto another one.
astrapy/data/cursors/cursor.py:151
↓ 24 callersMethodcoerce
( raw_input: RerankServiceOptions | dict[str, Any] | None, )
astrapy/data/info/reranking.py:77
↓ 24 callersMethodinclude_sort_vector
Return a copy of this cursor with a new include_sort_vector setting. This operation is allowed only if the cursor state is still IDLE
astrapy/data/cursors/find_cursor.py:1922
↓ 24 callersMethodreplace_one
Replace a single document on the collection with a new one, optionally inserting a new one if no match is found. Args:
astrapy/data/collection.py:2169
↓ 24 callersMethodsort
Return a copy of this cursor with a new sort setting. This operation is allowed only if the cursor state is still IDLE. Inst
astrapy/data/cursors/find_cursor.py:1834
↓ 23 callersMethoddrop
Drop the table, i.e. delete it from the database along with all the rows stored therein. Args: if_exists: if pas
astrapy/data/table.py:3035
↓ 23 callersMethoddrop_table
Drop a table from the database, along with all rows therein and related indexes. Args: name: the name of the table to dr
astrapy/data/database.py:1555
↓ 23 callersMethodfrom_datetime
Convert a standard-library `datetime.datetime` into a DataAPITimestamp. The conversion correctly takes timezone information into acc
astrapy/data_types/data_api_timestamp.py:207
↓ 22 callersMethodadd_map_column
Return a new table definition object with an added column of 'map' type. This method is for use within the fluent interface f
astrapy/data/info/table_descriptor/table_creation.py:433
↓ 22 callersMethodget_token
Produce a string for direct use as token in a subsequent API request, or None for no token.
astrapy/authentication.py:167
↓ 22 callersFunctionparse_api_endpoint
Parse an API Endpoint into a ParsedAPIEndpoint structure. Args: api_endpoint: a full API endpoint for the Data API. Returns:
astrapy/admin/endpoints.py:63
↓ 21 callersMethodget_admin
Get an AstraDBAdmin instance corresponding to this client, for admin work such as managing databases. Args: toke
astrapy/client.py:457
↓ 20 callersMethodalter
( self, operation: AlterTableOperation | dict[str, Any], *, table_admin_timeou
astrapy/data/table.py:1209
↓ 20 callersMethodfind_one_and_delete
Find a document in the collection and delete it. The deleted document, however, is the return value of the method. Args:
astrapy/data/collection.py:2683
↓ 20 callersMethodget_table
( self, name: str, *, keyspace: str | None = None, embedding_api_key:
astrapy/data/database.py:1038
↓ 20 callersMethodpreprocess_payload
( self, payload: dict[str, Any] | None, map2tuple_checker: Callable[[list[str]], bool]
astrapy/data/utils/table_converters.py:950
↓ 20 callersMethodskip
Return a copy of this cursor with a new skip setting. This operation is allowed only if the cursor state is still IDLE. Inst
astrapy/data/cursors/find_cursor.py:1944
↓ 18 callersMethod_from_dict
Create an instance of TableUDTColumnDescriptor from a dictionary such as one from the Data API.
astrapy/data/info/table_descriptor/table_columns.py:587
↓ 18 callersFunctioncreate_row_tpostprocessor
( columns: dict[str, TableColumnTypeDescriptor], options: FullSerdesOptions, similarity_pseudocolu
astrapy/data/utils/table_converters.py:570
↓ 18 callersMethodwith_vector_dimension
Return a new collection definition object with a new setting for the collection's vector dimension. This method is for use within the
astrapy/data/info/collection_descriptor.py:510
↓ 18 callersMethodwith_vector_metric
Return a new collection definition object with a new setting for the collection's vector similarity metric. This method is for use wi
astrapy/data/info/collection_descriptor.py:550
↓ 16 callersMethodinclude_similarity
Return a copy of this cursor with a new include_similarity setting. This operation is allowed only if the cursor state is still IDLE
astrapy/data/cursors/find_cursor.py:1894
↓ 16 callersMethodto_sync
Create a Table from this one. Save for the arguments explicitly provided as overrides, everything else is kept identical to t
astrapy/data/table.py:3531
↓ 16 callersMethodwith_lexical
Return a new collection definition object with a modified 'lexical' setting. This method is for use within the fluent interface for
astrapy/data/info/collection_descriptor.py:995
↓ 15 callersMethod_converted_request
( self, *, http_method: str = HttpMethod.POST, payload: dict[str, Any] | None
astrapy/data/collection.py:350
↓ 15 callersMethodwith_options
Create a clone of this AstraDBAdmin with some changed attributes. Args: token: an Access Token to the database. Example:
astrapy/admin/admin.py:572
↓ 14 callersMethod_converted_request
( self, *, http_method: str = HttpMethod.POST, payload: dict[str, Any] | None
astrapy/data/collection.py:3346
next →1–100 of 2,040, ranked by callers