I have a problem with a self-written package. I use Python 3.9. The package was installed correctly.
There is 1 function. This returns a string.
The function is shown here in simplified form. It is located in the user.py file:
def get_user(user):
print(user)
The package itself is structured as follows.
lichesspy:.
| account.py
| user.py
| vars.py
| __init__.py
The init.py file is structured as follows:
from lichesspy.user import get_user
# from lichesspy.user import user_tos
If I list all functions there as a directory I can call them normally in a package foreign Python file. But I don't think this is the right way to use an init.py.
Here is a test that often works. So a foreign test.py file:
import lichesspy as lp
print(lp.get_user("Zeyecx"))
How do I have to adapt the init.py to be able to use it sensibly?