-
Notifications
You must be signed in to change notification settings - Fork 0
[docs] Python SDK Reference #10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
davidmyriel
wants to merge
3
commits into
master
Choose a base branch
from
myriel/reference-revamp
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{% extends "base.html" %} | ||
|
||
{% block announce %} | ||
<div class="custom-announce" style="text-align: center;">June 1st, 2025: We just launched <a href="https://accounts.lancedb.com/sign-up" target="_blank" style="font-weight: bold;">LanceDB Cloud - Sign up and access LanceDB for free!</a></div> | ||
<div class="custom-announce" style="text-align: center;">We just launched <a href="https://accounts.lancedb.com/sign-up" target="_blank" style="font-weight: bold;">LanceDB Cloud Beta - Sign up for early access!</a></div> | ||
{% endblock %} |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Connections (Asynchronous) | ||
|
||
Connections represent a connection to a LanceDb database and can be used to create, list, or open tables. | ||
|
||
::: lancedb.connect_async | ||
|
||
::: lancedb.db.AsyncConnection |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Querying (Asynchronous) | ||
|
||
Queries allow you to return data from your database. Basic queries can be created with the [AsyncTable.query][lancedb.table.AsyncTable.query] method to return the entire (typically filtered) table. Vector searches return the rows nearest to a query vector and can be created with the [AsyncTable.vector_search][lancedb.table.AsyncTable.vector_search] method. | ||
|
||
::: lancedb.query.AsyncQuery | ||
options: | ||
inherited_members: true | ||
|
||
::: lancedb.query.AsyncVectorQuery | ||
options: | ||
inherited_members: true | ||
|
||
::: lancedb.query.AsyncHybridQuery | ||
options: | ||
inherited_members: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Tables (Asynchronous) | ||
|
||
Tables hold your actual data as a collection of records / rows. | ||
|
||
::: lancedb.table.AsyncTable |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Context | ||
|
||
::: lancedb.context.contextualize | ||
|
||
::: lancedb.context.Contextualizer |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Full Text Search | ||
|
||
This section covers the core Full Text Search (FTS) functionality in LanceDB. For building FTS queries in your application, see the [Synchronous FTS Query Builder](../sync/querying.md#lancedb.query.LanceFtsQueryBuilder) or [Asynchronous FTS Query Builder](../async/querying.md). | ||
|
||
## Core FTS Functions | ||
|
||
These functions provide the fundamental FTS capabilities: | ||
|
||
::: lancedb.fts.create_index | ||
|
||
::: lancedb.fts.populate_index | ||
|
||
::: lancedb.fts.search_index |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Indexes | ||
|
||
Indices can be created on a table to speed up queries. This section lists the indices that LanceDb supports. | ||
|
||
::: lancedb.index.BTree | ||
|
||
::: lancedb.index.Bitmap | ||
|
||
::: lancedb.index.LabelList | ||
|
||
::: lancedb.index.FTS | ||
|
||
::: lancedb.index.IvfPq | ||
|
||
::: lancedb.index.HnswPq | ||
|
||
::: lancedb.index.HnswSq | ||
|
||
::: lancedb.index.IvfFlat |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# Python API Reference | ||
|
||
This section contains the API reference for the Python API. LanceDB provides both synchronous and asynchronous API clients. | ||
|
||
## Installation | ||
|
||
```shell | ||
pip install lancedb | ||
``` | ||
|
||
## Quick Start | ||
|
||
The general flow of using the API is: | ||
|
||
1. Use [lancedb.connect][] or [lancedb.connect_async][] to connect to a database. | ||
2. Use the returned [lancedb.DBConnection][] or [lancedb.AsyncConnection][] to create or open tables. | ||
3. Use the returned [lancedb.table.Table][] or [lancedb.AsyncTable][] to query or modify tables. | ||
|
||
## API Reference | ||
|
||
### Synchronous API | ||
- [Connections](sync/connections.md) | ||
- [Tables](sync/tables.md) | ||
- [Querying](sync/querying.md) | ||
|
||
### Asynchronous API | ||
- [Connections](async/connections.md) | ||
- [Tables](async/tables.md) | ||
- [Querying](async/querying.md) | ||
|
||
### Features | ||
- [Embeddings](features/embeddings.md) | ||
- [Context](features/context.md) | ||
- [Full Text Search](features/fts.md) | ||
- [Indices](features/indices.md) | ||
|
||
### Integrations | ||
- [Pydantic](integrations/pydantic.md) | ||
- [Reranking](integrations/reranking.md) | ||
|
||
### SaaS Integration | ||
For information about using LanceDB with SaaS services, see the [SaaS Integration Guide](../saas/index.md). | ||
|
||
## Common Issues | ||
|
||
Multiprocessing with `fork` is not supported. You should use `spawn` instead. | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Embeddings | ||
|
||
::: lancedb.embeddings.registry.EmbeddingFunctionRegistry | ||
|
||
::: lancedb.embeddings.base.EmbeddingFunctionConfig | ||
|
||
::: lancedb.embeddings.base.EmbeddingFunction | ||
|
||
::: lancedb.embeddings.base.TextEmbeddingFunction | ||
|
||
::: lancedb.embeddings.sentence_transformers.SentenceTransformerEmbeddings | ||
|
||
::: lancedb.embeddings.openai.OpenAIEmbeddings | ||
|
||
::: lancedb.embeddings.open_clip.OpenClipEmbeddings |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Pydantic Integration | ||
|
||
::: lancedb.pydantic.pydantic_to_schema | ||
|
||
::: lancedb.pydantic.vector | ||
|
||
::: lancedb.pydantic.LanceModel |
davidmyriel marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Reranking | ||
|
||
::: lancedb.rerankers.linear_combination.LinearCombinationReranker | ||
|
||
::: lancedb.rerankers.cohere.CohereReranker | ||
|
||
::: lancedb.rerankers.colbert.ColbertReranker | ||
|
||
::: lancedb.rerankers.cross_encoder.CrossEncoderReranker | ||
|
||
::: lancedb.rerankers.openai.OpenaiReranker |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
lancedb.fts
module is private, and it contains the deprecated Tantivy FTS implementation. I wouldn't document it going forward.Much more interesting to document are the
FullTextQuery
and subclasses withinquery.py