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])

cleanup_project_environments(slug, cwd, *[, ...])

Preview or explicitly apply local cleanup of completed older prefixes.

clone_project(github_url[, target_dir, ...])

Clone a GitHub repository to the local filesystem.

configure_project(slug, *[, ...])

Update author setup on the existing project; never publish linked resources.

create_project(definition)

Create a private project definition; publication is a separate request.

get_clone_credentials(slug, reviewed_revision)

Resolve currently authorized clone credentials; never log or preview the result.

get_credits_balance()

Get the current user's credit balance for their organization.

get_execution_snapshot(slug[, reviewed_revision])

Read and verify the server's complete, credential-free setup snapshot.

get_project(slug)

Get a single project by slug.

get_publish_status(slug)

Read the creator's publication state and public review message.

inspect_reviewed_project(slug, reviewed_revision)

Read pinned tracked configuration before consent, without a checkout or install.

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.

install_reviewed_project(slug, reviewed_revision)

Install one reviewed project for Claude, Codex and CodeQ without launching.

install_reviewed_project_async(slug, ...[, ...])

Prepare all tools; cancellation joins before this coroutine returns.

list_projects([search, featured, category, ...])

List all hub projects.

prepare_project(slug, reviewed_revision, tool)

Explicitly prepare the reviewed repository, environments and skills; never launch.

prepare_project_async(slug, ...[, ...])

Prepare one tool; cancellation joins the cooperative preparation worker.

project_agent_preset(slug, ...)

Revalidate completed preparation and the current setup immediately before launch.

request_publish(slug)

Request public catalogue review without publishing linked resources.

revoke_publish_request(slug)

Withdraw or unpublish a project without deleting it or its dependencies.

running_in_lab()

Check if running in the qBraid Lab environment.

user_credits_value()

Get the current user's qBraid credits value.

Attributes

reviewed_setup_schema_version

session

The QbraidSessionV1 used to make requests.