Skip to content

Commit 64b2230

Browse files
committed
enable access submodule via property of pywebio
1 parent ee4b1ad commit 64b2230

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

pywebio/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from . import input # make PyCharm understand `pywebio.input.xxx` expression
1+
from . import input # enable `pywebio.input.xxx` expression without `import pywebio.input`
22
from . import output
33
from . import platform
44
from . import session

pywebio/platform/__init__.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,3 +149,24 @@
149149
from .page import seo
150150
from .path_deploy import path_deploy_http, path_deploy
151151
from .tornado import start_server
152+
from . import tornado
153+
154+
try:
155+
from . import flask # enable `pywebio.platform.flask.xxx` expression without `import pywebio.platform.flask`
156+
except Exception:
157+
pass
158+
159+
try:
160+
from . import django
161+
except Exception:
162+
pass
163+
164+
try:
165+
from . import fastapi
166+
except Exception:
167+
pass
168+
169+
try:
170+
from . import tornado_http
171+
except Exception:
172+
pass

0 commit comments

Comments
 (0)