wdc
dsstools.wdc
logger = get_logger('WDCAPI')
module-attribute
WDC(*, token=None, api='https://dss-wdc.wiso.uni-hamburg.de/api', insecure=False, timeout=120, params=None)
Internal class for interacting with the WDC API.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
token
|
str | None
|
Token for authorization. |
None
|
api
|
str
|
API address to send request to. Leave this as is. |
'https://dss-wdc.wiso.uni-hamburg.de/api'
|
insecure
|
bool
|
Hide warning regarding missing https. |
False
|
timeout
|
int
|
Set the timeout to the server. Increase this if you request large networks. |
120
|
params
|
dict | None
|
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. |
None
|
api = api[:-1] if api.endswith('/') else api
instance-attribute
endpoint = 'UNSET'
class-attribute
instance-attribute
identifier = None
instance-attribute
params = params if params else {}
instance-attribute
session = requests.Session()
instance-attribute
timeout = timeout
instance-attribute
token
property
writable
Get the password token.
WDCGeneric(identifier=None, *, token=None, api='https://dss-wdc.wiso.uni-hamburg.de/api', insecure=False, timeout=60, params=None)
Bases: WDC
Public class for calling WDC-API directly.
If you want to interact with WDC directly, you need to use this WDCGeneric class since it allows you to parse an identifier for snapshots (or use subclasses of WDC such as TextSearch or GraphImporter directly). This is for advanced users only.
Note: WDCGeneric was split up with v0.10.0 into WDC and WDCGeneric This exists to ensure compatibility with older versions. This also helps with type hinting across different versions.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
identifier
|
str | int
|
Identifier of the network data. |
None
|
token
|
str | None
|
Token for authorization. |
None
|
api
|
str
|
API address to send request to. Leave this as is. |
'https://dss-wdc.wiso.uni-hamburg.de/api'
|
insecure
|
bool
|
Hide warning regarding missing https. |
False
|
timeout
|
int
|
Set the timeout to the server. Increase this if you request large networks. |
60
|
params
|
dict | None
|
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. |
None
|
api = api[:-1] if api.endswith('/') else api
instance-attribute
endpoint = 'UNSET'
class-attribute
instance-attribute
identifier = identifier
instance-attribute
params = params if params else {}
instance-attribute
session = requests.Session()
instance-attribute
timeout = timeout
instance-attribute
token
property
writable
Get the password token.