Skip to main content

PyRDB2RDF

Project description

PyRDB2RDF provides RDFLib with an interface to relational databases as RDF stores, accessed via SQLAlchemy, and mapped to RDF according to the specifications of RDB2RDF.

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

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

dm_db = _sqla.create_engine('postgresql://test:test@localhost/test_dm')
dm_graph = _rdf.Graph('rdb2rdf_dm')
dm_graph.open(dm_db)

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

Changelog

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

rdb2rdf-0.1.0.tar.gz (28.8 kB view details)

Uploaded Source

Built Distributions

rdb2rdf-0.1.0-py2.7.egg (16.3 kB view details)

Uploaded Source

rdb2rdf-0.1.0-py2-none-any.whl (20.9 kB view details)

Uploaded Python 2

File details

Details for the file rdb2rdf-0.1.0.tar.gz.

File metadata

  • Download URL: rdb2rdf-0.1.0.tar.gz
  • Upload date:
  • Size: 28.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for rdb2rdf-0.1.0.tar.gz
Algorithm Hash digest
SHA256 cdb8ce9d1286c2f553503ae4a827fe55ad61f6cbee73546806b917cb28b08469
MD5 61fd0070d7e3358ff92955b24a9cfc68
BLAKE2b-256 b236be180134cab9725749bd3d7f8878f33365f38072a21b5318bfd476cf2dd5

See more details on using hashes here.

Provenance

File details

Details for the file rdb2rdf-0.1.0-py2.7.egg.

File metadata

  • Download URL: rdb2rdf-0.1.0-py2.7.egg
  • Upload date:
  • Size: 16.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for rdb2rdf-0.1.0-py2.7.egg
Algorithm Hash digest
SHA256 7df6745b09abc32c24748878b15a0236530627103ea48579bf02b45b5e7a26a2
MD5 1afd9ddb1a2a646549c2980cffe65df0
BLAKE2b-256 c8de0834c179618a4f7f8133de8c73af2fc771eb72807e0fcf80aa2aabd2d6b5

See more details on using hashes here.

Provenance

File details

Details for the file rdb2rdf-0.1.0-py2-none-any.whl.

File metadata

File hashes

Hashes for rdb2rdf-0.1.0-py2-none-any.whl
Algorithm Hash digest
SHA256 dbf9d6333c31df2bbea554a5c52bfc1a4452228acd15ccb22ef85b009ace2b47
MD5 12100874ad6a223295e5ed4bb5b40e31
BLAKE2b-256 b88dd8fffaa0b7ca9c24154b8d152c45f0ff6bf7ddff0d67da73ae4780ca34f3

See more details on using hashes here.

Provenance

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