# Weaviate Features and Practical Usage
🚀 Tired of standing up a vector DB server just for a test? Embedded Weaviate launches from your script in one line and disappears when you're done, making it a perfect throwaway DB for CI and notebooks.
📌 Title and Feature URL
Title: Embedded Weaviate
URL:
📝 Overview
Embedded Weaviate is an experimental deployment model that runs a Weaviate instance from your application code rather than a standalone server. The instance lifecycle is tied to the client app, so it terminates when your app exits, though persisted data survives. Its biggest benefit is running experiments with zero infrastructure setup.
🔧 How It Works
- In Python you launch it with weaviate.connect_to_embedded(version=..., headers=..., environment_variables=...).
- The client checks binary_path for a cached binary; if missing, it downloads the right binary (Linux or macOS) from GitHub releases and caches it for reuse.
- On first startup it creates a persistent datastore at persistence_data_path, and subsequent runs reuse it, so data survives between sessions.
- The instance exits when the script ends, the app terminates, or the notebook becomes inactive.
🛠 Practical Usage
- Key parameters are version (latest, a version string, or a binary URL), port (default 8079), persistence_data_path (default ~/.local/share/weaviate), and binary_path (default ~/.cache/weaviate-embedded).
- For advanced setup use EmbeddedOptions and pass modules or API keys via additional_env_vars={"ENABLE_MODULES": "..."}, then call client.connect().
- If logs are noisy, quiet them with environment_variables={"LOG_LEVEL": "error"}.
- TypeScript requires a separate package, weaviate-ts-embedded.
🎯 Use Cases
- Running regression tests for search logic in CI with zero infrastructure setup.
- Prototyping and experimentation in Jupyter notebooks.
- Lightweight, single-user local validation.
⚠️ Caveats
- It is experimental; APIs and parameters may change.
- It is single-node only, with no clustering or distributed deployment, and is not production-grade.
- Supported operating systems are Linux and macOS only.
- Avoid changing XDG_DATA_HOME or XDG_CACHE_HOME, since they are widely used by other applications.
#
Weaviate# #
VectorDatabase#