Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
elp
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
崔为之
elp
Commits
4195bcbb
Commit
4195bcbb
authored
Nov 21, 2023
by
崔为之
💪🏽
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update project
parent
29acd336
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
41 additions
and
22 deletions
+41
-22
application/constants/__init__.py
application/constants/__init__.py
+1
-1
application/extensions/init_consul.py
application/extensions/init_consul.py
+1
-1
application/extensions/init_cors.py
application/extensions/init_cors.py
+10
-4
application/extensions/init_dotenv.py
application/extensions/init_dotenv.py
+1
-1
application/extensions/init_elasticsearch.py
application/extensions/init_elasticsearch.py
+12
-5
application/extensions/init_logger.py
application/extensions/init_logger.py
+11
-5
application/extensions/init_sqlalchemy.py
application/extensions/init_sqlalchemy.py
+1
-1
application/libs/config/__init__.py
application/libs/config/__init__.py
+1
-1
application/libs/flask_apscheduler/__init__.py
application/libs/flask_apscheduler/__init__.py
+1
-1
application/libs/flask_consul/__init__.py
application/libs/flask_consul/__init__.py
+1
-1
application/models/__init__.py
application/models/__init__.py
+1
-1
No files found.
application/constants/__init__.py
View file @
4195bcbb
...
...
@@ -6,7 +6,7 @@
# @Author : StudentCWZ
# @Email : StudentCWZ@outlook.com
# @Date : 2023/11/4 15:08
# @File : __init__.py
.py
# @File : __init__.py
# @Description :
"""
...
...
application/extensions/init_consul.py
View file @
4195bcbb
...
...
@@ -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
...
...
application/extensions/init_cors.py
View file @
4195bcbb
...
...
@@ -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
Initialize
s 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
)
application/extensions/init_dotenv.py
View file @
4195bcbb
...
...
@@ -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
...
...
application/extensions/init_elasticsearch.py
View file @
4195bcbb
...
...
@@ -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
)
application/extensions/init_logger.py
View file @
4195bcbb
...
...
@@ -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
)
application/extensions/init_sqlalchemy.py
View file @
4195bcbb
...
...
@@ -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
...
...
application/libs/config/__init__.py
View file @
4195bcbb
...
...
@@ -6,7 +6,7 @@
# @Author : StudentCWZ
# @Email : StudentCWZ@outlook.com
# @Date : 2023/10/28 15:06
# @File : __init__.py
.py
# @File : __init__.py
# @Description :
"""
...
...
application/libs/flask_apscheduler/__init__.py
View file @
4195bcbb
...
...
@@ -6,7 +6,7 @@
# @Author : StudentCWZ
# @Email : StudentCWZ@outlook.com
# @Date : 2023/11/11 15:15
# @File : __init__.py
.py
# @File : __init__.py
# @Description :
"""
...
...
application/libs/flask_consul/__init__.py
View file @
4195bcbb
...
...
@@ -6,7 +6,7 @@
# @Author : StudentCWZ
# @Email : StudentCWZ@outlook.com
# @Date : 2023/11/21 09:10
# @File : __init__.py
.py
# @File : __init__.py
# @Description :
"""
...
...
application/models/__init__.py
View file @
4195bcbb
...
...
@@ -6,7 +6,7 @@
# @Author : StudentCWZ
# @Email : StudentCWZ@outlook.com
# @Date : 2023/10/28 22:12
# @File : __init__.py
.py
# @File : __init__.py
# @Description :
"""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment