diff --git a/application/constants/__init__.py b/application/constants/__init__.py index 8e0bfb49021dd4ac141e4fd8a368e57406e334f7..f45b4df0760eedddba5c33949ddc381903f30f7a 100644 --- a/application/constants/__init__.py +++ b/application/constants/__init__.py @@ -6,7 +6,7 @@ # @Author : StudentCWZ # @Email : StudentCWZ@outlook.com # @Date : 2023/11/4 15:08 -# @File : __init__.py.py +# @File : __init__.py # @Description : """ diff --git a/application/extensions/init_consul.py b/application/extensions/init_consul.py index c12d1b6029b0d4c6f86619922f5e4af679d27980..8ff99e5deb2839c04abb4af6f33f5f237fdfca31 100644 --- a/application/extensions/init_consul.py +++ b/application/extensions/init_consul.py @@ -7,7 +7,7 @@ # @Email : StudentCWZ@outlook.com # @Date : 2023/11/21 10:01 # @File : init_consul.py -# @Description : +# @Description : Initializes the FlaskConsulService for a Flask application. """ # Import built-in modules diff --git a/application/extensions/init_cors.py b/application/extensions/init_cors.py index 0f53f65ed0fb2389c4a07553ecc7ecb2bd8bb91f..70325ed448aae3ce4d14d45a837198cf7534848d 100644 --- a/application/extensions/init_cors.py +++ b/application/extensions/init_cors.py @@ -7,7 +7,7 @@ # @Email : StudentCWZ@outlook.com # @Date : 2023/11/4 15:43 # @File : init_cors.py -# @Description : +# @Description : Initializes the Flask CORS extension for a Flask application. """ from flask import Flask @@ -16,9 +16,15 @@ from flask_cors import CORS def init_cors(app: Flask) -> None: """ - Initialize the dynaconf extension + Initializes the Flask CORS extension for a Flask application. - :param app: flask.Flask application instance - :return: None + The CORS extension allows for cross-origin resource sharing, enabling + requests from different domains to the Flask application. + + Args: + app (Flask): The Flask application. + + Returns: + None """ CORS(app) diff --git a/application/extensions/init_dotenv.py b/application/extensions/init_dotenv.py index bef1f585eac1191e77c2c8658ec249b582d9fccc..39f6b315ed4e989b0a94472c472e6e523c881637 100644 --- a/application/extensions/init_dotenv.py +++ b/application/extensions/init_dotenv.py @@ -7,7 +7,7 @@ # @Email : StudentCWZ@outlook.com # @Date : 2023/11/21 10:51 # @File : init_dotenv.py -# @Description : +# @Description : Initializes the dotenv extension for the application. """ # Import standard library modules diff --git a/application/extensions/init_elasticsearch.py b/application/extensions/init_elasticsearch.py index 20c21618e535b5eabf2ad1ee58f56a7fbd480e0c..ca3aef411817318c926c653ad3a1a9d7d589ec89 100644 --- a/application/extensions/init_elasticsearch.py +++ b/application/extensions/init_elasticsearch.py @@ -7,12 +7,11 @@ # @Email : StudentCWZ@outlook.com # @Date : 2023/10/28 18:16 # @File : init_elasticsearch.py -# @Description : +# @Description : Initializes the FlaskElasticsearch extension for a Flask application. """ from flask import Flask - from application.libs import FlaskElasticsearch es = FlaskElasticsearch() @@ -20,9 +19,17 @@ es = FlaskElasticsearch() def init_elasticsearch(app: Flask) -> None: """ - Initialize the flask_elasticsearch extension + Initializes the FlaskElasticsearch extension for a Flask application. + + Elasticsearch is a distributed, RESTful search and analytics engine capable of + addressing a growing number of use cases. As the heart of the Elastic Stack, + it centrally stores your data for lightning fast search, fine‑tuned relevancy, + and powerful analytics that scale with ease. + + Args: + app (Flask): The Flask application. - :param app: flask.Flask application instance - :return: None + Returns: + None """ es.init_app(app) diff --git a/application/extensions/init_logger.py b/application/extensions/init_logger.py index 598f56cbfc1066857a789bd3dd26fbe8816e56f6..852b4e5e101d9949398bc2319f2d9d34134b70a8 100644 --- a/application/extensions/init_logger.py +++ b/application/extensions/init_logger.py @@ -7,19 +7,25 @@ # @Email : StudentCWZ@outlook.com # @Date : 2023/10/28 18:16 # @File : init_logger.py -# @Description : +# @Description : Initializes the FlaskLoguru service for a Flask application. """ from flask import Flask - from application.libs import FlaskLoguru def init_logger(app: Flask) -> None: """ - Initialize the dynaconf extension + Initializes the FlaskLoguru service for a Flask application. + + Loguru is a library which aims to bring enjoyable logging in Python. + It provides a nice and clean interface over logging's complex API + to ease the process of logging. + + Args: + app (Flask): The Flask application. - :param app: flask.Flask application instance - :return: None + Returns: + None """ FlaskLoguru(app) diff --git a/application/extensions/init_sqlalchemy.py b/application/extensions/init_sqlalchemy.py index 1b17461db59e1ee6a59700ae769a316d9377bebc..91f4a627816c59f1174aef5a4bc0d970aa9a541a 100644 --- a/application/extensions/init_sqlalchemy.py +++ b/application/extensions/init_sqlalchemy.py @@ -7,7 +7,7 @@ # @Email : StudentCWZ@outlook.com # @Date : 2023/10/28 22:01 # @File : init_sqlalchemy.py -# @Description : +# @Description : Initializes the SQLAlchemy extension for a Flask application. """ from flask import Flask diff --git a/application/libs/config/__init__.py b/application/libs/config/__init__.py index 0df1d019c84f4b0e9d560ad4b7b82916eb25d69d..4dbdbb726f73a1e7967d124b675551eef6e1f6d6 100644 --- a/application/libs/config/__init__.py +++ b/application/libs/config/__init__.py @@ -6,7 +6,7 @@ # @Author : StudentCWZ # @Email : StudentCWZ@outlook.com # @Date : 2023/10/28 15:06 -# @File : __init__.py.py +# @File : __init__.py # @Description : """ diff --git a/application/libs/flask_apscheduler/__init__.py b/application/libs/flask_apscheduler/__init__.py index e572e2bf81fd5aad3aece5e50edc7c199646a4c2..f5ac676a8d4868d86be0c83f393a599faeded9db 100644 --- a/application/libs/flask_apscheduler/__init__.py +++ b/application/libs/flask_apscheduler/__init__.py @@ -6,7 +6,7 @@ # @Author : StudentCWZ # @Email : StudentCWZ@outlook.com # @Date : 2023/11/11 15:15 -# @File : __init__.py.py +# @File : __init__.py # @Description : """ diff --git a/application/libs/flask_consul/__init__.py b/application/libs/flask_consul/__init__.py index 6be05355826b6870d53c025321cd15cfcb07de32..d28b3e769fb9d3af218eef6108b81b8abdaba2a5 100644 --- a/application/libs/flask_consul/__init__.py +++ b/application/libs/flask_consul/__init__.py @@ -6,7 +6,7 @@ # @Author : StudentCWZ # @Email : StudentCWZ@outlook.com # @Date : 2023/11/21 09:10 -# @File : __init__.py.py +# @File : __init__.py # @Description : """ diff --git a/application/models/__init__.py b/application/models/__init__.py index c854a9f6e842bc72d380fe1ed751ac449656d2b9..ebf1034cd4958232f1744ab9f92f6b744ada5a3e 100644 --- a/application/models/__init__.py +++ b/application/models/__init__.py @@ -6,7 +6,7 @@ # @Author : StudentCWZ # @Email : StudentCWZ@outlook.com # @Date : 2023/10/28 22:12 -# @File : __init__.py.py +# @File : __init__.py # @Description : """