{"id":32176368,"url":"https://github.com/oxigraph/oxrdflib","last_synced_at":"2025-10-21T19:59:11.924Z","repository":{"id":48533687,"uuid":"286125165","full_name":"oxigraph/oxrdflib","owner":"oxigraph","description":"Oxrdflib provides rdflib stores using pyoxigraph","archived":false,"fork":false,"pushed_at":"2025-10-13T19:17:46.000Z","size":92,"stargazers_count":41,"open_issues_count":7,"forks_count":6,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-10-21T19:59:01.659Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oxigraph.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-08-08T21:58:14.000Z","updated_at":"2025-10-13T19:17:49.000Z","dependencies_parsed_at":"2023-01-20T22:16:34.667Z","dependency_job_id":"325ffc83-776f-4dc8-9581-29422d6ce730","html_url":"https://github.com/oxigraph/oxrdflib","commit_stats":{"total_commits":43,"total_committers":4,"mean_commits":10.75,"dds":"0.16279069767441856","last_synced_commit":"08178edd5033a7cb4de0fe6bf7d3e9f38feb7b2d"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/oxigraph/oxrdflib","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oxigraph%2Foxrdflib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oxigraph%2Foxrdflib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oxigraph%2Foxrdflib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oxigraph%2Foxrdflib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oxigraph","download_url":"https://codeload.github.com/oxigraph/oxrdflib/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oxigraph%2Foxrdflib/sbom","scorecard":{"id":715964,"data":{"date":"2025-08-11","repo":{"name":"github.com/oxigraph/oxrdflib","commit":"70d99ac8b855af9524b2bee8697005711d588b2d"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.8,"checks":[{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 2/27 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/build.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/oxigraph/oxrdflib/build.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/oxigraph/oxrdflib/build.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/oxigraph/oxrdflib/build.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/oxigraph/oxrdflib/build.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:31: update your workflow using https://app.stepsecurity.io/secureworkflow/oxigraph/oxrdflib/build.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build.yml:32: update your workflow using https://app.stepsecurity.io/secureworkflow/oxigraph/oxrdflib/build.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:39: update your workflow using https://app.stepsecurity.io/secureworkflow/oxigraph/oxrdflib/build.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build.yml:40: update your workflow using https://app.stepsecurity.io/secureworkflow/oxigraph/oxrdflib/build.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build.yml:42: update your workflow using https://app.stepsecurity.io/secureworkflow/oxigraph/oxrdflib/build.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:55: update your workflow using https://app.stepsecurity.io/secureworkflow/oxigraph/oxrdflib/build.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build.yml:56: update your workflow using https://app.stepsecurity.io/secureworkflow/oxigraph/oxrdflib/build.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build.yml:58: update your workflow using https://app.stepsecurity.io/secureworkflow/oxigraph/oxrdflib/build.yml/main?enable=pin","Info:   0 out of   5 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   7 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.md:0","Info: FSF or OSI recognized license: BSD 3-Clause \"New\" or \"Revised\" License: LICENSE.md:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/build.yml:46"],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 26 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-22T09:39:47.993Z","repository_id":48533687,"created_at":"2025-08-22T09:39:47.993Z","updated_at":"2025-08-22T09:39:47.993Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280325297,"owners_count":26311419,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-21T02:00:06.614Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-21T19:59:10.538Z","updated_at":"2025-10-21T19:59:11.918Z","avatar_url":"https://github.com/oxigraph.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Oxrdflib\n========\n\n[![PyPI](https://img.shields.io/pypi/v/oxrdflib)](https://pypi.org/project/oxrdflib/)\n![PyPI - Implementation](https://img.shields.io/pypi/implementation/oxrdflib)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/oxrdflib)\n[![actions status](https://github.com/oxigraph/oxrdflib/workflows/build/badge.svg)](https://github.com/oxigraph/oxrdflib/actions)\n[![Gitter](https://badges.gitter.im/oxigraph/community.svg)](https://gitter.im/oxigraph/community?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge)\n\nOxrdflib provides an [rdflib](https://rdflib.readthedocs.io/) store based on [pyoxigraph](https://oxigraph.org/pyoxigraph/).\nThis store is named `\"Oxigraph\"`.\n\nIt also exposes pyoxigraph parsers and serializers as rdflib parser and serializer plugins.\n\nOxigraph store can be used as drop-in replacement of the rdflib default one. It support context but not formulas.\nTransaction support is not implemented yet.\n\nSPARQL query and update evaluation is done by pyoxigraph instead of rdflib if the Oxigraph store is used.\nSPARQL update evaluation on `Graph` and `ConjunctiveGraph` is still done\nusing rdflib because of [a limitation in rdflib context management](https://github.com/RDFLib/rdflib/issues/1396).\n\nOxrdflib is [available on Pypi](https://pypi.org/project/oxrdflib/) and installable with:\n```bash\npip install oxrdflib\n```\n\nThe oxrdflib store is automatically registered as an rdflib store plugin by setuptools.\n\n*Warning:* Oxigraph is not stable yet and its storage format might change in the future.\nTo migrate to future version you might have to dump and load the store content.\nHowever, Oxigraph should be in a good enough shape to power most of use cases if you are not afraid of down time and data loss.\n\n## API\n\n### Store\n\nTo create a rdflib graph using the Oxigraph store use\n```python\nrdflib.Graph(store=\"Oxigraph\")\n```\ninstead of the usual\n```python\nrdflib.Graph()\n```\n\nSimilarly, to get a dataset, use\n\n```python\nrdflib.Dataset(store=\"Oxigraph\")\n```\ninstead of the usual\n```python\nrdflib.Dataset()\n```\n\nIf you want to get the store data persisted on disk, use the `open` method on the `Graph` or `Dataset` object with the directory where data should be persisted. For example:\n```python\ngraph = rdflib.Graph(store=\"Oxigraph\", identifier=\"http://example.com\") # without identifier, some blank node will be used\ngraph.open(\"test_dir\")\n```\nThe store is closed with the `close()` method or automatically when Python garbage collector collects the store object.\n\nIf the `open` method is not called Oxigraph will automatically use a ramdisk on Linux and a temporary file in the other operating systems.\n\nTo do anything else, use the usual rdflib python API.\n\nIt is also possible to directly inject a [pyoxigraph `Store` object](https://pyoxigraph.readthedocs.io/en/stable/store.html#pyoxigraph.Store) directly into an Oxrdflib store:\n\n```python\ngraph = rdflib.Graph(store=oxrdflib.OxigraphStore(store=pyoxigraph.Store(\"test_dir\")))\n```\n\nThis might be handy to e.g. open the database as read-only:\n\n```python\ngraph = rdflib.Graph(store=oxrdflib.OxigraphStore(store=pyoxigraph.Store.read_only(\"test_dir\")))\n```\n\n### Parsers and serializers\n\nTo use Oxigraph parser, prefix the format identifiers with `ox-`.\nFor example, to load data using the Oxigraph NTriples parser:\n```python\ngraph.parse(data, format=\"ox-nt\")\n```\nand to serialize to Turtle:\n```python\ngraph.serialize(format=\"ox-ttl\")\n```\n\nThe following formats are supported:\n- `ox-ntriples` (`ox-nt`)\n- `ox-nquads` (`ox-nq`)\n- `ox-turtle` (`ox-ttl`)\n- `ox-trig`\n- `ox-n3`\n- `ox-xml`\n- `ox-json-ld` (`ox-streaming-json-ld` for streaming JSON-LD, note that only JSON-LD 1.0 is supported)\n\nNote that Oxigraph parser and serializers are not 1:1 compatible with the rdflib ones and some minor differences exist.\n\nAn optimization has also been setup to skip Python entirely\nif the Oxigraph parsers and serializers are used with the Oxigraph store.\n\n## Differences with rdflib default store\n- relative IRIs are not supported by Oxigraph.\n- IRI prefixes set using the `Graph` `bind` method are not persisted on disk but kept in memory. They should be added again each time the store is opened.\n\n## Migration guide\n\n### From 0.2 to 0.3\n* The 0.2 stores named `\"OxSled\"` and `\"OxMemory\"` have been merged into the `\"Oxigraph\"` store.\n* The on-disk storage system provided by `\"OxSled\"` has been dropped and replaced by a new storage system based on [RocksDB](https://rocksdb.org/).\n  To migrate you need to first dump your data in RDF using `oxrdflib` 0.2 and the `serialize` method, then upgrade to `oxrdflib` 0.3, and finally reload the data using the `parse` method.\n\n## Development\n\nTo run the test do first `pip install -e .` to register the stores in rdflib plugin registry.\nThen, `cd tests \u0026\u0026 python -m unittest` should run the tests.\n\nThe code is automatically formatted using [black](https://github.com/psf/black). A [pre-commit](https://pre-commit.com/) configuration is provided.\nRun `pip install pre-commit \u0026\u0026 pre-commit install` to install pre-commit as a git pre-commit hook in your clone.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foxigraph%2Foxrdflib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foxigraph%2Foxrdflib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foxigraph%2Foxrdflib/lists"}