mirror of
https://github.com/containers/podman.git
synced 2025-05-29 06:03:25 +08:00
9 lines
302 B
Python
9 lines
302 B
Python
from varlink import (Client, VarlinkError)
|
|
import json
|
|
|
|
address = "unix:/run/podman/io.projectatomic.podman"
|
|
|
|
with Client(address=address) as client:
|
|
podman = client.open('io.projectatomic.podman')
|
|
response = podman.GetVersion()
|
|
print(json.dumps(response, indent=4, separators=(',', ': '))) |