Reference¶
ssb_tbmd_apis package¶
Subpackages¶
- ssb_tbmd_apis.exports package
- ssb_tbmd_apis.imports package
- ssb_tbmd_apis.operations package
- ssb_tbmd_apis.operations.operations_datadok module
- ssb_tbmd_apis.operations.operations_metadb module
- ssb_tbmd_apis.operations.operations_statbank module
- ssb_tbmd_apis.operations.operations_vardok module
vardok_codelist_by_id()vardok_codelists()vardok_concept_variable_by_id()vardok_concept_variables_by_approved()vardok_concept_variables_by_external_source()vardok_concept_variables_by_internal_source()vardok_concept_variables_by_name_def()vardok_concept_variables_by_owner()vardok_concept_variables_by_statistical_unit()vardok_concept_variables_by_subject_area()vardok_version_by_concept_variable_id()
- ssb_tbmd_apis.oracle_direct package
- ssb_tbmd_apis.paths package
ssb_tbmd_apis.tbmd_logger module¶
ssb_tbmd_apis.zeep_client module¶
- class LocalResolverTransport(cache=None, timeout=300, operation_timeout=None, session=None)¶
Bases:
TransportCustom transport class to load local XSD files for Zeep client.
- load(url)¶
Load XSD files from local directory instead of fetching them from the internet.
- Parameters:
url (str) – The URL of the XSD file to load.
- Returns:
The content of the XSD file.
- Return type:
bytes
- class ZeepClientManager(wsdl)¶
Bases:
objectContext manager for Zeep client to handle WSDL and session management.
- Parameters:
wsdl (str)
- class ZeepLikeClient(*args, **kwargs)¶
Bases:
ProtocolA minimal protocol for the Zeep SOAP client.
This protocol is used to provide static type checking for code that interacts with a Zeep client without requiring full type information from the zeep library (which does not ship stubs). It only defines the subset of the client interface that is commonly used in this project.
- property service: Any¶
Service proxy for SOAP operations.
The service property provides access to the operations defined in the WSDL. Each operation is exposed as a callable attribute on this object, which can be invoked like a normal Python function.
- get_zeep_client(tbmd_service='datadok')¶
Get a Zeep client for the specified TBMD service.
- Parameters:
tbmd_service (
str) – The TBMD service to use (default is “datadok”).- Returns:
A context manager for the Zeep client.
- Return type:
- Raises:
NotImplementedError – If the specified TBMD service is not implemented.
- get_zeep_serialize(tbmd_service='datadok', operation='GetFileDescriptionByPath', *args)¶
Get serialized response from the Zeep client for the specified operation.
- Parameters:
tbmd_service (str) – The TBMD service to use (default is “datadok”).
operation (str) – The operation to perform (default is “GetFileDescriptionByPath”).
*args (
str|int) – Arguments for the operation.
- Returns:
The serialized response from the Zeep client.
- Return type:
OrderedDict
- get_zeep_serialize_list(tbmd_service='metadb', operation='GetCodelists', *args)¶
Get serialized response from the Zeep client for the specified operation that returns a list.
- Parameters:
tbmd_service (str) – The TBMD service to use (default is “datadok”).
operation (str) – The operation to perform (default is “GetFileDescriptionByPath”).
*args (
str|int) – Arguments for the operation.
- Returns:
The serialized response from the Zeep client.
- Return type:
list[OrderedDict]