flowserv.client.api module
Helper method to create a API generator based on the current configuration in the environment valriables.
- flowserv.client.api.ClientAPI(env: Optional[Dict] = None, basedir: Optional[str] = None, database: Optional[str] = None, open_access: Optional[bool] = None, run_async: Optional[bool] = None, user_id: Optional[str] = None) flowserv.service.api.APIFactory
Create an instance of the API factory that is responsible for generating API instances for a flowserv client.
The main distinction here is whether a connection is made to a local instance of the service or to a remote instance. This distinction is made based on the value of the FLOWSERV_CLIENT environment variable that takes the values ‘local’ or ‘remote’. The default is ‘local’.
Provides the option to alter the default settings of environment variables.
- Parameters
env (dict, default=None) – Dictionary with configuration parameter values.
basedir (string, default=None) – Base directory for all workflow files. If no directory is given or specified in the environment a temporary directory will be created.
database (string, default=None) – Optional database connect url.
open_access (bool, default=None) – Use an open access policy if set to True.
run_async (bool, default=False) – Run workflows in asynchronous mode.
user_id (string, default=None) – Optional identifier for the authenticated API user.
- Return type
- flowserv.client.api.service() flowserv.service.api.API
Context manager that returns a service API that was instantiated from the current configuration settings in the environment.
- Return type