qbraid_core.services.projects.ProjectsClient
- class qbraid_core.services.projects.ProjectsClient(api_key=None, session=None)
Client for interacting with qBraid Hub projects (Explore page).
Hub projects are GitHub-hosted templates with optional pre-configured environments. Users can clone them and install the associated environment in a single operation.
Example
>>> from qbraid_core.services.projects import ProjectsClient >>> client = ProjectsClient() >>> projects = client.list_projects() >>> for p in projects: ... print(p["title"], p["slug"]) >>> client.install_project("qiskit-tutorial", target_dir="~/")
- __init__(api_key=None, session=None)
Methods
__init__([api_key, session])clone_project(github_url[, target_dir, ...])Clone a GitHub repository to the local filesystem.
get_credits_balance()Get the current user's credit balance for their organization.
get_project(slug)Get a single project by slug.
install_project(slug[, target_dir, ...])Install a hub project: clone its GitHub repo and install env(s).
install_project_async(slug[, target_dir, ...])Async version of install_project for use inside an event loop.
list_projects([search, featured, category, ...])List all hub projects.
running_in_lab()Check if running in the qBraid Lab environment.
user_credits_value()Get the current user's qBraid credits value.
Attributes
sessionThe QbraidSessionV1 used to make requests.