Skip to main content

linkml-store

Project description

linkml-store

An AI-ready data management and integration platform. LinkML-Store provides an abstraction layer over multiple different backends (including DuckDB, MongoDB, Neo4j, and local filesystems), allowing for common query, index, and storage operations.

For full documentation, see https://linkml.io/linkml-store/

See these slides for a high level overview.

Warning LinkML-Store is still undergoing changes and refactoring, APIs and command line options are subject to change!

Quick Start

Install, add data, query it:

pip install linkml-store[all]
linkml-store -d duckdb:///db/my.db -c persons insert data/*.json
linkml-store -d duckdb:///db/my.db -c persons query -w "occupation: Bricklayer"

Index it, search it:

linkml-store -d duckdb:///db/my.db -c persons index -t llm
linkml-store -d duckdb:///db/my.db -c persons search "all persons employed in construction"

Validate it:

linkml-store -d duckdb:///db/my.db -c persons validate

Basic usage

The CRUDSI pattern

Most database APIs implement the CRUD pattern: Create, Read, Update, Delete. LinkML-Store adds Search and Inference to this pattern, making it CRUDSI.

The notion of "Search" and "Inference" is intended to be flexible and extensible, including:

  • Search
    • Traditional keyword search
    • Search using LLM Vector embeddings (without a dedicated vector database)
    • Pluggable specialized search, e.g. genomic sequence (not yet implemented)
  • Inference (encompassing validation, repair, and inference of missing data)
    • Classic rule-based inference
    • Inference using LLM Retrieval Augmented Generation (RAG)
    • Statistical/ML inference

Features

Multiple Adapters

LinkML-Store is designed to work with multiple backends, giving a common abstraction layer

Coming soon: any RDBMS, any triplestore, Neo4J, HDF5-based stores, ChromaDB/Vector dbs ...

The intent is to give a union of all features of each backend. For example, analytic faceted queries are provided for all backends, not just Solr.

Composable indexes

Many backends come with their own indexing and search schemes. Classically this was Lucene-based indexes, now it is semantic search using LLM embeddings.

LinkML store treats indexing as an orthogonal concern - you can compose different indexing schemes with different backends. You don't need to have a vector database to run embedding search!

See How to Use-Semantic-Search

Use with LLMs

TODO - docs

Validation

LinkML-Store is backed by LinkML, which allows for powerful expressive structural and semantic constraints.

See Indexing JSON

and Referential Integrity

Web API

There is a preliminary API following HATEOAS principles implemented using FastAPI.

To start you should first create a config file, e.g. db/conf.yaml:

Then run:

export LINKML_STORE_CONFIG=./db/conf.yaml
make api

The API returns links as well as data objects, it's recommended to use a Chrome plugin for JSON viewing for exploring the API. TODO: add docs here.

The main endpoints are:

  • http://localhost:8000/ - the root of the API
  • http://localhost:8000/pages/ - browse the API via HTML
  • http://localhost:8000/docs - the Swagger UI

Streamlit app

make app

Background

See these slides for more details

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

linkml_store-0.2.11.tar.gz (104.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

linkml_store-0.2.11-py3-none-any.whl (139.1 kB view details)

Uploaded Python 3

File details

Details for the file linkml_store-0.2.11.tar.gz.

File metadata

  • Download URL: linkml_store-0.2.11.tar.gz
  • Upload date:
  • Size: 104.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for linkml_store-0.2.11.tar.gz
Algorithm Hash digest
SHA256 3ad8e1fc216bc34c4413f6157bf0601c5b257708065d86eb80d36b540d8cf87b
MD5 0bc77ebffba70f1ed423d49d1d80f0ed
BLAKE2b-256 f6f3469502cfbb650700a40b19e74eb73da3566cb9c8d87d59d2ed47f39f7c54

See more details on using hashes here.

Provenance

The following attestation bundles were made for linkml_store-0.2.11.tar.gz:

Publisher: pypi-publish.yaml on linkml/linkml-store

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file linkml_store-0.2.11-py3-none-any.whl.

File metadata

  • Download URL: linkml_store-0.2.11-py3-none-any.whl
  • Upload date:
  • Size: 139.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for linkml_store-0.2.11-py3-none-any.whl
Algorithm Hash digest
SHA256 7c82de4c6e6eb5dace56a29923950f2bfa4a8c53440316c22e6f7ddf22bc517d
MD5 78170e5f5fc22a1a0042df20fade2a50
BLAKE2b-256 58a1782e1b13b4965d2c899ec85c766a75657136f3f0998c550d1ca9536fbf0a

See more details on using hashes here.

Provenance

The following attestation bundles were made for linkml_store-0.2.11-py3-none-any.whl:

Publisher: pypi-publish.yaml on linkml/linkml-store

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page