fractal-analytics-platform / fractal-client

Command-line client for Fractal
https://fractal-analytics-platform.github.io/fractal-client
BSD 3-Clause "New" or "Revised" License
45 stars 1 forks source link

Add `--batch` option to `fractal user whoami` #663

Closed tcompa closed 4 months ago

tcompa commented 4 months ago

When using --batch, the output should be only the user ID (rather than the whole JSON).

This is quite useful whenever handling users programmatically (e.g. in fractal-containers - cc @mfranzon).

ychiucco commented 4 months ago

Closing because the feature is already implemented here https://github.com/fractal-analytics-platform/fractal-client/blob/0f951a8b8b0120df94ce2ade2f9baea73a5efb50/fractal_client/cmd/__init__.py#L340

and tested here

https://github.com/fractal-analytics-platform/fractal-client/blob/0f951a8b8b0120df94ce2ade2f9baea73a5efb50/tests/test_user.py#L235