Proper Importing and Packaging

Discuss API design here.
Senior Member
Posts: 190
Joined: Fri Jun 21, 2013 6:51 am

Proper Importing and Packaging

Postby arawra » Mon Aug 23, 2021 12:16 pm

I would like to know the proper way to handle importing and packaging for addons/Python.

I am taking a look at GunGame for its directory structure and the way it handles packaging. I am trying to make sense of it but a lot of the semantics seem lost on me. For instance, ../gungame/core/ is imported from ../gungame/core/ as `from .logger import gg_logger`. However unlike ../gungame/core/ there is no __all__ declaration. Further more in, it imports from loggers although I am unable to find loggers in a sibling directory.

I would like someone to explain to me the proper methodology of importing.

Return to “API Design”

Who is online

Users browsing this forum: No registered users and 3 guests