# Using Singleton Pattern with Weaviate Client in Python

**URL:** <https://forum.weaviate.io/t/using-singleton-pattern-with-weaviate-client-in-python/920>\
**Category:** General\
**Created:** [November 7, 2023, 10:36am UTC](https://forum.weaviate.io/t/using-singleton-pattern-with-weaviate-client-in-python/920 "2023-11-07T10:36:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Iammsd07](https://avatars.discourse-cdn.com/v4/letter/i/5fc32e/32.png) [@Iammsd07](https://forum.weaviate.io/u/Iammsd07)\
**Post date:** [November 7, 2023, 10:36am UTC](https://forum.weaviate.io/t/using-singleton-pattern-with-weaviate-client-in-python/920/1 "2023-11-07T10:36:22Z")

</div>

Hello,

I’m working on using the Weaviate client in Python and wondering if employing the Singleton Pattern is a good idea. Typically, we use the Singleton Pattern for connecting to databases. Any thoughts on whether this pattern is suitable for Weaviate client in Python?

Thanks for your input.

Regards,  
Harshit

---

<div class="post-metadata">

**Author:** ![DudaNogueira](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/dudanogueira/32/7846_2.png) [@DudaNogueira](https://forum.weaviate.io/u/DudaNogueira)\
**Post date:** [November 7, 2023, 12:52pm UTC](https://forum.weaviate.io/t/using-singleton-pattern-with-weaviate-client-in-python/920/2 "2023-11-07T12:52:18Z")

</div>

Hi!

AFAIK the client is lazy, so until you actually call a query, it will have a little overhead on initiating it. So both singleton and constantly initiating should work fine.

Also, it’s probably interesting to check out our new python client, currecntly in beta, as it will bring a lot of great features along with it:

> **[Python (v4) | Weaviate - vector database](https://weaviate.io/developers/weaviate/client-libraries/python)**
>
> The Python client is currently in beta, and we want to hear from you.

Let me know if that helps 🙂
