Class: QgsNetworkContentFetcherRegistry

class qgis.core.QgsNetworkContentFetcherRegistry

Bases: PyQt5.QtCore.QObject

Registry for temporary fetched files

This provides a simple way of downloading and accessing remote files during QGIS application running.

New in version 3.2.

QgsNetworkContentFetcherRegistry() Create the registry for temporary downloaded files

Enums

FetchingMode

alias of ActionStart

Methods

childEvent

connectNotify

customEvent

disconnectNotify

fetch

Initialize a download for the given URL

isSignalConnected

localPath

Returns the path to a local file or to a temporary file previously fetched by the registry

receivers

sender

senderSignalIndex

timerEvent

FetchingMode

alias of ActionStart

childEvent(self, QChildEvent)
connectNotify(self, QMetaMethod)
customEvent(self, QEvent)
disconnectNotify(self, QMetaMethod)
fetch(self, url: str, fetchingMode: Qgis.ActionStart = Qgis.ActionStart.Deferred, authConfig: str = '') QgsFetchedContent

Initialize a download for the given URL

Parameters
  • url (str) – the URL to be fetched

  • fetchingMode (Qgis.ActionStart = Qgis.ActionStart.Deferred) – defines if the download will start immediately or shall be manually triggered

  • authConfig (str = '') – authentication configuration id to be used while fetching

Note

If the download starts immediately, it will not redownload any already fetched or currently fetching file.

Return type

QgsFetchedContent

isSignalConnected(self, QMetaMethod) bool
localPath(self, filePathOrUrl: str) str

Returns the path to a local file or to a temporary file previously fetched by the registry

Parameters

filePathOrUrl (str) – can either be a local file path or a remote content which has previously been fetched

Return type

str

receivers(self, PYQT_SIGNAL) int
sender(self) QObject
senderSignalIndex(self) int
timerEvent(self, QTimerEvent)