You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expand a SPARQL query, transforming Owlet-style embedded class expressions into FILTERs
Example
importowlery_clientfromowlery_client.apiimportsparql_apifrompprintimportpprint# Defining the host is optional and defaults to http://}# See configuration.py for a list of all supported configuration parameters.configuration=owlery_client.Configuration(
host="http://}"
)
# Enter a context with an instance of the API clientwithowlery_client.ApiClient(configuration) asapi_client:
# Create an instance of the API classapi_instance=sparql_api.SPARQLApi(api_client)
# example passing only required values which don't have defaults setpath_params= {
'kb': "kb_example",
}
query_params= {
'query': "query_example",
}
try:
# Expand SPARQL query encoded in URL parameterapi_response=api_instance.kbs_kb_expand_get(
path_params=path_params,
query_params=query_params,
)
pprint(api_response)
exceptowlery_client.ApiExceptionase:
print("Exception when calling SPARQLApi->kbs_kb_expand_get: %s\n"%e)
Parameters
Name
Type
Description
Notes
query_params
RequestQueryParams
path_params
RequestPathParams
accept_content_types
typing.Tuple[str]
default is ('application/sparql-query', )
Tells the server the content type(s) that are accepted by the client
stream
bool
default is False
if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file
timeout
typing.Optional[typing.Union[int, typing.Tuple]]
default is None
the timeout used by the rest client
skip_deserialization
bool
default is False
when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned
query_params
RequestQueryParams
Name
Type
Description
Notes
query
QuerySchema
QuerySchema
Type
Description
Notes
str
path_params
RequestPathParams
Name
Type
Description
Notes
kb
KbSchema
KbSchema
Type
Description
Notes
str
Return Types, Responses
Code
Class
Description
n/a
api_client.ApiResponseWithoutDeserialization
When skip_deserialization is True this response is returned
Expand a SPARQL query, transforming Owlet-style embedded class expressions into FILTERs
Example
importowlery_clientfromowlery_client.apiimportsparql_apifrompprintimportpprint# Defining the host is optional and defaults to http://}# See configuration.py for a list of all supported configuration parameters.configuration=owlery_client.Configuration(
host="http://}"
)
# Enter a context with an instance of the API clientwithowlery_client.ApiClient(configuration) asapi_client:
# Create an instance of the API classapi_instance=sparql_api.SPARQLApi(api_client)
# example passing only required values which don't have defaults setpath_params= {
'kb': "kb_example",
}
body="SELECT ?x WHERE { ?x a "blah"}"try:
# Expand SPARQL query contained in request bodyapi_response=api_instance.kbs_kb_expand_post(
path_params=path_params,
body=body,
)
pprint(api_response)
exceptowlery_client.ApiExceptionase:
print("Exception when calling SPARQLApi->kbs_kb_expand_post: %s\n"%e)
Selects the schema and serialization of the request body
accept_content_types
typing.Tuple[str]
default is ('application/json', )
Tells the server the content type(s) that are accepted by the client
stream
bool
default is False
if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file
timeout
typing.Optional[typing.Union[int, typing.Tuple]]
default is None
the timeout used by the rest client
skip_deserialization
bool
default is False
when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned
Perform SPARQL query using Owlet-style embedded class expression. This is not a complete SPARQL endpoint. It is for using Owlery as a federated query endpoint for a single Owlet triple pattern.
Example
importowlery_clientfromowlery_client.apiimportsparql_apifrompprintimportpprint# Defining the host is optional and defaults to http://}# See configuration.py for a list of all supported configuration parameters.configuration=owlery_client.Configuration(
host="http://}"
)
# Enter a context with an instance of the API clientwithowlery_client.ApiClient(configuration) asapi_client:
# Create an instance of the API classapi_instance=sparql_api.SPARQLApi(api_client)
# example passing only required values which don't have defaults setpath_params= {
'kb': "kb_example",
}
query_params= {
'query': "query_example",
}
try:
# Perform SPARQL query encoded in URL parameterapi_response=api_instance.kbs_kb_sparql_get(
path_params=path_params,
query_params=query_params,
)
pprint(api_response)
exceptowlery_client.ApiExceptionase:
print("Exception when calling SPARQLApi->kbs_kb_sparql_get: %s\n"%e)
Parameters
Name
Type
Description
Notes
query_params
RequestQueryParams
path_params
RequestPathParams
accept_content_types
typing.Tuple[str]
default is ('application/sparql-results+xml', )
Tells the server the content type(s) that are accepted by the client
stream
bool
default is False
if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file
timeout
typing.Optional[typing.Union[int, typing.Tuple]]
default is None
the timeout used by the rest client
skip_deserialization
bool
default is False
when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned
query_params
RequestQueryParams
Name
Type
Description
Notes
query
QuerySchema
QuerySchema
Type
Description
Notes
str
path_params
RequestPathParams
Name
Type
Description
Notes
kb
KbSchema
KbSchema
Type
Description
Notes
str
Return Types, Responses
Code
Class
Description
n/a
api_client.ApiResponseWithoutDeserialization
When skip_deserialization is True this response is returned
Perform SPARQL query using Owlet-style embedded class expression. This is not a complete SPARQL endpoint. It is for using Owlery as a federated query endpoint for a single Owlet triple pattern.
Example
importowlery_clientfromowlery_client.apiimportsparql_apifrompprintimportpprint# Defining the host is optional and defaults to http://}# See configuration.py for a list of all supported configuration parameters.configuration=owlery_client.Configuration(
host="http://}"
)
# Enter a context with an instance of the API clientwithowlery_client.ApiClient(configuration) asapi_client:
# Create an instance of the API classapi_instance=sparql_api.SPARQLApi(api_client)
# example passing only required values which don't have defaults setpath_params= {
'kb': "kb_example",
}
body="SELECT ?x WHERE { ?x a "blah"}"try:
# Perform SPARQL query contained in request bodyapi_response=api_instance.kbs_kb_sparql_post(
path_params=path_params,
body=body,
)
pprint(api_response)
exceptowlery_client.ApiExceptionase:
print("Exception when calling SPARQLApi->kbs_kb_sparql_post: %s\n"%e)
Selects the schema and serialization of the request body
accept_content_types
typing.Tuple[str]
default is ('application/json', )
Tells the server the content type(s) that are accepted by the client
stream
bool
default is False
if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file
timeout
typing.Optional[typing.Union[int, typing.Tuple]]
default is None
the timeout used by the rest client
skip_deserialization
bool
default is False
when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned