Class: QgsProjectStorageRegistry

class qgis.core.QgsProjectStorageRegistry

Bases: sip.wrapper

Registry of storage backends that QgsProject may use.

This is a singleton that should be accessed through QgsApplication.projectStorageRegistry().

Added in version 3.2:

Methods

projectStorageFromType

Returns storage implementation if the storage type matches one.

projectStorageFromUri

Returns storage implementation if the URI matches one.

projectStorages

Returns a list of registered project storage implementations

registerProjectStorage

Registers a storage backend and takes ownership of it

unregisterProjectStorage

Unregisters a storage backend and destroys its instance

projectStorageFromType(self, type: str | None) QgsProjectStorage | None

Returns storage implementation if the storage type matches one. Returns None otherwise (it is a normal file)

Parameters:

type (Optional[str])

Return type:

Optional[QgsProjectStorage]

projectStorageFromUri(self, uri: str | None) QgsProjectStorage | None

Returns storage implementation if the URI matches one. Returns None otherwise (it is a normal file)

Parameters:

uri (Optional[str])

Return type:

Optional[QgsProjectStorage]

projectStorages(self) List[QgsProjectStorage]

Returns a list of registered project storage implementations

Return type:

List[QgsProjectStorage]

registerProjectStorage(self, storage: QgsProjectStorage | None)

Registers a storage backend and takes ownership of it

Parameters:

storage (Optional[QgsProjectStorage])

unregisterProjectStorage(self, storage: QgsProjectStorage | None)

Unregisters a storage backend and destroys its instance

Parameters:

storage (Optional[QgsProjectStorage])