End-to-end seekdb toolchain for AI workflows in-database.
Project description
seekme
seekme is an end-to-end seekdb toolchain for AI workflows in-database. It keeps a minimal, explicit surface so you can stay close to SQL while adding vector search and optional embeddings.
Disclosure
This is not an official OceanBase library. It was developed by the author while employed at OceanBase, and I hope you enjoy it.
Install
pip install seekme
Optional extras:
pip install "seekme[mysql]"
pip install "seekme[remote-embeddings]"
pip install "seekme[local-embeddings]"
pip install "seekme[seekdb]"
Notes:
seekme[remote-embeddings]requires Python 3.11+ due to provider SDK requirements.seekme[local-embeddings]installs sentence-transformers.seekme[seekdb]requires Linux and installs pylibseekdb for embedded mode.
Quickstart
SQL-only
from seekme import Client
client = Client.from_database_url("mysql+pymysql://root:@127.0.0.1:2881/seekme_test")
client.connect()
row = client.db.fetch_one("SELECT 1 AS ok")
assert row["ok"] == 1
SQL + Vector
store = client.vector_store
store.create_collection("docs", dimension=3)
store.upsert(
"docs",
ids=["v1", "v2"],
vectors=[[1.0, 0.0, 0.0], [0.0, 1.0, 0.0]],
)
results = store.search("docs", query=[1.0, 0.0, 0.0], top_k=3)
SQL + Vector + Embeddings
from seekme.embeddings import LocalEmbedder
embedder = LocalEmbedder(model="sentence-transformers/paraphrase-MiniLM-L3-v2")
sdk = Client(db=client.db, embedder=embedder)
results = sdk.vector_store.search("docs", query="hello world", top_k=3)
Embedded seekdb (optional)
client = Client.from_database_url("seekdb:////tmp/seekdb.db?database=seekme_test", db_driver="seekdb")
client.connect()
Documentation
- User guide: https://psiace.github.io/seekme/
Development
make install
make check
make test
Test matrix (strict envs):
- Remote mode (MySQL): set
SEEKME_TEST_DB_MODE=remotewith eitherSEEKME_TEST_DB_URLorSEEKME_TEST_DB_HOST/SEEKME_TEST_DB_PORT/SEEKME_TEST_DB_USER/SEEKME_TEST_DB_PASSWORD/SEEKME_TEST_DB_NAME. - Embedded mode: set
SEEKME_TEST_DB_MODE=embeddedandSEEKME_TEST_SEEKDB_PATH(optional). - Local embeddings: set
SEEKME_TEST_LOCAL_EMBEDDING=1andSEEKME_TEST_LOCAL_MODEL. - Remote embeddings (e2e): set
SEEKME_TEST_REMOTE_EMBEDDING=1andSEEKME_TEST_REMOTE_API_KEY(optionalSEEKME_TEST_REMOTE_MODEL/SEEKME_TEST_REMOTE_PROVIDER/SEEKME_TEST_REMOTE_API_BASE).
Use .env.test.example as a starting point for local runs.
License
Apache-2.0. See LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file seekme-0.0.1.tar.gz.
File metadata
- Download URL: seekme-0.0.1.tar.gz
- Upload date:
- Size: 179.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
39f31ae8889bb965b8f6e45ae9c4f77cbc01cd10cd321e0fc1cd232d20d0bdf3
|
|
| MD5 |
1f2b04eb3a7089bbca8abfaea6de2f5f
|
|
| BLAKE2b-256 |
40612ebac0b0c44bcd880890c383d8c063940ffac487908c4b6ff59b51cff8ed
|
File details
Details for the file seekme-0.0.1-py3-none-any.whl.
File metadata
- Download URL: seekme-0.0.1-py3-none-any.whl
- Upload date:
- Size: 22.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9d1da3e61a0a0d85879b314bdf73df5beb806d092ada42a1b2ef63c3ab20fc72
|
|
| MD5 |
b06690b752aeab1aa81473550e5c1846
|
|
| BLAKE2b-256 |
adcd0bcf4e1005911d166b7c927b4e3eb9b7a8a28101eca734b236ccc49de6f9
|