INNER CODE UNIT · Python
whoami
kr8s-org/kr8s · kr8s/__init__.py:236
def whoami():
"""Get the current user's identity.
Returns:
The user's identity
Examples:
>>> import kr8s
>>> print(kr8s.whoami())
"""
return _as_sync_func(_whoami)(_asyncio=False)
def create(resources: list[type[APIObject]], api=None):
"""Creates resources in the Kubernetes cluster."""
if api is None:
api = _as_sync_func(_api)(_asyncio=False)
api.create(cast(list[asyncio.objects.APIObject], resources))