{"id":19494671,"url":"https://github.com/ozekik/lightrdf","last_synced_at":"2025-09-14T21:15:17.919Z","repository":{"id":41102554,"uuid":"248723076","full_name":"ozekik/lightrdf","owner":"ozekik","description":"A fast and lightweight Python RDF parser which wraps bindings to Rust's Rio using PyO3","archived":false,"fork":false,"pushed_at":"2023-09-26T10:57:09.000Z","size":246,"stargazers_count":32,"open_issues_count":6,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-07-20T06:41:15.665Z","etag":null,"topics":["linked-data","ntriples","owl","pyo3","python","rdf","rust","semantic-web","turtle"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ozekik.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2020-03-20T10:02:41.000Z","updated_at":"2025-06-26T12:38:54.000Z","dependencies_parsed_at":"2023-12-28T06:23:59.381Z","dependency_job_id":"c29801f8-7146-401e-aea0-228ac32cabc0","html_url":"https://github.com/ozekik/lightrdf","commit_stats":{"total_commits":78,"total_committers":1,"mean_commits":78.0,"dds":0.0,"last_synced_commit":"aff4370a52df1e47d6c7b33f368f8d286175420a"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/ozekik/lightrdf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ozekik%2Flightrdf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ozekik%2Flightrdf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ozekik%2Flightrdf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ozekik%2Flightrdf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ozekik","download_url":"https://codeload.github.com/ozekik/lightrdf/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ozekik%2Flightrdf/sbom","scorecard":{"id":716267,"data":{"date":"2025-08-18","repo":{"name":"github.com/ozekik/lightrdf","commit":"aff4370a52df1e47d6c7b33f368f8d286175420a"},"scorecard":{"version":"v5.2.1-41-g40576783","commit":"40576783fda6698350fcbbeaea760ff827433034"},"score":2.4,"checks":[{"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/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#maintained"}},{"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/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#cii-best-practices"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 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/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#code-review"}},{"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/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#binary-artifacts"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#sast"}},{"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/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#fuzzing"}},{"name":"Dangerous-Workflow","score":0,"reason":"dangerous workflow patterns detected","details":["Warn: script injection with untrusted input ' contains(github.event.head_commit.message, '[skip ci]') ': .github/workflows/ci.yaml:27"],"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"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/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#packaging"}},{"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/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#security-policy"}},{"name":"Token-Permissions","score":10,"reason":"GitHub workflow tokens follow principle of least privilege","details":["Info: topLevel 'contents' permission set to 'read': .github/workflows/ci.yaml:19","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/40576783fda6698350fcbbeaea760ff827433034/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/ci.yaml:193: update your workflow using https://app.stepsecurity.io/secureworkflow/ozekik/lightrdf/ci.yaml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yaml:197: update your workflow using https://app.stepsecurity.io/secureworkflow/ozekik/lightrdf/ci.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yaml:34: update your workflow using https://app.stepsecurity.io/secureworkflow/ozekik/lightrdf/ci.yaml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yaml:37: update your workflow using https://app.stepsecurity.io/secureworkflow/ozekik/lightrdf/ci.yaml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yaml:44: update your workflow using https://app.stepsecurity.io/secureworkflow/ozekik/lightrdf/ci.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yaml:68: update your workflow using https://app.stepsecurity.io/secureworkflow/ozekik/lightrdf/ci.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yaml:69: update your workflow using https://app.stepsecurity.io/secureworkflow/ozekik/lightrdf/ci.yaml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yaml:73: update your workflow using https://app.stepsecurity.io/secureworkflow/ozekik/lightrdf/ci.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yaml:91: update your workflow using https://app.stepsecurity.io/secureworkflow/ozekik/lightrdf/ci.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yaml:107: update your workflow using https://app.stepsecurity.io/secureworkflow/ozekik/lightrdf/ci.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yaml:108: update your workflow using https://app.stepsecurity.io/secureworkflow/ozekik/lightrdf/ci.yaml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yaml:113: update your workflow using https://app.stepsecurity.io/secureworkflow/ozekik/lightrdf/ci.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yaml:129: update your workflow using https://app.stepsecurity.io/secureworkflow/ozekik/lightrdf/ci.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yaml:144: update your workflow using https://app.stepsecurity.io/secureworkflow/ozekik/lightrdf/ci.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yaml:145: update your workflow using https://app.stepsecurity.io/secureworkflow/ozekik/lightrdf/ci.yaml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yaml:149: update your workflow using https://app.stepsecurity.io/secureworkflow/ozekik/lightrdf/ci.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yaml:166: update your workflow using https://app.stepsecurity.io/secureworkflow/ozekik/lightrdf/ci.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yaml:175: update your workflow using https://app.stepsecurity.io/secureworkflow/ozekik/lightrdf/ci.yaml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yaml:177: update your workflow using https://app.stepsecurity.io/secureworkflow/ozekik/lightrdf/ci.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yaml:182: update your workflow using https://app.stepsecurity.io/secureworkflow/ozekik/lightrdf/ci.yaml/master?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/ci.yaml:123","Warn: pipCommand not pinned by hash: .github/workflows/ci.yaml:124","Warn: pipCommand not pinned by hash: .github/workflows/ci.yaml:125","Info:   0 out of  13 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   7 third-party GitHubAction dependencies pinned","Info:   0 out of   3 pipCommand 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/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#pinned-dependencies"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#branch-protection"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact v0.3.1+001 not signed: https://api.github.com/repos/ozekik/lightrdf/releases/78486894","Warn: release artifact v0.3.1 not signed: https://api.github.com/repos/ozekik/lightrdf/releases/76222568","Warn: release artifact v0.3.0 not signed: https://api.github.com/repos/ozekik/lightrdf/releases/76212341","Warn: release artifact v0.3.1+001 does not have provenance: https://api.github.com/repos/ozekik/lightrdf/releases/78486894","Warn: release artifact v0.3.1 does not have provenance: https://api.github.com/repos/ozekik/lightrdf/releases/76222568","Warn: release artifact v0.3.0 does not have provenance: https://api.github.com/repos/ozekik/lightrdf/releases/76212341"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#signed-releases"}},{"name":"Vulnerabilities","score":5,"reason":"5 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-pph8-gcv7-4qj5","Warn: Project is vulnerable to: RUSTSEC-2025-0020","Warn: Project is vulnerable to: GHSA-c827-hfw6-qwvm","Warn: Project is vulnerable to: PYSEC-2024-48 / GHSA-fj7x-q9j7-g6q6","Warn: Project is vulnerable to: PYSEC-2024-187 / GHSA-rqc4-2hc7-8c8v"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-22T09:45:45.384Z","repository_id":41102554,"created_at":"2025-08-22T09:45:45.384Z","updated_at":"2025-08-22T09:45:45.384Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275168692,"owners_count":25417178,"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-09-14T02:00:10.474Z","response_time":75,"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":["linked-data","ntriples","owl","pyo3","python","rdf","rust","semantic-web","turtle"],"created_at":"2024-11-10T21:31:25.875Z","updated_at":"2025-09-14T21:15:17.896Z","avatar_url":"https://github.com/ozekik.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LightRDF\n\n[![](https://github.com/ozekik/lightrdf/workflows/CI/badge.svg)](https://github.com/ozekik/lightrdf/actions)\n[![PyPI](https://img.shields.io/pypi/v/lightrdf.svg)](https://pypi.python.org/pypi/lightrdf/)\n[![PyPI - Downloads](https://img.shields.io/pypi/dm/lightrdf.svg)](https://pypistats.org/packages/lightrdf)\n\nA fast and lightweight Python RDF parser which wraps bindings to Rust's [Rio](https://github.com/Tpt/rio) using [PyO3](https://github.com/PyO3/pyo3).\n\n## Contents\n\n- [Features](#features)\n- [Install](#install)\n- [Basic Usage](#basic-usage)\n  - [Iterate over all triples](#iterate-over-all-triples)\n  - [Search triples with a triple pattern](#search-triples-with-a-triple-pattern)\n  - [Search triples with a triple pattern (Regex)](#search-triples-with-a-triple-pattern-regex)\n  \u003c!-- - [Parse IRIs, blank nodes, literals](#parse-terms) --\u003e\n  - [Load file objects / texts](#load-file-objects--parse-texts)\n- [Benchmark (WIP)](#benchmark-wip)\n- [Alternatives](#alternatives)\n- [Todo](#todo)\n- [License](#license)\n\n## Features\n\n- Supports N-Triples, Turtle, and RDF/XML\n- Handles large-size RDF documents\n- Simple interfaces for parsing and searching triples\n- Support regex in triple patterns\n\n## Install\n\n```\npip install lightrdf\n```\n\n## Basic Usage\n\n### Iterate over all triples\n\nWith `Parser`:\n\n```python\nimport lightrdf\n\nparser = lightrdf.Parser()\n\nfor triple in parser.parse(\"./go.owl\", base_iri=None):\n    print(triple)\n```\n\nWith `RDFDocument`:\n\n```python\nimport lightrdf\n\ndoc = lightrdf.RDFDocument(\"./go.owl\")\n\n# `None` matches arbitrary term\nfor triple in doc.search_triples(None, None, None):\n    print(triple)\n```\n\n### Search triples with a triple pattern\n\n```python\nimport lightrdf\n\ndoc = lightrdf.RDFDocument(\"./go.owl\")\n\nfor triple in doc.search_triples(\"http://purl.obolibrary.org/obo/GO_0005840\", None, None):\n    print(triple)\n\n# Output:\n# ('\u003chttp://purl.obolibrary.org/obo/GO_0005840\u003e', '\u003chttp://www.w3.org/1999/02/22-rdf-syntax-ns#type\u003e', '\u003chttp://www.w3.org/2002/07/owl#Class\u003e')\n# ('\u003chttp://purl.obolibrary.org/obo/GO_0005840\u003e', '\u003chttp://www.w3.org/2000/01/rdf-schema#subClassOf\u003e', '\u003chttp://purl.obolibrary.org/obo/GO_0043232\u003e')\n# ...\n# ('\u003chttp://purl.obolibrary.org/obo/GO_0005840\u003e', '\u003chttp://www.geneontology.org/formats/oboInOwl#inSubset\u003e', '\u003chttp://purl.obolibrary.org/obo/go#goslim_yeast\u003e')\n# ('\u003chttp://purl.obolibrary.org/obo/GO_0005840\u003e', '\u003chttp://www.w3.org/2000/01/rdf-schema#label\u003e', '\"ribosome\"^^\u003chttp://www.w3.org/2001/XMLSchema#string\u003e')\n```\n\n### Search triples with a triple pattern (Regex)\n\n```python\nimport lightrdf\nfrom lightrdf import Regex\n\ndoc = lightrdf.RDFDocument(\"./go.owl\")\n\nfor triple in doc.search_triples(Regex(\"^\u003chttp://purl.obolibrary.org/obo/.*\u003e$\"), None, Regex(\".*amino[\\w]+?transferase\")):\n    print(triple)\n\n# Output:\n# ('\u003chttp://purl.obolibrary.org/obo/GO_0003961\u003e', '\u003chttp://www.w3.org/2000/01/rdf-schema#label\u003e', '\"O-acetylhomoserine aminocarboxypropyltransferase activity\"^^\u003chttp://www.w3.org/2001/XMLSchema#string\u003e')\n# ('\u003chttp://purl.obolibrary.org/obo/GO_0004047\u003e', '\u003chttp://www.geneontology.org/formats/oboInOwl#hasExactSynonym\u003e', '\"S-aminomethyldihydrolipoylprotein:(6S)-tetrahydrofolate aminomethyltransferase (ammonia-forming) activity\"^^\u003chttp://www.w3.org/2001/XMLSchema#string\u003e')\n# ...\n# ('\u003chttp://purl.obolibrary.org/obo/GO_0050447\u003e', '\u003chttp://www.w3.org/2000/01/rdf-schema#label\u003e', '\"zeatin 9-aminocarboxyethyltransferase activity\"^^\u003chttp://www.w3.org/2001/XMLSchema#string\u003e')\n# ('\u003chttp://purl.obolibrary.org/obo/GO_0050514\u003e', '\u003chttp://www.geneontology.org/formats/oboInOwl#hasExactSynonym\u003e', '\"spermidine:putrescine 4-aminobutyltransferase (propane-1,3-diamine-forming)\"^^\u003chttp://www.w3.org/2001/XMLSchema#string\u003e')\n```\n\n\u003c!-- ### Parse IRIs, blank nodes, literals\n\n```python\nimport lightrdf\nfrom lightrdf import is_iri, is_blank, is_literal, parse\n\ndoc = lightrdf.RDFDocument(\"./go.owl\")\n\nfor s, p, o in doc.search_triples(None, None, None):\n    if is_iri(s):\n        s = parse.iri(s)\n``` --\u003e\n\n### Load file objects / texts\n\nLoad file objects with `Parser`:\n\n```python\nimport lightrdf\n\nparser = lightrdf.Parser()\n\nwith open(\"./go.owl\", \"rb\") as f:\n    for triple in parser.parse(f, format=\"owl\", base_iri=None):\n        print(triple)\n```\n\nLoad file objects with `RDFDocument`:\n\n```python\nimport lightrdf\n\nwith open(\"./go.owl\", \"rb\") as f:\n    doc = lightrdf.RDFDocument(f, parser=lightrdf.xml.PatternParser)\n\n    for triple in doc.search_triples(\"http://purl.obolibrary.org/obo/GO_0005840\", None, None):\n        print(triple)\n```\n\nLoad texts:\n\n```python\nimport io\nimport lightrdf\n\ndata = \"\"\"\u003chttp://one.example/subject1\u003e \u003chttp://one.example/predicate1\u003e \u003chttp://one.example/object1\u003e .\n_:subject1 \u003chttp://an.example/predicate1\u003e \"object1\" .\n_:subject2 \u003chttp://an.example/predicate2\u003e \"object2\" .\"\"\"\n\ndoc = lightrdf.RDFDocument(io.BytesIO(data.encode()), parser=lightrdf.turtle.PatternParser)\n\nfor triple in doc.search_triples(\"http://one.example/subject1\", None, None):\n    print(triple)\n```\n\n## Benchmark (WIP)\n\n\u003e On MacBook Air (13-inch, 2017), 1.8 GHz Intel Core i5, 8 GB 1600 MHz DDR3\n\n\u003chttps://gist.github.com/ozekik/b2ae3be0fcaa59670d4dd4759cdffbed\u003e\n\n```bash\n$ wget -q http://purl.obolibrary.org/obo/go.owl\n$ gtime python3 count_triples_rdflib_graph.py ./go.owl  # RDFLib 4.2.2\n1436427\n235.29user 2.30system 3:59.56elapsed 99%CPU (0avgtext+0avgdata 1055816maxresident)k\n0inputs+0outputs (283major+347896minor)pagefaults 0swaps\n$ gtime python3 count_triples_lightrdf_rdfdocument.py ./go.owl  # LightRDF 0.1.1\n1436427\n7.90user 0.22system 0:08.27elapsed 98%CPU (0avgtext+0avgdata 163760maxresident)k\n0inputs+0outputs (106major+41389minor)pagefaults 0swaps\n$ gtime python3 count_triples_lightrdf_parser.py ./go.owl  # LightRDF 0.1.1\n1436427\n8.00user 0.24system 0:08.47elapsed 97%CPU (0avgtext+0avgdata 163748maxresident)k\n0inputs+0outputs (106major+41388minor)pagefaults 0swaps\n```\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"assets/benchmark1.png\" width=\"480\" /\u003e\n\u003c/p\u003e\n\n\u003chttps://gist.github.com/ozekik/636a8fb521401070e02e010ce591fa92\u003e\n\n```bash\n$ wget -q http://downloads.dbpedia.org/2016-10/dbpedia_2016-10.nt\n$ gtime python3 count_triples_rdflib_ntparser.py dbpedia_2016-10.nt  # RDFLib 4.2.2\n31050\n1.63user 0.23system 0:02.47elapsed 75%CPU (0avgtext+0avgdata 26568maxresident)k\n0inputs+0outputs (1140major+6118minor)pagefaults 0swaps\n$ gtime python3 count_triples_lightrdf_ntparser.py dbpedia_2016-10.nt  # LightRDF 0.1.1\n31050\n0.21user 0.04system 0:00.36elapsed 71%CPU (0avgtext+0avgdata 7628maxresident)k\n0inputs+0outputs (534major+1925minor)pagefaults 0swaps\n```\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"assets/benchmark2.png\" width=\"480\" /\u003e\n\u003c/p\u003e\n\n## Alternatives\n\n- [RDFLib](https://github.com/RDFLib/rdflib) – (Pros) pure-Python, matured, feature-rich / (Cons) takes some time to load triples\n- [pyHDT](https://github.com/Callidon/pyHDT) – (Pros) extremely fast and efficient / (Cons) requires pre-conversion into HDT\n\n## Todo\n\n- [x] Push to PyPI\n- [x] Adopt CI\n- [x] Handle Base IRI\n- [x] Add basic tests\n- [ ] Switch to maturin-action from cibuildwheel\n- [ ] Support NQuads and TriG\n- [ ] Add docs\n- [ ] Add tests for [w3c/rdf-tests](https://github.com/w3c/rdf-tests)\n- [ ] Resume on error\n- [x] Allow opening fp\n- [ ] Support and test on RDF-star\n\n## License\n\n[Rio](https://github.com/Tpt/rio) and [PyO3](https://github.com/PyO3/pyo3) are licensed under the Apache-2.0 license.\n\n    Copyright 2020 Kentaro Ozeki\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fozekik%2Flightrdf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fozekik%2Flightrdf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fozekik%2Flightrdf/lists"}