Simplify reading Connect pins as the viewer
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 35/100
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
#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.
- Lenguaje dominante
- Python
- Estrellas
- 59
- Forks
- 11
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de rstudio/pins-python
-
.maint
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
rstudio/pins-python#280 ·
-
Test board github with a tokenAbiertotesting
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
rstudio/pins-python#196 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 55/100
rstudio/pins-python#354 ·
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 55/100
rstudio/pins-python#352 ·
-
Pins ecosystem documentationAbierto.documentation
Dificultad 3/5 1-2 días Aptitud para principiantes 45/100
rstudio/pins-python#348 ·
Todos los issues de rstudio/pins-python
Issues similares
-
plot_graph crashes when a mesh node has no m2m edgePosiblemente ocupada @tygvi la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
mllam/neural-lam#883 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
enhancement possible-duplicate
Dificultad 1/5 1-3 horas Aptitud para principiantes 78/100
AOSSIE-Org/PictoPy#1715 · 2 comentarios ·
Los mantenedores suelen responder en 6 días
-
SQLite connector omits generated columns from the catalog, and drops relationships sourced on themAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
NVIDIA/auto-ontology#511 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
ethereum/execution-specs#3996 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
cpp-best-practices/project_validator#267 ·
Los mantenedores suelen responder en 1 día