Class: QgsStacConnection

Represents connections to STAC catalogs.

Added in version 3.40.

Class Hierarchy

Inheritance diagram of qgis.core.QgsStacConnection

Base classes

QgsAbstractProviderConnection

An interface for data provider connections.

Static Methods

addConnection

Adds a new connection to the list

connection

Returns connection details

connectionList

Returns list of existing connections, unless the hidden ones

decodedUri

Decodes connection string to a data structure

deleteConnection

Removes a connection from the list

encodedUri

Returns connection data encoded as a string

selectedConnection

Returns last used connection

setSelectedConnection

Saves name of the last used connection

class qgis.core.QgsStacConnection[source]

Bases: QgsAbstractProviderConnection

__init__(name: str | None)

Constructor for QgsStacConnection, using the stored settings with the specified connection name.

Parameters:

name (Optional[str])

__init__(uri: str | None, configuration: Dict[str, Any])

Constructor for QgsStacConnection, using the a specific connection details.

Parameters:
  • uri (Optional[str])

  • configuration (Dict[str, Any])

__init__(a0: QgsStacConnection)
Parameters:

a0 (QgsStacConnection)

class Data

Bases: object

Represents decoded data of a connection

authCfg: str

Authentication configuration id

httpHeaders: QgsHttpHeaders

HTTP headers

password: str

HTTP Basic password

url: str

Catalog URL

username: str

HTTP Basic username

static addConnection(name: str | None, conn: QgsStacConnection.Data)[source]

Adds a new connection to the list

Parameters:
static connection(name: str | None) QgsStacConnection.Data[source]

Returns connection details

Parameters:

name (Optional[str])

Return type:

QgsStacConnection.Data

static connectionList() List[str][source]

Returns list of existing connections, unless the hidden ones

Return type:

List[str]

static decodedUri(uri: str | None) QgsStacConnection.Data[source]

Decodes connection string to a data structure

Parameters:

uri (Optional[str])

Return type:

QgsStacConnection.Data

static deleteConnection(name: str | None)[source]

Removes a connection from the list

Parameters:

name (Optional[str])

static encodedUri(conn: QgsStacConnection.Data) str[source]

Returns connection data encoded as a string

Parameters:

conn (QgsStacConnection.Data)

Return type:

str

static selectedConnection() str[source]

Returns last used connection

Return type:

str

static setSelectedConnection(connName: str | None)[source]

Saves name of the last used connection

Parameters:

connName (Optional[str])