Skip to main content

OxiVault

PyPI Python

Vault-LD knowledge graph store on object storage.

oxivault converts Obsidian-style Markdown vaults to and from RDF using in-process Vault-LD reference algorithms and RDFLib. It supports local files, in-memory stores, Git repositories, and S3-compatible object storage, with CLI, Python, and HTTP API interfaces.

Upstream specification and reference credit

OxiVault builds on the original Vault-LD work from The Knowledge Graph Guys:

This project adapts those reference conversion algorithms for in-process library use under src/oxivault/_reference/vault_ld/.

Features

  • Vault ↔ RDF conversion
    • vault2rdf: export vault content to schema.ttl and data.ttl
    • rdf2vault: ingest RDF into Markdown notes with frontmatter
  • Graph access and querying
    • Canonical triples table via Vault.triples() (Polars DataFrame)
    • SPARQL querying via Vault.query() and oxivault query
    • Graph exploration via neighbors(), backlinks(), search(), search_body()
  • Note CRUD with optimistic concurrency
    • get_note(), put_note(), delete_note(), list_notes(), exists_note()
  • ObjectStore backends
    • LocalDirStore, MemoryStore, S3Store, GitStore
  • Sync engine
    • Two-way sync between local vaults and S3-compatible storage (oxivault sync)
  • HTTP API server (FastAPI)
    • Endpoints for notes, graph querying, search, and reindexing

Requirements

  • Python 3.14+
  • For S3 sync/backends: credentials configured for your AWS or S3-compatible provider (through boto3/client configuration)

Installation

pip install oxivault

With uv:

uv add oxivault

CLI quick start

Export a vault to RDF:

oxivault vault2rdf ./my-vault --out-dir ./dist --source

Ingest RDF into a vault:

oxivault rdf2vault ./my-vault ./graph.ttl

Run a SPARQL query:

oxivault query ./my-vault "SELECT ?s ?p ?o WHERE { ?s ?p ?o } LIMIT 10"

Sync local vault with S3:

oxivault sync ./my-vault --bucket my-s3-vault --direction both

Start the HTTP API server:

oxivault serve ./my-vault --host 127.0.0.1 --port 8000

Python quick start

from oxivault.models import RdfDocument
from oxivault.store.memory import MemoryStore
from oxivault.vault import Vault

store = MemoryStore()
vault = Vault(store)

rdf = b"""@prefix ex: <https://example.org/> .
@prefix data: <https://example.org/data/> .

data:item1 a ex:Thing .
"""

vault.rdf2vault([RdfDocument(content=rdf, format="turtle")])

triples = vault.triples()
print(triples.select(["subject", "predicate", "object"]))

HTTP API

Run:

oxivault serve ./my-vault --port 8000

Then use:

  • GET /vault
  • GET /notes
  • GET /notes/{path}
  • PUT /notes/{path}
  • DELETE /notes/{path}
  • POST /graph/sparql
  • GET /graph/edges?subject=...
  • GET /graph/issues
  • GET /search?q=...
  • POST /reindex

Interactive docs are available at /docs.

Conversion behavior and constraints

  • Not all RDF graphs are representable as vault notes. Check reported conversion issues when ingesting/exporting.
  • CLI RDF ingest accepts .ttl (Turtle) and .nt (N-Triples) files.
  • Vault.vault2rdf() and oxivault vault2rdf default to query-oriented export. Use source=True (Python) or --source (CLI) to include placement metadata for roundtrip location fidelity.
  • Vault.rdf2vault([]) is invalid (empty sequence). Passing a non-empty sequence with an empty RDF document is valid.

Examples

Runnable examples are in examples/:

  • examples/local_store_demo.py
  • examples/roundtrip_demo.py
  • examples/graph_query_demo.py
  • examples/server_and_backends_demo.py

Run an example:

uv run python examples/roundtrip_demo.py

Development

uv sync --group dev
tara check

Release and PyPI publishing

Publishing is automated with GitHub tags through .github/workflows/publish.yml. Create and push an annotated SemVer tag to publish, for example:

git tag -a v0.1.0 -m "Release 0.1.0"
git push origin v0.1.0

The publish workflow builds source and wheel distributions and uploads them to PyPI with GitHub OIDC trusted publishing. Configure a PyPI trusted publisher for dkapitan/oxivault that points to workflow publish.yml and environment pypi.

License

Licensed under the Apache License 2.0. See LICENSE.

Metadata

Release files for oxivault 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for oxivault 0.1.0
File Size Uploaded
oxivault-0.1.0.tar.gz 43.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for oxivault 0.1.0
File Interpreter ABI Platform
oxivault-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 96.5 kB

Release files / oxivault-0.1.0.tar.gz

Download URL oxivault-0.1.0.tar.gz
Size 43.3 kB
Tags Source
SHA-256 checksum
How to use checksums
dda54b1dcfac8ec954f72ac06dcd2db8713e48cf2e9d86e907e998bd1986c6e2
BLAKE2b-256 checksum
How to use checksums
f335ebd6b603ec7a781ac163d93cd61a960ec693f83b0bbb22751941a2263a05
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 4, 2026.

Transparency log

Release files / oxivault-0.1.0-py3-none-any.whl

Download URL oxivault-0.1.0-py3-none-any.whl
Size 53.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cde6b394fe077fe10f195dc4e5df135813de63c66e56f135bac3c8841a354c47
BLAKE2b-256 checksum
How to use checksums
08631410a2749b7978f10635088700444143f14e35783511593af6c1021830f6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 4, 2026.

Transparency log

Release history Release notifications | RSS feed

0.2.1

2 release files

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page