Package rdfalchemy :: Package engine
[hide private]
[frames] | no frames]

Package engine

source code

Functions [hide private]
 
create_engine(url='', identifier='', create=False)
e.g.:
source code
 
engine_from_config(configuration, prefix='rdfalchemy.', **kwargs)
Create a new Engine instance using a configuration dictionary.
source code
 
_parse_rfc1738_args(name)
parse url str into options code orig from sqlalchemy.engine.url
source code
Function Details [hide private]

create_engine(url='', identifier='', create=False)

source code 

e.g.:

  • create_engine('mysql://myname@localhost/rdflibdb')
  • create_engine('sleepycat://~/working/rdf_db')
  • create_engine('zodb:///var/rdflib/Data.fs')
  • create_engine('zodb://localhost:8672')
  • create_engine('sesame://www.example.com:8080/openrdf-sesame/repositories/Test')
  • create_engine('sparql://www.example.com:2020/sparql')

for zodb:

the key in the Zope database is hardcoded as 'rdflib' urls ending in .fs indicate FileStorage otherwise ClientStoreage is assumed which requires a ZEO Server to be running
Parameters:
  • url - a string of the url
  • identifier - URIRef of the default context for writing
Returns:
returns an open rdflib ConjunctiveGraph

engine_from_config(configuration, prefix='rdfalchemy.', **kwargs)

source code 

Create a new Engine instance using a configuration dictionary.

where keys are prefixed, such as rdfalchemy.dburi, etc. :param prefix: indicates the prefix to be searched for.

Parameters:
  • configuration - a dictionary, typically produced from a config file