birdy.client.base module¶
- class birdy.client.base.WPSClient(url, processes=None, converters=None, username=None, password=None, headers=None, auth=None, verify=True, cert=None, progress=False, version=owslib.wps.WPS_DEFAULT_VERSION, caps_xml=None, desc_xml=None, language=None, lineage=False, **kwds)[source]¶
Bases:
object
Returns a class where every public method is a WPS process available at the given url.
Examples
>>> emu = WPSClient(url='<server url>') >>> emu.hello('stranger') 'Hello stranger'
- _console_monitor(execution, sleep=3)[source]¶
Monitor the execution of a process.
- Parameters:
execution (WPSExecution instance) – The execute response to monitor.
sleep (float) – Number of seconds to wait before each status check.
- _get_process_description(processes=None, xml=None)[source]¶
Return the description for each process.
Sends the server a describeProcess request for each process.
- Parameters:
processes (str, list, None) – A process name, a list of process names or None (for all processes).
- Returns:
A dictionary keyed by the process identifier of process descriptions.
- Return type:
OrderedDict
- _method_factory(pid)[source]¶
Create a custom function signature with docstring, instantiate it and pass it to a wrapper.
The wrapper will call the process on reception.
- Parameters:
pid (str) – Identifier of the WPS process.
- Returns:
A Python function calling the remote process, complete with docstring and signature.
- Return type:
func
- _parse_output_formats(outputs)[source]¶
Parse an output format dictionary into a list of tuples, as required by wps.execute().
- property language¶
- property languages¶
- birdy.client.base.nb_form(wps, pid)[source]¶
Return a Notebook form to enter input values and launch process.
- birdy.client.base.sort_inputs_key(i)[source]¶
Key function for sorting process inputs.
- The order is:
Inputs that have minOccurs >= 1 and no default value
Inputs that have minOccurs >= 1 and a default value
Every other input
- Parameters:
i (owslib.wps.Input) – An owslib Input
Notes
The defaultValue for ComplexData is ComplexData instance specifying mimetype, encoding and schema.