![]() ![]() init_app (flask_app ) 132 133 init_wsgi_middleware (flask_app ) 134 135 db = SQLA () 136 db. force_database_direct_access () 130 131 csrf. json = AirflowJsonProvider (flask_app ) 128 129 InternalApiConfig. json_provider_class = AirflowJsonProvider 127 flask_app. prepare_engine_args () 124 125 # Configure the JSON encoder used by `|tojson` filter from Flask 126 flask_app. from_mapping (config ) 121 122 if "SQLALCHEMY_ENGINE_OPTIONS" not in flask_app. config = cookie_samesite_config 118 119 if config : 120 flask_app. Change the value to `Lax` in airflow.cfg to remove this warning.", 114 RemovedInAirflow3Warning, 115 ) 116 cookie_samesite_config = "Lax" 117 flask_app. warn ( 112 "Old deprecated value found for `cookie_samesite` option in `` section. get ( "webserver", "COOKIE_SAMESITE" ) 110 if cookie_samesite_config = "" : 111 warnings. getboolean ( "webserver", "COOKIE_SECURE" ) 108 109 cookie_samesite_config = conf. ' 101 "Please use absolute path such as `sqlite:////tmp/airflow.db`." 102 ) 103 104 flask_app. startswith ( "/" ): 99 raise AirflowConfigException ( 100 f 'Cannot use relative path: ` ` to connect to sqlite. ![]() config = instance_name 96 97 url = make_url (flask_app. getboolean ( 90 section = "webserver", key = "instance_name_has_markup", fallback = False 91 ) 92 if instance_name_has_markup : 93 instance_name = Markup (instance_name ). get (section = "webserver", key = "instance_name", fallback = "Airflow" ) 89 instance_name_has_markup = conf. get ( "database", "SQL_ALCHEMY_CONN" ) 87 88 instance_name = conf. WEBSERVER_CONFIG, silent = True ) 85 flask_app. get_session_lifetime_config ()) 84 flask_app. sync_roles () 76 77 78 def create_app (config = None, testing = False ): 79 """Create a new instance of Airflow get ( "webserver", "SECRET_KEY" ) 82 83 flask_app. getboolean ( "webserver", "UPDATE_FAB_PERMS" ): 75 flask_app. 71 # Otherwise, when the name of a view or menu is changed, the framework 72 # will add the new Views and Menus names to the backend, but will not 73 # delete the old ones. 64 # See: /docs/plugins.rst 65 csrf = CSRFProtect () 66 67 68 def sync_appbuilder_roles (flask_app ): 69 """Sync appbuilder roles to DB""" 70 # Garbage collect old permissions/views after they have been modified. import init_wsgi_middleware 60 61 app : Flask | None = None 62 63 # Initializes at the module level, so plugins can access it. import ( 51 init_api_connexion, 52 init_api_experimental, 53 init_api_internal, 54 init_appbuilder_views, 55 init_error_handlers, 56 init_flash_views, 57 init_plugins, 58 ) 59 from airflow. import init_airflow_session_interface 50 from airflow. import ( 45 init_api_experimental_auth, 46 init_check_user_active, 47 init_xframe_protection, 48 ) 49 from airflow. import configure_manifest_files 43 from airflow. import init_jinja_globals 42 from airflow. import init_appbuilder_links 39 from airflow. json import AirflowJsonProvider 37 from airflow. settings import _ENABLE_AIP_44 36 from airflow. models import import_all_models 35 from airflow. logging_config import configure_logging 34 from airflow. exceptions import AirflowConfigException, RemovedInAirflow3Warning 33 from airflow. configuration import conf 32 from airflow. internal_api_call import InternalApiConfig 31 from airflow. url import make_url 28 29 from airflow import settings 30 from airflow. csrf import CSRFProtect 26 from markupsafe import Markup 27 from sqlalchemy. 18 from _future_ import annotations 19 20 import warnings 21 from datetime import timedelta 22 23 from flask import Flask 24 from flask_appbuilder import SQLA 25 from flask_wtf. See the License for the 16 # specific language governing permissions and limitations 17 # under the License. You may obtain a copy of the License at 9 # 10 # 11 # 12 # Unless required by applicable law or agreed to in writing, 13 # software distributed under the License is distributed on an 14 # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 # KIND, either express or implied. The ASF licenses this file 6 # to you under the Apache License, Version 2.0 (the 7 # "License") you may not use this file except in compliance 8 # with the License. See the NOTICE file 4 # distributed with this work for additional information 5 # regarding copyright ownership. As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Python source code syntax highlighting (style: standard) with prefixed line numbers.Īlternatively you can here view or download the uninterpreted source code file.įor more information about "app.py" see the Fossies "Dox" file reference documentation and the last Fossies "Diffs" side-by-side code changes report: 2.5.3_vs_2.6.0.ġ # 2 # Licensed to the Apache Software Foundation (ASF) under one 3 # or more contributor license agreements. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |