MinioAdaptorFactory#
- class servicex.minio_adaptor.MinioAdaptorFactory(always_return: Optional[MinioAdaptor] = None)[source]#
Bases:
object
A factor that will return, when asked, the proper minio adaptor to use for a request to get files from ServiceX.
- __init__(always_return: Optional[MinioAdaptor] = None)[source]#
Create the factor with a possible adaptor to always use
- Args:
always_return (Optional[MinioAdaptor], optional): The adaptor to always use. If none, then one will be created by the best other available method. Defaults to None.
Methods
- from_best(transaction_info: Optional[Dict[str, str]] = None) MinioAdaptor [source]#
Using the information we have, create the proper Minio Adaptor with the correct endpoint and login information. Order of adaptor generation:
1. The always_return option from the ctor 1. Use info from the translation_info 1. Use the info from the config handed in to the ctor
- Raises:
Exception: If we do not have enough information to create an adaptor, this is raised.
- Returns:
MinioAdaptor: The adaptor that can be used to extract the data from minio for this request.