| 1 | # Python API Reference |
| 2 | |
| 3 | This section contains the API reference for the OSS Python API. |
| 4 | |
| 5 | ## Installation |
| 6 | |
| 7 | ```shell |
| 8 | pip install lancedb |
| 9 | ``` |
| 10 | |
| 11 | The following methods describe the synchronous API client. There |
| 12 | is also an [asynchronous API client](#connections-asynchronous). |
| 13 | |
| 14 | ## Connections (Synchronous) |
| 15 | |
| 16 | ::: lancedb.connect |
| 17 | |
| 18 | ::: lancedb.db.DBConnection |
| 19 | |
| 20 | ## Tables (Synchronous) |
| 21 | |
| 22 | ::: lancedb.table.Table |
| 23 | |
| 24 | ## Querying (Synchronous) |
| 25 | |
| 26 | ::: lancedb.query.Query |
| 27 | |
| 28 | ::: lancedb.query.LanceQueryBuilder |
| 29 | |
| 30 | ::: lancedb.query.LanceVectorQueryBuilder |
| 31 | |
| 32 | ::: lancedb.query.LanceFtsQueryBuilder |
| 33 | |
| 34 | ::: lancedb.query.LanceHybridQueryBuilder |
| 35 | |
| 36 | ## Embeddings |
| 37 | |
| 38 | ::: lancedb.embeddings.registry.EmbeddingFunctionRegistry |
| 39 | |
| 40 | ::: lancedb.embeddings.base.EmbeddingFunction |
| 41 | |
| 42 | ::: lancedb.embeddings.base.TextEmbeddingFunction |
| 43 | |
| 44 | ::: lancedb.embeddings.sentence_transformers.SentenceTransformerEmbeddings |
| 45 | |
| 46 | ::: lancedb.embeddings.openai.OpenAIEmbeddings |
| 47 | |
| 48 | ::: lancedb.embeddings.open_clip.OpenClipEmbeddings |
| 49 | |
| 50 | ::: lancedb.embeddings.utils.with_embeddings |
| 51 | |
| 52 | ## Context |
| 53 | |
| 54 | ::: lancedb.context.contextualize |
| 55 | |
| 56 | ::: lancedb.context.Contextualizer |
| 57 | |
| 58 | ## Full text search |
| 59 | |
| 60 | ::: lancedb.fts.create_index |
| 61 | |
| 62 | ::: lancedb.fts.populate_index |
| 63 | |
| 64 | ::: lancedb.fts.search_index |
| 65 | |
| 66 | ## Utilities |
| 67 | |
| 68 | ::: lancedb.schema.vector |
| 69 | |
| 70 | ::: lancedb.merge.LanceMergeInsertBuilder |
| 71 | |
| 72 | ## Integrations |
| 73 | |
| 74 | ## Pydantic |
| 75 | |
| 76 | ::: lancedb.pydantic.pydantic_to_schema |
| 77 | |
| 78 | ::: lancedb.pydantic.vector |
| 79 | |
| 80 | ::: lancedb.pydantic.LanceModel |
| 81 | |
| 82 | ## Reranking |
| 83 | |
| 84 | ::: lancedb.rerankers.linear_combination.LinearCombinationReranker |
| 85 | |
| 86 | ::: lancedb.rerankers.cohere.CohereReranker |
| 87 | |
| 88 | ::: lancedb.rerankers.colbert.ColbertReranker |
| 89 | |
| 90 | ::: lancedb.rerankers.cross_encoder.CrossEncoderReranker |
| 91 | |
| 92 | ::: lancedb.rerankers.openai.OpenaiReranker |
| 93 | |
| 94 | ## Connections (Asynchronous) |
| 95 | |
| 96 | Connections represent a connection to a LanceDb database and |
| 97 | can be used to create, list, or open tables. |
| 98 | |
| 99 | ::: lancedb.connect_async |
| 100 | |
| 101 | ::: lancedb.db.AsyncConnection |
| 102 | |
| 103 | ## Tables (Asynchronous) |
| 104 | |
| 105 | Table hold your actual data as a collection of records / rows. |
| 106 | |
| 107 | ::: lancedb.table.AsyncTable |
| 108 | |
| 109 | ## Indices (Asynchronous) |
| 110 | |
| 111 | Indices can be created on a table to speed up queries. This section |
| 112 | lists the indices that LanceDb supports. |
| 113 | |
| 114 | ::: lancedb.index.BTree |
| 115 | |
| 116 | ::: lancedb.index.Bitmap |
| 117 | |
| 118 | ::: lancedb.index.LabelList |
| 119 | |
| 120 | ::: lancedb.index.IvfPq |
| 121 | |
| 122 | ## Querying (Asynchronous) |
| 123 | |
| 124 | Queries allow you to return data from your database. Basic queries can be |
| 125 | created with the [AsyncTable.query][lancedb.table.AsyncTable.query] method |
| 126 | to return the entire (typically filtered) table. Vector searches return the |
| 127 | rows nearest to a query vector and can be created with the |
| 128 | [AsyncTable.vector_search][lancedb.table.AsyncTable.vector_search] method. |
| 129 | |
| 130 | ::: lancedb.query.AsyncQueryBase |
| 131 | |
| 132 | ::: lancedb.query.AsyncQuery |
| 133 | |
| 134 | ::: lancedb.query.AsyncVectorQuery |