nolar / kopf

A Python framework to write Kubernetes operators in just a few lines of code

Home Page:https://kopf.readthedocs.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Using named import in kopf

skandarchahbouni opened this issue · comments

Long story short

I want to use named import in kopf:

  • from module.functions import function_1

kopf provides a -m option for that, however, it doesn't work and it always throw the ModuleNotFoundError error.
command used : kopf run -m package_2.main
I ran the same file using python -m, but it didn't trigger the ModuleNotFoundError error. as shown in the screenshot below:

image
image

if I use just kopf run without -m option, I the no No module named error (same as running python main.py without -m option.

Kopf version

No response

Kubernetes version

No response

Python version

No response

Code

No response

Logs

No response

Additional information

No response