From f2b87322e973f730c953b1c070ff4f4ed084e972 Mon Sep 17 00:00:00 2001 From: 1264204425 <1264204425@qq.com> Date: Thu, 24 Aug 2023 00:11:59 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E4=BF=AE=E5=A4=8D=E4=B8=80=E4=BA=9B?= =?UTF-8?q?=E5=B0=8Fbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.py | 7 +++++++ requirements.txt | 6 ++++++ server/music_server.py | 2 +- server/user_server.py | 2 +- sql/{create_database.py => 01create_database.py} | 2 +- sql/{create_user.py => 02create_user.py} | 2 +- sql/{create_UserPlayList.py => 03create_UserPlayList.py} | 2 +- sql/{create_music.py => 04create_music.py} | 2 +- sql/{create_playlistsong.py => 05create_playlistsong.py} | 2 +- test/sql_test.py | 2 +- untils.py | 7 ------- 11 files changed, 21 insertions(+), 15 deletions(-) create mode 100644 config.py create mode 100644 requirements.txt rename sql/{create_database.py => 01create_database.py} (97%) rename sql/{create_user.py => 02create_user.py} (98%) rename sql/{create_UserPlayList.py => 03create_UserPlayList.py} (98%) rename sql/{create_music.py => 04create_music.py} (98%) rename sql/{create_playlistsong.py => 05create_playlistsong.py} (98%) delete mode 100644 untils.py diff --git a/config.py b/config.py new file mode 100644 index 0000000..ec19056 --- /dev/null +++ b/config.py @@ -0,0 +1,7 @@ +import pymysql + +mysql_host = +mysql_port = +mysql_user = +mysql_password = +mysql_database = diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..9974259 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,6 @@ +fastapi==0.101.1 +fastapi_login==1.9.1 +pymysql==1.1.0 +Requests==2.31.0 +requests_html==0.10.0 +uvicorn==0.23.2 diff --git a/server/music_server.py b/server/music_server.py index b2f8b8b..32c0bf8 100644 --- a/server/music_server.py +++ b/server/music_server.py @@ -1,5 +1,5 @@ import pymysql -import untils +import config import hashlib mysql_host = untils.mysql_host diff --git a/server/user_server.py b/server/user_server.py index 0cf8b1b..87248e2 100644 --- a/server/user_server.py +++ b/server/user_server.py @@ -1,6 +1,6 @@ import csv import pymysql -import untils +import config import hashlib mysql_host = untils.mysql_host diff --git a/sql/create_database.py b/sql/01create_database.py similarity index 97% rename from sql/create_database.py rename to sql/01create_database.py index fc2b184..e7ff7a0 100644 --- a/sql/create_database.py +++ b/sql/01create_database.py @@ -1,6 +1,6 @@ # 导入pymysql import pymysql -import untils +import config mysql_host = untils.mysql_host mysql_port = untils.mysql_port diff --git a/sql/create_user.py b/sql/02create_user.py similarity index 98% rename from sql/create_user.py rename to sql/02create_user.py index b51f1f8..f3442fd 100644 --- a/sql/create_user.py +++ b/sql/02create_user.py @@ -1,6 +1,6 @@ # 导入pymysql import pymysql -import untils +import config mysql_host = untils.mysql_host mysql_port = untils.mysql_port diff --git a/sql/create_UserPlayList.py b/sql/03create_UserPlayList.py similarity index 98% rename from sql/create_UserPlayList.py rename to sql/03create_UserPlayList.py index 4e83572..4f5b9e2 100644 --- a/sql/create_UserPlayList.py +++ b/sql/03create_UserPlayList.py @@ -1,6 +1,6 @@ # 导入pymysql import pymysql -import untils +import config mysql_host = untils.mysql_host mysql_port = untils.mysql_port diff --git a/sql/create_music.py b/sql/04create_music.py similarity index 98% rename from sql/create_music.py rename to sql/04create_music.py index a81b6c4..a477cc6 100644 --- a/sql/create_music.py +++ b/sql/04create_music.py @@ -1,6 +1,6 @@ # 导入pymysql import pymysql -import untils +import config mysql_host = untils.mysql_host mysql_port = untils.mysql_port diff --git a/sql/create_playlistsong.py b/sql/05create_playlistsong.py similarity index 98% rename from sql/create_playlistsong.py rename to sql/05create_playlistsong.py index c41bf5c..756be88 100644 --- a/sql/create_playlistsong.py +++ b/sql/05create_playlistsong.py @@ -1,6 +1,6 @@ # 导入pymysql import pymysql -import untils +import config mysql_host = untils.mysql_host mysql_port = untils.mysql_port diff --git a/test/sql_test.py b/test/sql_test.py index 25a005f..93d0ea6 100644 --- a/test/sql_test.py +++ b/test/sql_test.py @@ -1,6 +1,6 @@ # 导入pymysql import pymysql -import untils +import config mysql_host = untils.mysql_host mysql_port = untils.mysql_port diff --git a/untils.py b/untils.py deleted file mode 100644 index 90209be..0000000 --- a/untils.py +++ /dev/null @@ -1,7 +0,0 @@ -import pymysql - -mysql_host = "nas.icezhb.work" -mysql_port = 12345 -mysql_user = "root" -mysql_password = "ICEzhb0000@" -mysql_database = "music_sql" \ No newline at end of file