How to set UID and GID for the container using python sdk?
As the documentation you've linked says, pass in user and group_add to run():
client.containers.run('alpine', 'echo hello world', user='foo', group_add=[123])

Both accept both IDs and names, but group_add needs to be a list.

How to set UID and GID for the container when Python SDK is used to spin up the container?
