On Friday, 20 January 2023 at 00:39:47 UTC, Seamus wrote:
Howdy folks
I am new around these parts and looking forward to getting
stuck into some D development. Really liking it so far, just
one some questions though... I am working on a project that did
not sit well with me when I tried it in Python. I need static
typing (above and beyond MyPy, as nice as that is) and the
extra speed from D is a bonus.
However, there are some nice libraries in Python I would still
like to use (Spacy for example) and I have played around with
Pyd to see if I can get it working with Python 3.x.
Unfortunately the documentation and examples in the Pyd repo
presume more knowledge than I have. I have looked around this
forum and there are tantalising snippets of conversation that
suggest Pyd will work with some C based extensions of Python...
I just cannot get it to work myself.
So does anyone have any sample code, pointers or tips on using
Pyd with something like Spacy? Is this possible, or even
desirable?
I have a fallback position for now in that I can wrap my Python
scripts in something like Fire
(https://google.github.io/python-fire/guide/) and create an
external process from D, but that seems a bit less efficient.
Either that or REST services/ZeroMQ middleware, but they all
add complexity.
Idle speculation and suggestions welcome!
Cheers
Seamus
Have you tried this?
https://github.com/symmetryinvestments/autowrap