对于用户和工作区,资源类将资源 id 作为 __init__ 方法的参数,但不适用于数据集。此外,我们还可以使用提供的 ID 从服务器获取资源。我们应该为相同类型的类提供一致的行为:
id
__init__
User
Dataset
Workspaces
user = rg.User(id=<an_existing_user_id>).get() assert user.username is not None
az31mfrm1#
@burtenshaw Does it make sense to do it this? (not for v2 but as a standard way to work with resources)
1条答案
按热度按时间az31mfrm1#
@burtenshaw Does it make sense to do it this? (not for v2 but as a standard way to work with resources)