#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ # @Version : Python 3.11.4 # @Software : Sublime Text 4 # @Author : StudentCWZ # @Email : StudentCWZ@outlook.com # @Date : 2023/10/28 18:16 # @File : init_elasticsearch.py # @Description : Initializes the FlaskElasticsearch extension for a Flask application. """ from flask import Flask from application.libs import FlaskElasticsearch es = FlaskElasticsearch() def init_elasticsearch(app: Flask) -> None: """ 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. Returns: None """ es.init_app(app)