config¶
Read containers.conf file.
- class PodmanConfig(path: str | None = None)[source]¶
Bases:
object
PodmanConfig provides a representation of the containers.conf file.
Read Podman configuration from users XDG_CONFIG_HOME.
- property active_service¶
Returns active connection.
- Type:
Optional[ServiceConnection]
- property id¶
Returns Path() of container.conf.
- Type:
Path
- property services¶
Returns list of service connections.
Examples
podman_config = PodmanConfig() address = podman_config.services[“testing”] print(f”Testing service address {address}”)
- Type:
Dict[str, ServiceConnection]
- class ServiceConnection(name: str, attrs: Dict[str, str])[source]¶
Bases:
object
ServiceConnection defines a connection to the Podman service.
Create a Podman ServiceConnection.
- property id¶
Returns identifier for service connection.
- Type:
str
- property identity¶
Returns Path to identity file for service connection.
- Type:
Path
- property url¶
Returns URL for service connection.
- Type:
urllib.parse.ParseResult