{"id":18536417,"url":"https://github.com/navicore/triples","last_synced_at":"2025-09-09T14:33:48.652Z","repository":{"id":193891247,"uuid":"689685883","full_name":"navicore/triples","owner":"navicore","description":"Experimental Rust lib to store any data as RDF","archived":false,"fork":false,"pushed_at":"2025-04-07T18:12:37.000Z","size":611,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-07T19:26:07.166Z","etag":null,"topics":["csv","rdf","triples"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/navicore.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-09-10T15:40:44.000Z","updated_at":"2025-04-07T18:11:38.000Z","dependencies_parsed_at":"2023-11-20T14:28:19.359Z","dependency_job_id":"5c01b49c-0a69-4927-a305-e4f9d2332edf","html_url":"https://github.com/navicore/triples","commit_stats":null,"previous_names":["navicore/triples"],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/navicore%2Ftriples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/navicore%2Ftriples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/navicore%2Ftriples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/navicore%2Ftriples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/navicore","download_url":"https://codeload.github.com/navicore/triples/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248068120,"owners_count":21042426,"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","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":["csv","rdf","triples"],"created_at":"2024-11-06T19:33:29.297Z","updated_at":"2025-04-09T16:34:06.197Z","avatar_url":"https://github.com/navicore.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# triples\n\nExperimental Rust lib to store any data in triple format.\n\n## Features\n\n* embedded\n* async\n* cli db maintenance tool\n* RDF / Turtle\n* import / export of non-RDF data\n\n## Overview\n\n* Rust API\n  * see [crate](https://crates.io/crates/triples)\n* stores subject, predicate, and object where\n  * subject is always an RDF name\n  * predicate is always an RDF name\n  * object is always a UTF string\n\n## Install\n\n```bash\ncargo install triples\n```\nor\n\nsee [crate](https://crates.io/crates/triples)\n\n## Usage\n\nFor API usage, see the unit tests in [db_api](\"./src/db_api.rs\") for now.\n\nFor cli usage:\n\n```bash\ntriples -h\n```\n\n```bash\nA lib and cli for storing data triples\n\nUsage: triples [OPTIONS] \u003cCOMMAND\u003e\n\nCommands:\n  import-turtle\n  export-turtle\n  import-csv\n  export-csv\n  help           Print this message or the help of the given subcommand(s)\n\nOptions:\n  -d, --db-location \u003cDB_LOCATION\u003e  [default: /tmp/triples.db]\n  -h, --help                       Print help\n  -V, --version                    Print version\n```\n\nimport csv and prepend NS prefixes\n\n```bash\ncat ../vssgen/vss_sm.csv | triples -d /tmp/vss.db import-csv --subject-default-ns https://myvss.com/id --predicate-default-ns https://myvss.com/data --skip-headers\n```\n\nexport ttl\n\n```bash\ntriples --db-location /tmp/vss.db export-turtle\n```\n\n```bash\n@prefix ns1: \u003chttps://myvss.com/id/\u003e .\n\n@prefix ns2: \u003chttps://myvss.com/data/\u003e .\n\nns1:d654c9bc-37d7-425e-945b-41a4440da236\n    ns2:has_chassis \"1ad84bfb-2017-4c42-b28f-de938755cb00\" ;\n    ns2:timestamp \"2023-09-17 21:07:36\" ;\n    ns2:type \"vehicle\" ;\n    ns2:has_drivetrain \"8db9fa98-5017-43d3-accd-bebe822a4066\" ;\n    ns2:vehicle_id \"0\" ; .\n\nns1:1ad84bfb-2017-4c42-b28f-de938755cb00\n    ns2:brake_status \"False\" ;\n    ns2:type \"chassis\" ;\n    ns2:speed \"79\" ; .\n\nns1:8db9fa98-5017-43d3-accd-bebe822a4066\n    ns2:engine_temperature \"106\" ;\n    ns2:fuel_level \"56\" ;\n    ns2:type \"drivetrain\" ;\n    ns2:battery_level \"3\" ; .\n```\n\n## TODO\n\n* ~~bulk loading and exporting via cli~~\n* ~~normalizes RDF names~~\n* ~~normalizing object values~~\n* ~~import / export of RDF Turtle `*.tll` format~~\n* ~~import / export of triple csv `*.csv` format~~\n* ~~meaningful prefix names on export~~\n* better export tests\n* import of arbitrary column csv `*.csv` format\n* import of arbitrary json `*.json` format\n* import of arbitrary jsonl `*.jsonl` format\n* txn control via api\n* insert performance\n* SparkQL\n\n----------\n__PRs welcome__\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnavicore%2Ftriples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnavicore%2Ftriples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnavicore%2Ftriples/lists"}