# Python \`v4\` client - feedback megathread!

**URL:** <https://forum.weaviate.io/t/python-v4-client-feedback-megathread/892>\
**Category:** Support\
**Tags:** developer-experience, python\
**Created:** [October 30, 2023, 7:57pm UTC](https://forum.weaviate.io/t/python-v4-client-feedback-megathread/892 "2023-10-30T19:57:25Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![jphwang](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/jphwang/32/38_2.png) [@jphwang](https://forum.weaviate.io/u/jphwang)\
**Post date:** [October 30, 2023, 7:57pm UTC](https://forum.weaviate.io/t/python-v4-client-feedback-megathread/892/1 "2023-10-30T19:57:25Z")

</div>

Hi Everybody,

Our amazing engineering team has delivered a brand-new Python client with a revised API that we think is even more developer-friendly!

The key features are:

> - New streamlined syntax for interacting with Weaviate in a Python-native way
> 
> - Full gRPC support for batch imports and searches
> 
> - Generics syntax for end-to-end type safety of your data objects
> 
> - Pydantic client-side runtime data cleansing logic
> 
> - Handy methods to get up-and-running as fast as possible
> 
> - As easy as:

**Check it out by installing it with `pip install --pre "weaviate-client==4.*"`, and using it with Weaviate `1.22` or higher.**

Yes - it’s receiving a major version bump!

Some barebones docs will be up soon (tomorrow), and we’ll build it up as we go.

Please leave any feedback here, so that we can track it more easily in the one thread.

Thanks everybody.

---

<div class="post-metadata">

**Author:** ![Mohit\_Singla](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/mohit_singla/32/612_2.png) [@Mohit\_Singla](https://forum.weaviate.io/u/Mohit_Singla)\
**Post date:** [November 1, 2023, 4:56pm UTC](https://forum.weaviate.io/t/python-v4-client-feedback-megathread/892/2 "2023-11-01T16:56:21Z")

</div>

When will we also get Async client support?

---

<div class="post-metadata">

**Author:** ![jphwang](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/jphwang/32/38_2.png) [@jphwang](https://forum.weaviate.io/u/jphwang)\
**Post date:** [November 1, 2023, 5:27pm UTC](https://forum.weaviate.io/t/python-v4-client-feedback-megathread/892/3 "2023-11-01T17:27:06Z")

</div>

Hi @Mohit_Singla 👋. Thanks for asking.

This is something that we would definitely like to tackle, but we can’t provide a timeline at this point. Sorry about that!

---

<div class="post-metadata">

**Author:** ![pommedeterresautee](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/pommedeterresautee/32/360_2.png) [@pommedeterresautee](https://forum.weaviate.io/u/pommedeterresautee)\
**Post date:** [November 3, 2023, 3:40pm UTC](https://forum.weaviate.io/t/python-v4-client-feedback-megathread/892/4 "2023-11-03T15:40:27Z")

</div>

to share some first impression. The API is indeed smoother. However, for schema I prefer the json way, as it let us store the schema elsewhere. We have an internal toolkit used for several project, and having everything in code is not possible. Right now we create with legacy API the schema and import with the new one.

---

<div class="post-metadata">

**Author:** ![jphwang](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/jphwang/32/38_2.png) [@jphwang](https://forum.weaviate.io/u/jphwang)\
**Post date:** [November 6, 2023, 10:43am UTC](https://forum.weaviate.io/t/python-v4-client-feedback-megathread/892/5 "2023-11-06T10:43:29Z")

</div>

Hi @pommedeterresautee !

Oh that’s an interesting data point. Would it work for your use case if we added a method to fetch the full, JSON definition for the collection? (Like a `articles.config.get()` or `articles.config.raw()` method, where `articles` is the collection).

Or would you also want the collection creation to take JSON inputs? 🤔

---

<div class="post-metadata">

**Author:** ![asido](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/asido/32/1986_2.png) [@asido](https://forum.weaviate.io/u/asido)\
**Post date:** [November 6, 2023, 11:06am UTC](https://forum.weaviate.io/t/python-v4-client-feedback-megathread/892/6 "2023-11-06T11:06:23Z")

</div>

The documentation suggests that this is available to use with wcs but the client doesn’t appear to have wcs connection implemented. Any ETA on when this will be available?

---

<div class="post-metadata">

**Author:** ![jphwang](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/jphwang/32/38_2.png) [@jphwang](https://forum.weaviate.io/u/jphwang)\
**Post date:** [November 6, 2023, 11:23am UTC](https://forum.weaviate.io/t/python-v4-client-feedback-megathread/892/7 "2023-11-06T11:23:47Z")

</div>

Hi @asido - sorry about that.

I’m updating the page to reflect this. WCS clusters are currently not compatible with the `v4` client as we are adding gRPC support.

There’s no exact ETA on this currently, but the last I heard was that it will be a few weeks.

---

<div class="post-metadata">

**Author:** ![Adam\_Hughes](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/adam_hughes/32/124_2.png) [@Adam\_Hughes](https://forum.weaviate.io/u/Adam_Hughes)\
**Post date:** [November 14, 2023, 5:55pm UTC](https://forum.weaviate.io/t/python-v4-client-feedback-megathread/892/8 "2023-11-14T17:55:06Z")

</div>

Thanks - does the V4 client add any new features or just syntax changes?

For example, batch deleting based on a list of IDs isn’t available in the v3 client. Would the new syntax support new operations or the same ones?

---

<div class="post-metadata">

**Author:** ![jphwang](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/jphwang/32/38_2.png) [@jphwang](https://forum.weaviate.io/u/jphwang)\
**Post date:** [November 17, 2023, 12:57pm UTC](https://forum.weaviate.io/t/python-v4-client-feedback-megathread/892/9 "2023-11-17T12:57:27Z")

</div>

Hey @Adam_Hughes - sorry for the late reply; I’ve been on holiday and I think this one slipped through the cracks.

There are new features for sure - gRPC support is the big one, which should speed up imports and queries significantly.

Re: deletion by multiple IDs - unless I am mistaken, I think that is supported through batch deletes.

I think this works for me w/ the latest `v4` client, and a similar syntax should work with the v3 client as well.

```python
questions = client.collections.get("Question")
response = questions.query.fetch_objects(limit=3)

ids = [o.uuid for o in response.objects]

questions.data.delete_many(
    where=wvc.Filter("id").contains_any(ids)
)

```

> **[Delete objects | Weaviate - vector database](https://weaviate.io/developers/weaviate/manage-data/delete#delete-multiple-objects)**
>
> Overview

---

<div class="post-metadata">

**Author:** ![Adam\_Hughes](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/adam_hughes/32/124_2.png) [@Adam\_Hughes](https://forum.weaviate.io/u/Adam_Hughes)\
**Post date:** [November 21, 2023, 7:36pm UTC](https://forum.weaviate.io/t/python-v4-client-feedback-megathread/892/10 "2023-11-21T19:36:51Z")

</div>

Cool thanks - I guess I had assumed deleting by ID would use its own method isntead of a Filter/contains\_any, but this seems fine too!

---

<div class="post-metadata">

**Author:** ![axeloh](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/axeloh/32/688_2.png) [@axeloh](https://forum.weaviate.io/u/axeloh)\
**Post date:** [November 23, 2023, 9:24pm UTC](https://forum.weaviate.io/t/python-v4-client-feedback-megathread/892/11 "2023-11-23T21:24:07Z")

</div>

Any plans for supporting `not like` filter?

---

<div class="post-metadata">

**Author:** ![jphwang](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/jphwang/32/38_2.png) [@jphwang](https://forum.weaviate.io/u/jphwang)\
**Post date:** [November 23, 2023, 10:33pm UTC](https://forum.weaviate.io/t/python-v4-client-feedback-megathread/892/12 "2023-11-23T22:33:08Z")

</div>

Hi @axeloh - we are looking at this with:  
[Improved `NotEqual` operator · Issue #3319 · weaviate/weaviate · GitHub](https://github.com/weaviate/weaviate/issues/3319) and  
[[Feature Request] Add "Not" operator in filter to support "Not Like" etc. in Get queries · Issue #3683 · weaviate/weaviate · GitHub](https://github.com/weaviate/weaviate/issues/3683)

I am not sure exactly when it will make it to a release, but it’s definitely being looked at closely.

Then the clients will be also updated to follow of course :).

---

<div class="post-metadata">

**Author:** ![asido](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/asido/32/1986_2.png) [@asido](https://forum.weaviate.io/u/asido)\
**Post date:** [December 1, 2023, 1:09pm UTC](https://forum.weaviate.io/t/python-v4-client-feedback-megathread/892/13 "2023-12-01T13:09:03Z")

</div>

Hi, I’m looking at the python v4 client again now that it works with wcs and the query fetch\_objects function returns a \_QueryReturn containing \_Object objects.

Is there any particular reason these return internal classes? I’m writing a function to map the response objects but can’t have proper typing unless I imported \_Object from the internal package which I guess isn’t an intended workflow.

It can be done without typing but that seems a waste when the classes are already there.

---

<div class="post-metadata">

**Author:** ![jphwang](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/jphwang/32/38_2.png) [@jphwang](https://forum.weaviate.io/u/jphwang)\
**Post date:** [December 1, 2023, 2:32pm UTC](https://forum.weaviate.io/t/python-v4-client-feedback-megathread/892/14 "2023-12-01T14:32:10Z")

</div>

Hi @asido - welcome back. And yes, WCS works now with the V4 client (we’re working on making the sandboxes compatible).

Hmm. That’s an interesting point re: typing. You should still get IDE autocompletes for attributes like shown here, regardless of typing the .

> **[Python (v4) | Weaviate - vector database](https://weaviate.io/developers/weaviate/client-libraries/python#query)**
>
> The Python client is currently in beta, and we want to hear from you. You can test the new client locally, or on paid instances of Weaviate Cloud Services (WCS). It is not yet available on the free (sandbox) tier of WCS. If you notice any bugs, or...

But I will check with the devs as to pros/cons of exposing these response classes directly.

Thanks for your input!  
JP

---

<div class="post-metadata">

**Author:** ![asido](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/asido/32/1986_2.png) [@asido](https://forum.weaviate.io/u/asido)\
**Post date:** [December 1, 2023, 3:48pm UTC](https://forum.weaviate.io/t/python-v4-client-feedback-megathread/892/15 "2023-12-01T15:48:01Z")

</div>

Thanks, that’s true but only if you’re using the response object in the same function that ran the query because it knows the return type. That’s not the case in other functions.

As an example, I have multiple functions that run different weaviate queries. I need to map the list of returned weaviate objects to domain objects and I don’t want to do this in every method that runs a query so I use mapping functions. With the way it is currently, any functions like this cannot have typing.

Overall though the new client is nice. Definitely a cleaner dev experience.

---

<div class="post-metadata">

**Author:** ![jphwang](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/jphwang/32/38_2.png) [@jphwang](https://forum.weaviate.io/u/jphwang)\
**Post date:** [December 1, 2023, 5:50pm UTC](https://forum.weaviate.io/t/python-v4-client-feedback-megathread/892/16 "2023-12-01T17:50:11Z")

</div>

Yeah.

I brought this up with the devs, and looks like they generally agree with you. I can’t make any promises, but at this point we’re looking at exposing those classes through a separate submodule (so as to not clutter `weaviate.classes`).

Thanks so much for the feedback! 🙂

---

<div class="post-metadata">

**Author:** ![c-lara](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/c-lara/32/560_2.png) [@c-lara](https://forum.weaviate.io/u/c-lara)\
**Post date:** [December 10, 2023, 4:05pm UTC](https://forum.weaviate.io/t/python-v4-client-feedback-megathread/892/18 "2023-12-10T16:05:16Z")

</div>

Hi @jphwang,

the new python client looks pretty nice and easy to use! Is there a way to use it with Azure currently? I did not find any way to specify resource\_name and deployment\_id.

One can only set base\_url which does not seem to be enough

```auto
    parameters = {
        "collection_name": "Test6Collection",
        "vectorizer_config": wvc.Configure.Vectorizer.text2vec_openai(
            base_url="https://COMPANYINSTANCE.openai.azure.com/",
            model="ada",
            model_version="002",
        ),
        "generative_config": wvc.Configure.Generative.openai(),
        "properties": [
            wvc.Property(name="property1", data_type=wvc.DataType.TEXT),
            wvc.Property(name="property2", data_type=wvc.DataType.TEXT),
        ],
    }

weaviate_client = weaviate.WeaviateClient(
    connection_params=weaviate.ConnectionParams.from_params(
        http_host="0.0.0.0",
        http_port="8080",
        http_secure=False,
        grpc_host="0.0.0.0",
        grpc_port="50051",
        grpc_secure=False,
    ),
    auth_client_secret=weaviate.AuthApiKey(weaviate_secret_key),
    additional_headers={
        "X-Azure-Api-Key": azure_openai_key,
    },
)

```

Would be great to get your feedback on this!

---

<div class="post-metadata">

**Author:** ![pommedeterresautee](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/pommedeterresautee/32/360_2.png) [@pommedeterresautee](https://forum.weaviate.io/u/pommedeterresautee)\
**Post date:** [December 13, 2023, 1:20pm UTC](https://forum.weaviate.io/t/python-v4-client-feedback-megathread/892/19 "2023-12-13T13:20:15Z")

</div>

Sure clean fetching API would help. Still the most important thing is the ability to create schema from json files (next to more code based approach).

---

<div class="post-metadata">

**Author:** ![jphwang](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/jphwang/32/38_2.png) [@jphwang](https://forum.weaviate.io/u/jphwang)\
**Post date:** [January 3, 2024, 10:06am UTC](https://forum.weaviate.io/t/python-v4-client-feedback-megathread/892/20 "2024-01-03T10:06:53Z")

</div>

Hi @c-lara - sorry about the late reply, I had not seen this earlier.

There is a separate method (`text2vec_azure_openai`) for this use case - so you should be able to use that. I include a screenshot from the latest `4.4b4` beta below.

 ![image](https://canada1.discourse-cdn.com/flex027/uploads/weaviate/original/1X/c0945e9859ea5e68ae64db6380128feafc4b605f.png)

---

<div class="post-metadata">

**Author:** ![Alan\_S](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/alan_s/32/598_2.png) [@Alan\_S](https://forum.weaviate.io/u/Alan_S)\
**Post date:** [January 16, 2024, 10:08pm UTC](https://forum.weaviate.io/t/python-v4-client-feedback-megathread/892/21 "2024-01-16T22:08:39Z")

</div>

Hi All,

I am unable to successfully create a collection with a text2vec\_openai vectorizer using v4 and Azure Openai. We have provided our Azure credentials as shown in the previous message but the request is timing out. We noticed that there are back to back “/“ characters after our base url in the timeout error and are not sure if this is an issue or if the web server handles that automatically.

Is anyone else facing this or a similar issue? Any pointers or links to up to date documentation would be appreciated. The documentation link in the previous post is not an active webpage.

Best,  
Alan

[Next page](https://forum.weaviate.io/t/python-v4-client-feedback-megathread/892.md?page=2)
