Skip to content

how to import all classes at once? #8

Open
@MichaelMrt

Description

@MichaelMrt

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions