Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to import all classes at once? #8

Open
MichaelMrt opened this issue Apr 29, 2024 · 0 comments
Open

how to import all classes at once? #8

MichaelMrt opened this issue Apr 29, 2024 · 0 comments

Comments

@MichaelMrt
Copy link

After I installed the module with pip install deutsche_bahn_api I imported it with

from deutsche_bahn_api import *
api = ApiAuthentication("YOUR_CLIENT_ID", "YOUR_CLIENT_SECRET")

Now the program is not able to find the ApiAuthentication class.
Same when using:

deutsche_bahn_api.ApiAuthentication(..)

On the other hand if I import this way

import deutsche_bahn_api.api_authentication as dba
api = dba.ApiAuthentication("YOUR_CLIENT_ID", "YOUR_CLIENT_SECRET")

Everthing works fine and the class is found.

Can somebody please explain to me why the ApiAuthentication class has to be imported this way?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant