I'm trying to save my passwords to a separate .py
file and import them into an API login script.
I just want something simple, have tried (Password file) details.py
username = "MyUser"
password = "Pass123"
appKey = "123Key"
and then imported to my script:
import betfairlightweight
from .details import username, password, appKey
Error message:
ImportError: attempted relative import with no known parent package
trading = betfairlightweight.APIClient(username, password, app_key=appKey)
trading.login_interactive()
Why am I receiving this error and how can I resolve it?