Zum Inhalt

textsearch

dsstools.textsearch

This module allows for text search in graph nodes.

TextSearch(identifier=None, *, token=None, api='https://dss-wdc.wiso.uni-hamburg.de/api', insecure=False, timeout=60, params=None)

Bases: WDC

Class allowing to search for keywords in the WDC API. Args: identifier: Identifier of the network data. For the text search this is normally in the form 20121227_intermediaries (a date string with a short text appended). token: Token for authorization. api: API address to send request to. Leave this as is. insecure: Hide warning regarding missing https. timeout: Set the timeout to the server. Increase this if you request large networks. params: These are additional keyword arguments passed onto the API endpoint. See https://dss-wdc.wiso.uni-hamburg.de/#_complex_datatypes_for_the_api_requests for further assistance.

token property writable

Get the password token.

search(domains, terms, exact=True)

Searches the given keywords across a Graph or iterator.

Parameters:

Name Type Description Default
domains Graph | list

Set of identifiers to search in.

required
terms list[str]

Terms to search for.

required

Returns:

Type Description

Updated graph or dict containing the responses, Set of all failed

responses