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