Skip to main content

No project description provided

Project description

<img src="lodkit.png" width=10% height=10%>

RDFIngest

tests Coverage Status license: GPL v3

RDFIngest - A simple tool for ingesting local and remote RDF data sources into a triplestore.

Requirements

  • Python >= 3.11

Installation

Usage

RDFIngest reads two YAML files:

  • a config file for obtaining triplestore credentials and
  • a registry which defines the RDF sources to be ingested.

Example config:

service:
  endpoint: "https://sometriplestore.endpoint"
  user: "admin"
  password: "supersecretpassword123"

Example registry:

graphs:
  
  # ttl
  - source: https://someremote.ttl
    graph_id: https://somenamedgraph.id

  # multiple ttl to a single named graph
  - source: [
    somelocal.ttl,
    https://someotherremote.ttl
    ]
    graph_id: https://someothernamedgraph.id
    
  # trig; no graph_id required
  - source: https://someremote.trig
  
  # trig + ttl
  - source: [
    https://someotherremote.trig,
    someotherlocal.ttl,
    yetanotherremote.ttl	
    ]
    graph_id: https://yetanothernamedgraph.id

For contextless RDF resources all graphs are merged into a named graph identified by graph_id.

RDF Datasets/Quad formats obviously do not require a graph_id field.
Multiple datasets are merged into a single dataset containing all named graphs of all datasets.

If the source field references both contextless and contextualized RDF sources, contextless sources are merged into a single named graph and added to the dataset.

The tool accepts both local and remote RDF data sources.

CLI

Run the rdfingest command.

rdfingest --config ./config.yaml --registry ./registry.yaml

Default values for config and registry are ./config.yaml and registry.yaml.

Also see rdfingest --help.

RDFIngest class

Point an RDFIngest instance to a config file and a registry and invoke run_ingest.

rdfingest = RDFIngest(
    config="./config.yaml"
    registry="./registry.yaml", 
)

rdfingest.run_ingest()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rdfingest-0.1.0.tar.gz (17.2 kB view hashes)

Uploaded Source

Built Distribution

rdfingest-0.1.0-py3-none-any.whl (19.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page