iggy-rs / iggy-python-client

Official Python client SDK for Iggy.rs message streaming.
MIT License
14 stars 6 forks source link

Asynchronous client #8

Open FireMasterK opened 4 months ago

FireMasterK commented 4 months ago

Currently, the client is synchronous as seen in https://github.com/iggy-rs/iggy-python-client/blob/main/src/client.rs

Are there any plans for an asynchronous client, for use with libraries such as asyncio?

bartoszkobylinski commented 4 months ago

Just a heads-up, if you check "python_examples" file, you'll notice we're already using asyncio. It fits like a glove since irrys is all about that async life naturally. Thought you'd like to know!

FireMasterK commented 4 months ago

True, I noticed that earlier too, but the actual functions aren't defined as async, if I understand correctly the thread from python is blocked on the tokio runtime task.

hubcio commented 4 months ago

True, I noticed that earlier too, but the actual functions aren't defined as async, if I understand correctly the thread from python is blocked on the tokio runtime task.

hello! i'm not python expert - could you please propose PR how to fix this?

hubcio commented 4 months ago

@FireMasterK I asked chatgpt about this: https://chat.openai.com/share/b102601e-6673-4315-9a95-cdae8ef4ed86

does it sounds reasonable to you?