user:thomas 由使用者建立的 Gists
user:thomas
title:mygist Gists 的標題
title:mygist
filename:myfile.txt Gists 的檔案名稱
filename:myfile.txt
extension:yml Gists 的副檔名
extension:yml
language:go Gists 的程式語言
language:go
topic:homelab gists with given topic
topic:homelab
登錄
最後活躍 1 week ago
此腳本展示如何在 FastAPI 中同時實作 Authentication(Token 驗證)與 Authorization(Scope 權限)並使用 loguru 進行結構化日誌。 使用 class‑based 依賴注入,支援 users:read 與 system:status 兩種權限範圍。 提供兩個端點:/users/me(一般使用者)與 /admin/system(管理員),可直接以 uvicorn 啟動測試。
嵌入
將這個 Gist 嵌入您的網站。
透過 HTTP 複製
使用 HTTP 基本認證透過 Git 複製。
透過 SSH 複製
使用 SSH 金鑰透過 Git 複製。
由 Opengist 提供支持 ⋅ Load: 11ms⋅