Class: QgsExternalStorage¶
- class qgis.core.QgsExternalStorage¶
Bases:
sip.wrapper
Abstract interface for external storage - to be implemented by various backends and registered in
QgsExternalStorageRegistry
.Added in version 3.22:
Methods
Returns the translated external storage name, which should be used for any user-visible display of the external storage name.
Fetches file from
url
usingauthCfg
for this project external storage.Stores file
filePath
to theurl
usingauthCfg
authentication for this project external storage.Fetches file from
url
for this project external storage.Stores file
filePath
to theurl
for this project external storage.Unique identifier of the external storage type.
- displayName(self) str ¶
Returns the translated external storage name, which should be used for any user-visible display of the external storage name.
- Return type:
str
- doFetch(self, url: str, authCfg: str = '') QgsExternalStorageFetchedContent ¶
Fetches file from
url
usingauthCfg
for this project external storage.See also
- Parameters:
url (str)
authCfg (str = '')
- Return type:
- doStore(self, filePath: str, url: str, authCfg: str = '') QgsExternalStorageStoredContent ¶
Stores file
filePath
to theurl
usingauthCfg
authentication for this project external storage.See also
- Parameters:
filePath (str)
url (str)
authCfg (str = '')
- Return type:
- fetch(self, url: str, authCfg: str = '', fetchingMode: Qgis.ActionStart = Qgis.ActionStart.Deferred) QgsExternalStorageFetchedContent ¶
Fetches file from
url
for this project external storage. Fetching process is run in background. Returns aQgsExternalStorageFetchedContent
to follow the status of the fetched resource.fetchingMode
defines if the download will start immediately or shall be manually triggered callingQgsExternalStorageFetchedContent.fetch()
. User should useQgis
.ActionStart.Deferred if he needs to connect thefetched()
signal.After using this method, user should wait for
QgsExternalStorageStoredContent.fetched()
,QgsExternalStorageStoredContent.errorOccurred()
orQgsExternalStorageStoredContent.canceled()
signals.It’s possible to give
authCfg
authentication configuration id in case its needed.- Parameters:
url (str)
authCfg (str = '')
fetchingMode (Qgis.ActionStart = Qgis.ActionStart.Deferred)
- Return type:
- store(self, filePath: str, url: str, authCfg: str = '', storingMode: Qgis.ActionStart = Qgis.ActionStart.Deferred) QgsExternalStorageStoredContent ¶
Stores file
filePath
to theurl
for this project external storage. Storing process is run in background. Returns aQgsExternalStorageStoredContent
to follow the status of the stored resource.storingMode
defines if the download will start immediately or shall be manually triggered callingQgsExternalStorageStoredContent.store()
. User should useQgis
.ActionStart.Deferred if he needs to connect thestored()
signal.After using this method, user wait for
QgsExternalStorageStoredContent.stored()
,QgsExternalStorageStoredContent.errorOccurred()
orQgsExternalStorageStoredContent.canceled()
signals.It’s possible to give
authCfg
authentication configuration id in case its needed.Caller takes ownership of the returned symbol.
- Parameters:
filePath (str)
url (str)
authCfg (str = '')
storingMode (Qgis.ActionStart = Qgis.ActionStart.Deferred)
- Return type:
- type(self) str ¶
Unique identifier of the external storage type.
- Return type:
str