Skip to main content

PyRDB2RDF

PyRDB2RDF provides RDFLib with an interface to relational databases as RDF stores. The underlying data is accessed via SQLAlchemy. It is mapped to RDF according to the specifications of RDB2RDF. The corresponding RDF graph is represented as an RDFLib graph.

Translating from relational data to RDF via direct mapping is currently supported. Translating in the other direction and mapping with R2RML are planned but not yet implemented.

Installation

pip install rdb2rdf

Examples

Serializing a database as N-Triples

Suppose the local PostgreSQL database test_dm contains data that we want to translate to RDF and serialize as N-Triples. The following code achieves that.

import rdflib as _rdf
import sqlalchemy as _sqla

db_str = 'postgresql://testuser:testpasswd@localhost/testdb'
db = _sqla.create_engine(db_str)
graph = _rdf.Graph('rdb2rdf_dm')
graph.open(db)

print(graph.serialize(format='nt'))

Changelog

0.1.2

  • Updated references to Spruce projects (lang, iri, types) and Goose Types.

  • Improved the setup script.

  • Improved documentation.

0.1.1

  • Added a missing installation dependency.

0.1.0

First public release.

Metadata

Release files for rdb2rdf 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rdb2rdf 0.1.3
File Size Uploaded Provenance
rdb2rdf-0.1.3.tar.gz 29.9 kB Without provenance Details

Built distributions (wheels)

Table of built distributions (wheels) for rdb2rdf 0.1.3
File Interpreter ABI Platform
rdb2rdf-0.1.3-py2.7.egg Legacy Egg format - - Details
rdb2rdf-0.1.3-py2-none-any.whl Python 2 none any Details

Total release size: 68.0 kB

Release files / rdb2rdf-0.1.3.tar.gz

Download URL rdb2rdf-0.1.3.tar.gz
Size 29.9 kB
Tags Source
SHA-256 checksum
How to use checksums
fa1c488f06cda256f6ca25f27e63a02a540a879946116c382a20ec81032793c2
BLAKE2b-256 checksum
How to use checksums
0420ec65e461969abbe4955d2bdef070872f895706af09d07f730f811ff6ee16
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / rdb2rdf-0.1.3-py2.7.egg

Download URL rdb2rdf-0.1.3-py2.7.egg
Size 16.7 kB
Tags Egg
SHA-256 checksum
How to use checksums
09b83d3b4eb43ee318a84790b3e543ca7a7e3473f83f60fa5e706df132534ff5
BLAKE2b-256 checksum
How to use checksums
d8a8cd58bbc4dd49b35efa23eae902ab545aefbc9529797035f2705a18e756a9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / rdb2rdf-0.1.3-py2-none-any.whl

Download URL rdb2rdf-0.1.3-py2-none-any.whl
Size 21.4 kB
Tags Python 2
SHA-256 checksum
How to use checksums
3e3e657392109a3899b92badb9d725964cd52c2fe574e3e82cf2f7490a57d9ae
BLAKE2b-256 checksum
How to use checksums
08edce8575b9bdf9c38e7c86fb2f2c672db3161e6b7398902663be175f794269
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for rdb2rdf 0.1.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page