Skip to content

stardog_api

StardogApi

Source code in datasets/services/stardog_api.py
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
class StardogApi:
    endpoint: str
    credentials: str
    token: Optional[str] = None

    @staticmethod
    def admin() -> 'stardog.Admin':
        return stardog.Admin(**{
            'endpoint': settings.STARDOG_ENDPOINT,
            'username': settings.STARDOG_USER,
            'password': settings.STARDOG_PASS
        })

    @staticmethod
    def connection(name: str) -> 'stardog.Connection':
        return stardog.Connection(name, **{
            'endpoint': settings.STARDOG_ENDPOINT,
            'username': settings.STARDOG_USER,
            'password': settings.STARDOG_PASS
        })

credentials: str class-attribute

endpoint: str class-attribute

token: Optional[str] = None class-attribute

admin() staticmethod

Source code in datasets/services/stardog_api.py
13
14
15
16
17
18
19
@staticmethod
def admin() -> 'stardog.Admin':
    return stardog.Admin(**{
        'endpoint': settings.STARDOG_ENDPOINT,
        'username': settings.STARDOG_USER,
        'password': settings.STARDOG_PASS
    })

connection(name) staticmethod

Source code in datasets/services/stardog_api.py
21
22
23
24
25
26
27
@staticmethod
def connection(name: str) -> 'stardog.Connection':
    return stardog.Connection(name, **{
        'endpoint': settings.STARDOG_ENDPOINT,
        'username': settings.STARDOG_USER,
        'password': settings.STARDOG_PASS
    })