/
mkiiis
/
task_tracker
Обзор
Документация
Войти
/
mkiiis
/
task_tracker
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
main
app/utils.py
7 строк
311 B
mkiiis
Initial commit
15 ноя 2025, 20:48
15 ноя 2025, 20:48
666c5fe
Код
Авторство
О чём код?
from fastapi import Response def set_rate_headers(response: Response, limit: int, remaining: int, retry_after: int = 0): response.headers["X-Limit-Limit"] = str(limit) response.headers["X-Limit-Remaining"] = str(remaining) if retry_after: response.headers["Retry-After"] = str(retry_after)