Hi Weaviate community - we are looking for your feedback on some experimental changes to the Python API.
One area is how we specify additional properties. What do you think about this proposal?
from weaviate import AdditionalProperties
results = (
client.query.get("Article", ['title'])
.with_additional(
AdditionalProperties(
vector=True,
uuid=True,
creationTimeUnix=True,
lastUpdateTimeUnix=True,
distance=True,
)
)
.with_limit(2)
.do()
)
This would replace:
results = (
client.query.get("Article", ['title'])
.with_additional(
["vector", "id", "creationTimeUnix", "lastUpdateTimeUnix", "distance"]
)
.with_limit(2)
.do()
)
We would love to get your thoughts on the idea, and the specific syntax. Let us know in the thread!
To test this out - I believe you’ll need to pull the latest version of the Python client from the repo, and on this server:
client = weaviate.Client(
url="https://edu-demo.weaviate.network",
auth_client_secret=weaviate.AuthApiKey(api_key="learn-weaviate"),
)