aitkn
aitkn2y ago

Reactive queries in Python

Can I do reactive queries in python? On PyPl the title of convex library is "Python client for the reactive backend-as-a-service Convex.", but I don't see any examples of it.
10 Replies
james
james2y ago
hi @aitkn, you're right that this is confusing. Convex the platform is certainly reactive but the python client specifically doesn't have support for subscriptions yet this has been on our roadmap for a while but we haven't yet prioritized it sorry for the inconvenience. if you're willing to share any info on the use-case you'd like python subscriptions (reactivity) for that would be useful context re prioritizing
aitkn
aitknOP2y ago
I have a "Processor" application that performs computationally intensive calculations based on user input and returns some output. I'm running multiple instances of this application on a server, but it can also be run on a client machine. Users input data through a web or mobile app. I need my "Processor" application to "listen" for these changes, perform the processing, and save the results back to the database so that users can view them reactively. Currently, I'm using Firebase Firestore as my database, but I'm considering switching to Convex. However, this feature is a deal-breaker for me.
james
james2y ago
this makes a lot of sense. it wouldn't be a huge task for us to build this into the python client so keep an eye out for us adding this in the future!
aitkn
aitknOP2y ago
Thank you for the response. It's good to hear that adding this feature to the Python client is manageable. I'm in the early stages of considering a switch to Convex, and if this feature can be implemented within a month or so, I'll be more confident in continuing with the transition. I appreciate your help and look forward to any updates on this matter.
james
james2y ago
it's definitely manageable and we have a rust client with subscriptions coming out soon. in the meantime you might want to spend a bit of time with the React client since that's the best-supported platform so far. Convex is a great fit for react, unsurprisingly, but we intend to support any platform over time can't commit to timelines yet on python subscriptions but we have features coming out very fast so stay tuned
jamwt
jamwt2y ago
@aitkn for what it’s worth, a Rust client is coming out soon with parity to the JavaScript one… full reactivity and so on We’re really excited about better support for use cases like yours soon This has definitely been a part of the convex vision all along, enabling apps like yours Essentially leveraging reactivity for workflow type backend situations in addition to UIs. Oh. James already mentioned this. 😀
aitkn
aitknOP2y ago
Can I run a reactive query from Node?
jamwt
jamwt2y ago
Yes. Use https://docs.convex.dev/api/classes/browser.BaseConvexClient to get access to subscriptions outside react.
jamwt
jamwt2y ago
In fact, react subscriptions are built on top of this API.
ian
ian2y ago
@aitkn the Rust client has arrived: https://blog.convex.dev/announcing-convex-0-14-0/
Convex News
Announcing Convex 0.14.0
Meet the brand new Convex Rust client! We’ve also open sourced the JS client, added schema validation, and more. 0.14.0 is the best version of Convex yet!

Did you find this page helpful?