API Documentation¶
flask_request_logger¶
flask_request_logger.database¶
-
class
flask_request_logger.database.
SQLModel
(**kwargs)¶ Inspire by flask_builder.models
Use it and configure it just like flask_sqlalchemy
-
to_json
()¶
-
-
flask_request_logger.database.
Base
¶
flask_request_logger.models¶
-
class
flask_request_logger.models.
RequestLog
(method, url, content_length, remote_addr, user_agent)¶ -
__init__
(method, url, content_length, remote_addr, user_agent)¶ A simple constructor that allows initialization from kwargs.
Sets attributes on the constructed instance using the names and values in
kwargs
.Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.
-
-
class
flask_request_logger.models.
ResponseLog
(status_code, content_length, request_id)¶ -
__init__
(status_code, content_length, request_id)¶ A simple constructor that allows initialization from kwargs.
Sets attributes on the constructed instance using the names and values in
kwargs
.Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.
-
flask_request_logger.api¶
-
class
flask_request_logger.api.
RequestLogAPI
¶ - Extend from
flask.views.MethodView
An API that manipulates request_log table content.This API default added rules on endpoints /req-log/
-
class
flask_request_logger.api.
ResponseLogAPI
¶ - Extend from
flask.views.MethodView
An API that manipulates response_log table content.This API default added rules on endpoints /resp-log/
-
class
flask_request_logger.api.
LogAPI
¶ - Extend from
flask.views.MethodView
An API that combine request_log and response_log by using marshmallow schema.This API default added rules on endpoints /logs/