[Feature Request] Provide a way to call Mojo functions from Python
shashankprasanna opened this issue ยท 6 comments
Review Mojo's priorities
- I have read the roadmap and priorities and I believe this request falls within the priorities.
What is your request?
Mojo Python interop supports calling Python functions directly from Mojo. This is great for developers starting their projects in Mojo and leveraging the Python ecosystem to fill in the gaps for specific capabilities.
However, Python developers who want to accelerate compute intensive sections of their applications in Mojo don't have a clean or native way of doing this.
This has been requested previously:
https://stackoverflow.com/questions/77063677/how-to-pass-mojo-function-to-python-in-python-interop
And as a doc clarification request:
#621
What is your motivation for this change?
Reducing the barrier to leveraging Mojo's performance and capabilities without completely migrating projects.
Any other details?
No response
This would be amazing. I am contributing to shap and and would like to move our C code to mojo in the future. The problem is that I would have to move the whole library to mojo which would basically be the end of it, since everybody else is using Python.
๐ this would be an awesome feature!
Yes this would be absolutely terrific, We have couple of projects that have performance hot spots that swapping in a call to mojo would make an enormous difference, but the code base is large enough to mean a wholesale change to mojo would be a lengthy endeavour.
Also unrelated shout out @CloseChoice - very happy user of Shap! ๐
I would like this feature as well.
This is key to getting any adoption within the python community
I think this is really needed if we want to really spread the adoption of Mojo to a faster rate. I bet majority of developers would like to have the possibility to use Mojo in their current python projects instead of importing python within Mojo.