You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
progress_bar (bool) - Display a progress bar with the image pull progress (uses
the compat endpoint). Default: False
so Uses the compat endpoint, that should refer the podman API parameter compatMode=true. Generally, if I invoke directly the Podman API pull by setting compatMode=true by:
If I use Podman Py by setting progress_bar=True (so compactMode=true), sadly I don't get the JSON output but we directly get the "animated" progress bar.
The problem of it, is that we cannot manipulate this response (i.e., if I want to manipulate the output). Can you please implement a way that Podman Py pull function can show the JSON output in compact mode as occurs for Docker Py?
The text was updated successfully, but these errors were encountered:
D3vil0p3r
changed the title
[BUG] pull() progress_bar=True does not work as intended
[BUG] pull() progress_bar=True does not work show JSON output as intended for compact mode
Jan 6, 2025
Fixcontainers#492
Added `compatMode` param to `pull()` function. Default as `True` in order to give a well-structured JSON output like:
```
...
{'status': 'Pulling fs layer', 'progressDetail': {}, 'id': 'ef3afbc03436'}
{'status': 'Downloading', 'progressDetail': {'current': 1862903, 'total': 37308955}, 'progress': '[==> ] 1.863MB/37.31MB', 'id': '1546de61b6c3'}
{'status': 'Download complete', 'progressDetail': {}, 'id': 'fa424c11eb04'}
{'status': 'Pulling fs layer', 'progressDetail': {}, 'id': '3d3d38ab8766'}
{'status': 'Downloading', 'progressDetail': {'current': 1441042, 'total': 3248294}, 'progress': '[======================> ] 1.441MB/3.248MB', 'id': 'ef3afbc03436'}
...
```
while `compatMode=False` still keep the one-field JSON output:
```
{'stream': 'Copying blob sha256:30babffc8f090f7c78c263b9a1b683b34ca5f73da74911ffe942d4d8225dca57\n'}
```
This approach differs from the already present `progress_bar=True` because does not show the "fancy" progress bar but a raw JSON output, useful for devs want to manipulate pull output.
Furthermore, the PR fixes `tls_verify` initialization in `pull()` because, according to its description, its Default should be `True`, but it was actually as `None`.
Signed-off-by: Antonio <[email protected]>
I wrote this small Python code to test Podman-py pull progress bar:
progress_bar
description says:so
Uses the compat endpoint
, that should refer the podman API parametercompatMode=true
. Generally, if I invoke directly the Podman API pull by settingcompatMode=true
by:we get the JSON progress bar, that is right:
If I use Podman Py by setting

progress_bar=True
(socompactMode=true
), sadly I don't get the JSON output but we directly get the "animated" progress bar.The problem of it, is that we cannot manipulate this response (i.e., if I want to manipulate the output). Can you please implement a way that Podman Py pull function can show the JSON output in compact mode as occurs for Docker Py?
The text was updated successfully, but these errors were encountered: