| Total Complexity | 3 |
| Total Lines | 19 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | from flask import current_app, request |
||
| 2 | |||
| 3 | |||
| 4 | class _ContextProperty: |
||
| 5 | @property |
||
| 6 | def secret_key(self) -> str: |
||
| 7 | return current_app.secret_key |
||
| 8 | |||
| 9 | @property |
||
| 10 | def user_agent(self) -> str: |
||
| 11 | return request.headers['user_agent'] |
||
| 12 | |||
| 13 | @property |
||
| 14 | def remote_addr(self) -> str: |
||
| 15 | return request.remote_addr |
||
| 16 | |||
| 17 | |||
| 18 | context_property = _ContextProperty() |
||
| 19 |