Hi all, Recently I noticed the Pulsar Python client APIs are not friendly to Python users [1]. The existing asynchronous APIs are based on callbacks and they are hard to use. Since the Pulsar Python client is a wrapper on the Pulsar C++ client, wrapping the existing callback-based APIs for asyncio requires much knowledge on the underlying C++ implementation details [2].
For the reasons above, I think it will be helpful to provide another set of APIs based on asyncio and coroutines. I opened my first PR [3] as the beginning. Instead of rewriting a new project, I'd like to add a submodule `pulsar.asyncio` for these APIs that share the same C extension with APIs in the `pulsar` module. The new APIs are in development and do not affect the original APIs, which are actually not tested well, see the regression [4]. Instead of adding more tests to existing APIs, I'd like to pay more attention when adding new APIs. Tests are required for each new configuration. Feel free to share your thoughts on this! [1] https://github.com/apache/pulsar-client-python/issues/184 [2] https://github.com/apache/pulsar-client-python/issues/55#issuecomment-1759925342 [3] https://github.com/apache/pulsar-client-python/pull/189 [4] https://github.com/apache/pulsar-client-python/issues/178 Thanks, Yunze