Skip to content

feat(skore-hub-project): Make skore-hub-login persist API server URI for notebook use #2037

@tuscland

Description

@tuscland

Use case

Authenticate with skore-hub-login, optionally specifying an API server URI (or using a scheme where the URI is resolved at login). Example:

SKORE_HUB_URI=https://skore-hub.api/ skore-hub-login

Current behavior

In a notebook, I currently have to set the environment variable manually before using the SDK:

import os
os.environ["SKORE_HUB_URI"] = "https://skore-hub.api/"

This step is tedious and error-prone.

Desired behavior

After logging in once, I should be able to instantiate a project directly and have the API server URI and authentication token reused automatically from the login step—no need to set SKORE_HUB_URI inside the notebook:

from skore import Project
project = Project("hub://tenant/project")

Acceptance criteria

  • Running skore-hub-login persists the selected API server URI along with the auth token in a location the Python SDK can read (e.g., config file or keyring).
  • skore.Project(...) resolves the API server URI and token from that persisted login context by default.
  • Clear error message when no URI can be resolved (e.g., not logged in and no env var).

Notes

  • Keep backward compatibility for existing workflows that set SKORE_HUB_URI explicitly.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions