weaviate-python-client icon indicating copy to clipboard operation
weaviate-python-client copied to clipboard

Create, remove and update tenants to accept both single items and lists

Open sebawita opened this issue 11 months ago • 1 comments

Currently, the create, update, and remove tenant functions require us to provide a list of Tenant objects, even if we are dealing with one tenant object.

It would be nice, to have an option to either provide a single tenant object (without wrapping it in a list) or a list (the current behaviour).

papers.tenants.create(
    Tenant(name="ten-name")
)
papers.tenants.update(
    Tenant(name="ten-name", activity_status=TenantActivityStatus.HOT)
)
papers.tenants.remove("ten-name")

sebawita avatar Mar 12 '24 13:03 sebawita

Implemented in https://github.com/weaviate/weaviate-python-client/pull/973

tsmith023 avatar Mar 22 '24 16:03 tsmith023