franz.openrdf package

Subpackages

Submodules

franz.openrdf.connect module

Helper function for opening connections.

franz.openrdf.connect.ag_connect(repo, catalog=None, create=True, fail_if_exists=False, clear=False, session=False, autocommit=False, lifetime=None, loadinitfile=False, host=None, port=None, protocol=None, user=None, password=None, cainfo=None, sslcert=None, verifyhost=None, verifypeer=None, indices=None, proxy=None)

Create a connection to an AllegroGraph repository.

When closed the connection will take care of releasing all intermediate resources that were created in order to open it.

Parameters:
  • repo (string) – Repository name.

  • catalog (string) – Catalog name (optional, root catalog is the default).

  • create (bool) – if True (default) create the repository if it does not exist.

  • fail_if_exists (bool) – if True and the repository exists raise an exception. This applies only if create is True. The default value is False.

  • clear (bool) – if True delete all data after creating the connection. The default is False.

  • session (bool) – If True start a session after creating the connection. The default is False.

  • autocommit (bool) – When opening a session: if True, commits are done on each request, otherwise you will need to call commit() or rollback() as appropriate for your application. The default value is False.

  • lifetime (int) – Time (in seconds) before the session expires when idle. Note that the client maintains a thread that ping the session before this happens. Ignored if not starting a session.

  • loadinitfile (bool) – if True then the current initfile will be loaded for you when the session starts. The default is False. Ignored if not starting a session.

  • host (string) – AllegroGraph server host (default: '127.0.0.1' or the value of the AGRAPH_HOST environment variable if that is defined.` Can also be used to supply protocol and port number (e.g. https://localhost:10036).

  • protocol (string) – Either "http" or "https". The default is "http". Overrides the protocol specified in host.

  • port (int) – AllegroGraph server port (default: 10035 for http and 10036 for https, or the AGRAPH_PORT environment variable if that is defined). Overrides the port number provided in host.

  • user (string) – Username for authentication (default: value of the AGRAPH_USER environment variable).

  • password (string) – Password for authentication (default: value of the AGRAPH_PASSWORD environment variable).

  • cainfo (string) – Path to file or directory with CA certificates.

  • sslcert (string) – Path to a client certificate to use for authentication instead of username and password.

  • verifyhost (int) – See https://curl.haxx.se/libcurl/c/CURLOPT_SSL_VERIFYHOST.html

  • verifypeer (int) – See https://curl.haxx.se/libcurl/c/CURLOPT_SSL_VERIFYPEER.html

  • indices (list[string]) – List of indices to create if creating a new repository.

  • proxy (string) – Proxy specification string. The format is SCHEME://HOST:PORT. Supported schemes are ‘http’, ‘socks4’ and ‘socks5’. Note that for SOCKS proxies DNS requests are performed by the proxy server. The default value is taken from the AGRAPH_PROXY environment variable.

Returns:

A RepositoryConnection object.

Return type:

franz.openrdf.repositoryconnection.RepositoryConnection

franz.openrdf.exceptions module

exception franz.openrdf.exceptions.IllegalArgumentException

Bases: Exception

exception franz.openrdf.exceptions.IllegalOptionException

Bases: Exception

exception franz.openrdf.exceptions.QueryMissingFeatureException

Bases: Exception

Source language evokes a feature not supported by the execution language

exception franz.openrdf.exceptions.RDFHandlerException

Bases: Exception

exception franz.openrdf.exceptions.ServerException

Bases: Exception

Module contents