MCPcopy Create free account

hub / github.com/pallets/flask / functions

Functions1,195 in github.com/pallets/flask

↓ 2 callersMethodget_source
( self, environment: BaseEnvironment, template: str )
src/flask/templating.py:60
↓ 2 callersFunctionget_version
(ctx: click.Context, param: click.Parameter, value: t.Any)
src/flask/cli.py:267
↓ 2 callersFunctionhas_level_handler
Check if there is a handler in the logging chain that will handle the given logger's :meth:`effective level <~logging.Logger.getEffectiveLevel>`.
src/flask/logging.py:31
↓ 2 callersFunctionindex
()
tests/test_reqctx.py:67
↓ 2 callersFunctioninit_db
Clear existing data and create new tables.
examples/tutorial/flaskr/db.py:33
↓ 2 callersMethodinject_url_defaults
Injects the URL defaults for the given endpoint directly into the values dictionary passed. This is used internally and automatically
src/flask/sansio/app.py:911
↓ 2 callersMethodis_null_session
Checks if a given object is a null session. Null sessions are not asked to be saved. This checks if the object is an instance of :at
src/flask/sessions.py:176
↓ 2 callersMethoditer_blueprints
Iterates over all blueprints by the order they were registered. .. versionadded:: 0.11
src/flask/sansio/app.py:597
↓ 2 callersFunctionloads
Deserialize data as JSON. If :data:`~flask.current_app` is available, it will use its :meth:`app.json.loads() <flask.json.provider.JSONProvid
src/flask/json/__init__.py:77
↓ 2 callersMethodloads
Load data from a JSON string and deserialized any tagged objects.
src/flask/json/tag.py:325
↓ 2 callersFunctionmain
()
src/flask/cli.py:1128
↓ 2 callersMethodmatch_request
Can be overridden by a subclass to hook into the matching of the request.
src/flask/ctx.py:357
↓ 2 callersMethodopen_session
This is called at the beginning of each request, after pushing the request context, before matching the URL. This must return an obje
src/flask/sessions.py:263
↓ 2 callersFunctionprepare_import
Given a filename this will try to calculate the python path, add it to the search path and return the actual module name that is expected.
src/flask/cli.py:200
↓ 2 callersMethodrecord
Registers a function that is called when the blueprint is registered on the application. This function is called with the state as ar
src/flask/sansio/blueprints.py:224
↓ 2 callersMethodregister
Called by :meth:`Flask.register_blueprint` to register all views and callbacks registered on the blueprint with the application. Creat
src/flask/sansio/blueprints.py:273
↓ 2 callersMethodreport_error
(self, e)
tests/test_user_error_handler.py:244
↓ 2 callersMethodsave_session
This is called at the end of each request, after generating a response, before removing the request context. It is skipped if :meth:`i
src/flask/sessions.py:277
↓ 2 callersFunctionsend_from_directory
Send a file from within a directory using :func:`send_file`. .. code-block:: python @app.route("/uploads/<path:name>") def downl
src/flask/helpers.py:526
↓ 2 callersFunctionstream_with_context
( generator_or_function: t.Iterator[t.AnyStr], )
src/flask/helpers.py:51
↓ 2 callersFunctiontemplate_string
()
tests/test_blueprints.py:637
↓ 2 callersMethodupdate_template_context
Update the template context with some commonly used variables. This injects request, session, config and g into the template context a
src/flask/app.py:506
↓ 1 callersMethod__init__
( self, app_import_path: str | None = None, create_app: t.Callable[..., Flask] | None
src/flask/cli.py:305
↓ 1 callersMethod__init__
(self, request: Request, key: str)
src/flask/debughelpers.py:28
↓ 1 callersMethod_check_setup_finished
(self, f_name: str)
src/flask/sansio/scaffold.py:220
↓ 1 callersFunction_dump_loader_info
(loader: BaseLoader)
src/flask/debughelpers.py:107
↓ 1 callersFunction_find_package_path
Find the path that contains the package or module.
src/flask/sansio/scaffold.py:709
↓ 1 callersMethod_get_source_explained
( self, environment: BaseEnvironment, template: str )
src/flask/templating.py:67
↓ 1 callersMethod_get_source_fast
( self, environment: BaseEnvironment, template: str )
src/flask/templating.py:91
↓ 1 callersFunction_get_werkzeug_version
()
src/flask/testing.py:99
↓ 1 callersMethod_merge_blueprint_funcs
(self, app: App, name: str)
src/flask/sansio/blueprints.py:379
↓ 1 callersMethod_request_from_builder_args
( self, args: tuple[t.Any, ...], kwargs: dict[str, t.Any] )
src/flask/testing.py:192
↓ 1 callersMethod_untag_scan
(self, value: t.Any)
src/flask/json/tag.py:309
↓ 1 callersFunctionabort
Raise an :exc:`~werkzeug.exceptions.HTTPException` for the given status code. If :data:`~flask.current_app` is available, it will call its
src/flask/helpers.py:266
↓ 1 callersMethodadd_app_template_global
Register a template global, available in any template rendered by the application. Works like the :meth:`app_template_global` decorator. Equiv
src/flask/sansio/blueprints.py:535
↓ 1 callersMethodadd_template_global
Register a custom template global function. Works exactly like the :meth:`template_global` decorator. .. versionadded:: 0.10
src/flask/sansio/app.py:765
↓ 1 callersMethodadd_url_rule
Register a rule for routing incoming requests and building URLs. The :meth:`route` decorator is a shortcut to call this with the ``vie
src/flask/sansio/scaffold.py:368
↓ 1 callersMethodapp
(self)
tests/test_cli.py:448
↓ 1 callersMethodasync_to_sync
Return a sync function that will run the coroutine function. .. code-block:: python result = app.async_to_sync(func)(*args, **kw
src/flask/app.py:980
↓ 1 callersFunctionattach_enctype_error_multidict
Patch ``request.files.__getitem__`` to raise a descriptive error about ``enctype=multipart/form-data``. :param request: The request to patch.
src/flask/debughelpers.py:81
↓ 1 callersMethodauto_find_instance_path
Tries to locate the instance path if it was not provided to the constructor of the application class. It will basically calculate the
src/flask/sansio/app.py:510
↓ 1 callersFunctioncelery_init_app
(app: Flask)
examples/celery/src/task_app/__init__.py:29
↓ 1 callersMethodcheck
Check if the given value should be tagged by this tag.
src/flask/json/tag.py:73
↓ 1 callersMethodcommand
This works exactly like the method of the same name on a regular :class:`click.Group` but it wraps callbacks in :func:`with_appcontext`
src/flask/cli.py:413
↓ 1 callersFunctioncreate_app
()
examples/celery/src/task_app/__init__.py:7
↓ 1 callersMethodcreate_app
()
tests/test_cli.py:66
↓ 1 callersMethodcreate_global_jinja_loader
Creates the loader for the Jinja2 environment. Can be used to override just the loader and keeping the rest unchanged. It's discoura
src/flask/sansio/app.py:523
↓ 1 callersMethodcreate_jinja_environment
(self)
src/flask/sansio/app.py:479
↓ 1 callersFunctioncreate_logger
Get the Flask app's logger and configure it if needed. The logger name will be the same as :attr:`app.import_name <flask.Flask.name>`. W
src/flask/logging.py:58
↓ 1 callersFunctioncreate_namespace
(package)
tests/test_instance_config.py:47
↓ 1 callersFunctiondecorator
(ctx: click.Context, /, *args: t.Any, **kwargs: t.Any)
src/flask/cli.py:395
↓ 1 callersMethoddispatch_request
Does the request dispatching. Matches the URL and returns the return value of the view or error handler. This does not have to be a
src/flask/app.py:879
↓ 1 callersMethoddo_teardown_appcontext
Called right before the application context is popped. When handling a request, the application context is popped after the request c
src/flask/app.py:1360
↓ 1 callersMethoddo_teardown_request
Called after the request is dispatched and the response is returned, right before the request context is popped. This calls all funct
src/flask/app.py:1326
↓ 1 callersFunctiondotenv_not_available
()
tests/test_cli.py:521
↓ 1 callersFunctiondumps
Serialize data as JSON. If :data:`~flask.current_app` is available, it will use its :meth:`app.json.dumps() <flask.json.provider.JSONProvider
src/flask/json/__init__.py:13
↓ 1 callersMethoddumps
Serialize data as JSON to a string. Keyword arguments are passed to :func:`json.dumps`. Sets some parameter defaults from the :attr:`
src/flask/json/provider.py:166
↓ 1 callersMethoderrorhandler
Register a function to handle errors by code or exception class. A decorator that is used to register a function given an error code.
src/flask/sansio/scaffold.py:598
↓ 1 callersMethodexit
(self)
tests/test_cli.py:236
↓ 1 callersFunctionexpect
(path, header_value="Cookie")
tests/test_basic.py:554
↓ 1 callersFunctionexpect_exception
(f, *args, **kwargs)
tests/test_basic.py:364
↓ 1 callersFunctionexplain_template_loading_attempts
This should help developers understand what failed
src/flask/debughelpers.py:124
↓ 1 callersFunctionfind_app_by_string
Check if the given string is a variable name or a function. Call a function to get the app instance, or return the variable directly.
src/flask/cli.py:120
↓ 1 callersFunctionfind_package
Find the prefix that a package is installed under, and the path that it would be imported from. The prefix is the directory containing the st
src/flask/sansio/scaffold.py:754
↓ 1 callersMethodgenerate
()
tests/test_helpers.py:240
↓ 1 callersFunctiongenerator
()
src/flask/helpers.py:108
↓ 1 callersMethodget_cookie_domain
The value of the ``Domain`` parameter on the session cookie. If not set, browsers will only send the cookie to the exact domain it was set fro
src/flask/sessions.py:189
↓ 1 callersMethodget_cookie_httponly
Returns True if the session cookie should be httponly. This currently just returns the value of the ``SESSION_COOKIE_HTTPONLY`` confi
src/flask/sessions.py:209
↓ 1 callersMethodget_cookie_partitioned
Returns True if the cookie should be partitioned. By default, uses the value of :data:`SESSION_COOKIE_PARTITIONED`. .. versionadded::
src/flask/sessions.py:229
↓ 1 callersMethodget_cookie_path
Returns the path for which the cookie should be valid. The default implementation uses the value from the ``SESSION_COOKIE_PATH`` con
src/flask/sessions.py:201
↓ 1 callersMethodget_cookie_samesite
Return ``'Strict'`` or ``'Lax'`` if the cookie should use the ``SameSite`` attribute. This currently just returns the value of the :da
src/flask/sessions.py:222
↓ 1 callersMethodget_cookie_secure
Returns True if the cookie should be secure. This currently just returns the value of the ``SESSION_COOKIE_SECURE`` setting.
src/flask/sessions.py:216
↓ 1 callersMethodget_expiration_time
A helper method that returns an expiration date for the session or ``None`` if the session is linked to the browser session. The defa
src/flask/sessions.py:237
↓ 1 callersMethodget_namespace
Returns a dictionary containing a subset of configuration options that match the specified namespace/prefix. Example usage:: app.
src/flask/config.py:323
↓ 1 callersFunctionget_root_path
Find the root path of a package, or the path that contains a module. If it cannot be found, returns the current working directory. Not to
src/flask/helpers.py:570
↓ 1 callersMethodget_send_file_max_age
Used by :func:`send_file` to determine the ``max_age`` cache value for a given file path if it wasn't passed. By default, this return
src/flask/app.py:281
↓ 1 callersMethodget_send_file_max_age
Used by :func:`send_file` to determine the ``max_age`` cache value for a given file path if it wasn't passed. By default, this return
src/flask/blueprints.py:55
↓ 1 callersMethodgroup
This works exactly like the method of the same name on a regular :class:`click.Group` but it defaults the group class to :class:`AppGr
src/flask/cli.py:429
↓ 1 callersMethodhandle_exception
Handle an exception that did not have an error handler associated with it, or that was raised from an error handler. This always cause
src/flask/app.py:811
↓ 1 callersMethodhandle_http_exception
Handles an HTTP exception. By default this will invoke the registered error handlers and fall back to returning the exception as resp
src/flask/app.py:744
↓ 1 callersMethodhandle_url_build_error
Called by :meth:`.url_for` if a :exc:`~werkzeug.routing.BuildError` was raised. If this returns a value, it will be returned by ``url_
src/flask/sansio/app.py:932
↓ 1 callersMethodhandle_user_exception
This method is called whenever an exception occurs that should be handled. A special case is :class:`~werkzeug .exceptions.HTTPExcepti
src/flask/app.py:779
↓ 1 callersFunctionhandler
(error, endpoint, values)
tests/test_basic.py:1361
↓ 1 callersMethodindex
(self, test="a")
tests/test_basic.py:1835
↓ 1 callersMethodinvoke
Invokes a CLI command in an isolated environment. See :meth:`CliRunner.invoke <click.testing.CliRunner.invoke>` for full method docume
src/flask/testing.py:274
↓ 1 callersMethodlist_templates
(self)
src/flask/templating.py:111
↓ 1 callersFunctionload
Deserialize data as JSON read from a file. If :data:`~flask.current_app` is available, it will use its :meth:`app.json.load() <flask.json.pro
src/flask/json/__init__.py:108
↓ 1 callersMethodlog_exception
Logs an exception. This is called by :meth:`handle_exception` if debugging is disabled and right before the handler is called. The de
src/flask/app.py:864
↓ 1 callersMethodlogout
(self)
examples/tutorial/tests/conftest.py:56
↓ 1 callersMethodmake_aborter
Create the object to assign to :attr:`aborter`. That object is called by :func:`flask.abort` to raise HTTP errors, and can be called d
src/flask/sansio/app.py:498
↓ 1 callersMethodmake_config
Used to create the config attribute by the Flask constructor. The `instance_relative` parameter is passed in from the constructor of F
src/flask/sansio/app.py:482
↓ 1 callersMethodmake_default_options_response
This method is called to create the default ``OPTIONS`` response. This can be changed through subclassing to change the default behavi
src/flask/app.py:953
↓ 1 callersMethodmake_null_session
Creates a null session which acts as a replacement object if the real session support could not be loaded due to a configuration error
src/flask/sessions.py:164
↓ 1 callersMethodmake_setup_state
Creates an instance of :meth:`~flask.blueprints.BlueprintSetupState` object that is later passed to the register callback functions. S
src/flask/sansio/blueprints.py:246
↓ 1 callersMethodmake_shell_context
Returns the shell context for an interactive shell for this application. This runs all the registered shell context processors.
src/flask/app.py:534
↓ 1 callersFunctionmeh
()
tests/test_reqctx.py:113
↓ 1 callersMethodpop
Pops the request context and unbinds it by doing that. This will also trigger the execution of functions registered by the :meth:`~fl
src/flask/ctx.py:396
↓ 1 callersMethodpost
(self)
tests/test_async.py:35
↓ 1 callersMethodpreprocess_request
Called before the request is dispatched. Calls :attr:`url_value_preprocessors` registered with the app and the current blueprint (if a
src/flask/app.py:1271
↓ 1 callersMethodprocess_response
Can be overridden in order to modify the response object before it's sent to the WSGI server. By default this will call all the :meth
src/flask/app.py:1298
← previousnext →101–200 of 1,195, ranked by callers