更新.gitignore

This commit is contained in:
MarkusJoe
2022-04-04 13:51:24 +08:00
parent 77745e6f01
commit 10c425d5c8
3 files changed
+17 -15

No files matched your search

+16
View File
@@ -6,4 +6,20 @@
# @File Name: __init__.py.py
import os
import requests
def download():
res = requests.get('https://syncdatabase.herokuapp.com/sync/')
with open('./app/db/data.db', 'wb') as fp:
fp.write(res.content)
if __name__ != '__main__':
if not os.path.exists('./app/db/data.db'):
print('数据库文件未找到, 正在下载中')
download()
print('下载完成')
__all__ = ['db']