Simplify reading Connect pins as the viewer
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
#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.
- Ngôn ngữ chính
- Python
- Star
- 59
- Fork
- 11
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của rstudio/pins-python
-
.maint
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
rstudio/pins-python#280 ·
-
Test board github with a tokenĐang mởtesting
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
rstudio/pins-python#196 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 55/100
rstudio/pins-python#354 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 55/100
rstudio/pins-python#352 ·
-
Pins ecosystem documentationĐang mở.documentation
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
rstudio/pins-python#348 ·
Tất cả issue của rstudio/pins-python
Issue tương tự
-
plot_graph crashes when a mesh node has no m2m edgeCó thể đã có người làm @tygvi đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
mllam/neural-lam#883 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
enhancement possible-duplicate
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 78/100
AOSSIE-Org/PictoPy#1715 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 6 ngày
-
SQLite connector omits generated columns from the catalog, and drops relationships sourced on themĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
NVIDIA/auto-ontology#511 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
ethereum/execution-specs#3996 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
cpp-best-practices/project_validator#267 ·
Maintainer thường phản hồi trong vòng 1 ngày