Python Module And __all__
I trying to understand how to manage module with __all. For example, I have following structured code: main.py |=> /database |=> __init__.py |=> engine (with varia
Solution 1:
Listing names in __all__
does not, by itself, import items into a module. All it does is list names to import from that module if you used from database import *
syntax.
Import session
into database/__init__.py
:
from .engineimport session
Post a Comment for "Python Module And __all__"