{"library":"pyoxigraph","title":"PyOxigraph","description":"PyOxigraph provides Python bindings for Oxigraph, a high-performance SPARQL database and RDF toolkit implemented in Rust. It offers capabilities for parsing, storing, querying, and manipulating RDF data, including support for various RDF serialization formats and the SPARQL query language. The library is actively maintained with frequent releases, typically every few weeks, incorporating new features and performance improvements. Current version is 0.5.6.","language":"python","status":"active","last_verified":"Fri Apr 17","install":{"commands":["pip install pyoxigraph"],"cli":{"name":"oxigraph","version":"sh: 1: oxigraph: not found"}},"imports":["from pyoxigraph import Store","from pyoxigraph import NamedNode","from pyoxigraph import Literal","from pyoxigraph import Triple","from pyoxigraph import QueryEvaluator"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"from pyoxigraph import Store, NamedNode, Literal, Triple\n\n# Create an in-memory store\nstore = Store()\n\n# Define some RDF terms\nex_s = NamedNode(\"http://example.com/subject\")\nex_p = NamedNode(\"http://example.com/predicate\")\nex_o = Literal(\"object value\")\n\n# Add a triple to the store\nstore.add(Triple(ex_s, ex_p, ex_o))\n\n# Add another triple\nstore.add(Triple(NamedNode(\"http://example.com/another\"), NamedNode(\"http://example.com/knows\"), ex_s))\n\n# Query the store using SPARQL\nprint(\"\\n--- Query Results ---\")\nresults = store.query(\"SELECT ?s ?p ?o WHERE { ?s ?p ?o }\")\nfor s, p, o in results:\n    print(f\"Subject: {s}, Predicate: {p}, Object: {o}\")\n\n# Check if the store contains a specific triple\nif store.contains(Triple(ex_s, ex_p, ex_o)):\n    print(f\"\\nStore contains: {ex_s} {ex_p} {ex_o}\")","lang":"python","description":"This example demonstrates how to create a `Store`, add RDF `Triple`s using `NamedNode` and `Literal` terms, and then query the store using a simple SPARQL `SELECT` statement.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}