This is a documentation site for LanceDB.
- Code examples are primarily in three language SDKs: Python, TypeScript and Rust.
- Best practices for linting, formatting and code complexity for each respective language apply.
- Write idiomatic code as far as possible
When running Python code, we have to cater to users of both pip and uv.
- Use 4 spaces to represent a tab (do not use tab characters)
- Always attempt to first run any Python code via the local virtual environment
- Look for a local virtual environment (typically in
.venvorvenv) - Activate the environment, so that you can run multiple code exampes in the same environment
- Look for a local virtual environment (typically in
- Avoid using
uv rundirectly, as you have issues running it in your sandbox - Only fall back to the system
python3to run code if the above steps don't work