you can force named arguments in python by using * after any non-named args. example:
In [1]: def my_func(first, *, second, third):
...: print(first, second, third)
...:
In [2]: my_func(1, second=2, third=3)
1 2 3
In [3]: my_func(1, 2, 3)
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
Cell In[3], line 1
----> 1 my_func(1, 2, 3)
TypeError: my_func() takes 1 positional argument but 3 were given
In [4]: def my_func_2(*, first, second, third):
...: print(first, second, third)
...:
In [5]: my_func_2(first=1, second=2, third=3)
1 2 3
In [6]: my_func_2(1, second=2, third=3)
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
Cell In[6], line 1
----> 1 my_func_2(1, second=2, third=3)
TypeError: my_func_2() takes 0 positional arguments but 1 positional argument (and 2 keyword-only arguments) were given