Simplify reading Connect pins as the viewer
還沒有人認領這個 Issue。
評估
研究方向
Start with the visitor example in docs/index.qmd and review the existing Client.with_user_session_token() behavior described in the issue. The work also depends on adding a helper to posit-sdk and deciding whether board_connect() should accept a visitor client or session directly. Done when the helper and example are updated and the API design choice is resolved.
由索引模型根據 Issue 內容生成。
描述
#362 documents how to read pins as the viewer on Posit Connect with a visitor API key. The example must read the Posit-Connect-User-Session-Token header from the Shiny session and exchange it with posit-sdk:
token = session.http_conn.headers.get("Posit-Connect-User-Session-Token")
client = connect.Client()
credentials = client.oauth.get_credentials(
token,
requested_token_type="urn:posit:connect:api-key",
)
board = board_connect(server_url=..., api_key=credentials["access_token"], cache=None)
Users must know about the header, the token exchange, and the token type, and it is easy to get wrong. Client.with_user_session_token() already does the exchange, but it does not expose the API key that pins needs.
In the review of the matching pins-r docs (rstudio/pins-r#906), a helper was proposed, so that the example does not need to explain the header or the exchange.
Tasks:
- Add a helper to posit-sdk that takes a Shiny session and returns the visitor API key, or a client that exposes it.
- Update the visitor example in
docs/index.qmdto use the helper. - Decide if
board_connect()should accept the visitor client or session directly, so that users do not pass the key and cache by hand.
- 主要語言
- Python
- 星號
- 59
- 分支
- 11
- PR 合併指標
- 30 天內沒有已合併 PR
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
rstudio/pins-python 的其他 Issue
-
.maint
難度 2/5 1-3 小時 新手友好度 62/100
rstudio/pins-python#280 ·
-
testing
難度 2/5 1-3 小時 新手友好度 62/100
rstudio/pins-python#196 ·
-
難度 2/5 1-3 小時 新手友好度 55/100
rstudio/pins-python#354 ·
-
難度 1/5 1 小時以內 新手友好度 55/100
rstudio/pins-python#352 ·
-
.documentation
難度 3/5 1-2 天 新手友好度 45/100
rstudio/pins-python#348 ·
查看 rstudio/pins-python 的全部 Issue
相似的 Issue
-
難度 1/5 1 小時以內 新手友好度 65/100
StevenBlack/hosts#3299 ·
-
`garak --report` overwrites the input report when its name has no ".report"可能已有人在做 @0z5a 今天認領。 未關閉needs-triage
難度 2/5 半天 新手友好度 72/100
維護者通常 2 天內回覆
-
plot_graph crashes when a mesh node has no m2m edge可能已有人在做 @tygvi 今天認領。 未關閉
難度 2/5 1-3 小時 新手友好度 78/100
mllam/neural-lam#883 · 1 則留言 ·
維護者通常 2 天內回覆
-
難度 2/5 1-3 小時 新手友好度 62/100
future-agi/future-agi#4092 · 1 則留言 ·
維護者通常 1 天內回覆
-
transcript analytics: a text whose only protected spans the prose pass redacts is withheld whole未關閉
難度 1/5 1 小時以內 新手友好度 82/100
WingedGuardian/GENesis-AGI#4641 ·
維護者通常 1 天內回覆