this commit fixes #2 and adds other improvements to #3

This commit is contained in:
2024-04-21 11:56:10 +00:00
parent e94762b85c
commit debf0461bb
12 changed files with 139 additions and 27 deletions

View File

@ -1,9 +1,11 @@
from .view import AppView
from .title import Title
from .views import views_handler
from .network import checkInternet
__all__ = [
'AppView',
'Title',
'views_handler',
'checkInternet',
]

10
utils/network.py Normal file
View File

@ -0,0 +1,10 @@
import requests
def checkInternet():
try:
requests.get(
"https://rest.ensembl.org/info/ping?content-type=application/json",
)
return True
except requests.ConnectionError:
return False