airfs.config
This module allow to manage airfs configuration file.
Airfs configuration.
- airfs.config.get_mount(storage, config_name=None)[source]
Get the mount configuration.
New in version 1.5.0.
- Parameters:
storage (str) – Storage name.
config_name (str) – If specified, load the configuration as a specific storage configuration. “See airfs.config.set_mount”.
- Returns:
Storage configuration, None if not configured.
- Return type:
dict or None
- airfs.config.set_mount(storage, config_name=None, storage_parameters=None, unsecure=None, extra_root=None)[source]
Set a mount configuration. Most arguments are identical to “airfs.mount”.
New in version 1.5.0.
- Parameters:
storage (str) – Storage name.
config_name (str) – If specified, save the configuration as a specific storage configuration. This allows saving multiple configurations for the same “storage”.
storage_parameters (dict) – Storage configuration parameters. Generally, client configuration and credentials.
unsecure (bool) – If True, disables TLS/SSL to improve transfer performance. But makes connection unsecure. Default to False.
extra_root (str) – Extra root that can be used in replacement of root in the path. This can be used to provide support for shorter URLS. Example: with root “https://www.my_storage.com/user” and extra_root “mystorage://” it is possible to access an object using “mystorage://container/object” instead of “https://www.my_storage.com/user/container/object”.