I work in a team that leans towards Python for most back-end needs. Any new project or script that anyone writes will be in Python. The CTO is also a very heavy Python user. So, anytime a vendor or external consultant is hired, they are instructed to create the application back-end or script in Python.
I understand that with nimpy, one can use Python code within Nim programs.
How far does it extend to using Python packages (say, the ones found in pypi.org)?
It would be awesome, for example, if I can use boto3 (I do DevOps, and Infra work) within a Nim program; or polars (I write ETL scripts).
If nimpy doesn't work, what are the workarounds that I can use to achieve the above?
I am exploring Nim as it is portable (and blazing fast compared to Python). Then mastering the ecosystem (Nim's) is always beneficial for the future (you'd never need another language; "one language for everything" creed).
I can't stress the portability aspect enough.
I've been told that nimpy works for pretty much anything. Please give it a try.
Disclaimer: I am not speaking from experience with it.
I'm not sure you'll have fun times using python packages in nim. You'll have to wrestle with python's dynamic PyObject all the time.
Also, if you're explicitly instructed to use python, why bring nim into the mix?
Try nimpy first, than say about PyObjects etc. Nimpy abstracts a lot of things, you even can use nimporter to do
import nimmodule And
import pkg/nimpy
proc nimadd(a, b: int) {.exportpy.} =
a + b