Skip to main content

Documentation Status

QCS API Client

A client library for accessing the Rigetti QCS API.

Usage

Synchronous Usage

from qcs_api_client.client import build_sync_client
from qcs_api_client.models import ListReservationsResponse
from qcs_api_client.operations.sync import list_reservations

with build_sync_client() as client:
    response: ListReservationsResponse = list_reservations(client=client).parsed

Asynchronous Usage

from qcs_api_client.client import build_async_client
from qcs_api_client.models import ListReservationsResponse
from qcs_api_client.operations.asyncio import list_reservations

# Within an event loop:
async with build_async_client() as client:
    response: ListReservationsResponse = await list_reservations(client=client).parsed

Configuration

By default, initializing your client with build_sync_client or build_async_client will load your QCS configuration using the Python bindings to qcs-api-client-common. You can influence these with the following environment variables:

  • A profile name (env: QCS_PROFILE_NAME). The name of the profile referenced in your settings file. If not provided, this will evaluate this to a default_profile_name set in your settings file or the string "default".
  • A settings file path (env: QCS_SETTINGS_FILE_PATH). A path to the current user's settings file in TOML format. If not provided, this will evaluate to ~/.qcs/settings.toml.
  • A secrets file path (env: QCS_SECRETS_FILE_PATH). A path to the current user's secrets file in TOML format. If not provided, this will evaluate to ~/.qcs/secrets.toml. The user should have write access to this file, as the client may update the file with refreshed access tokens.

If you need to specify a custom profile name, you can initialize your client accordingly:

from qcs_api_client_common.configuration import ClientConfiguration

from qcs_api_client.client import build_sync_client
from qcs_api_client.models import ListReservationsResponse
from qcs_api_client.operations.sync import list_reservations

configuration = ClientConfiguration.load_profile(profile_name='custom')

with build_sync_client(configuration=configuration) as client:
    response: ListReservationsResponse = list_reservations(client=client).parsed

Development

The source code for this repository is synchronized from another source. No commits made directly to GitHub will be retained.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

qcs_api_client-0.27.7.tar.gz (50.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

qcs_api_client-0.27.7-py3-none-any.whl (170.3 kB view details)

Uploaded Python 3

File details

Details for the file qcs_api_client-0.27.7.tar.gz.

File metadata

  • Download URL: qcs_api_client-0.27.7.tar.gz
  • Upload date:
  • Size: 50.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.4.2 CPython/3.12.3 Linux/6.17.0-1022-azure

File hashes

Hashes for qcs_api_client-0.27.7.tar.gz
Algorithm Hash digest
SHA256 097b71468dfb2bcdd1ee27999fe0e22f9efa5a71dd1be74852ad9f870a705e02
MD5 e5f248c9c2f1dd14f01fd9be36134958
BLAKE2b-256 c66365fbbc8d62f62fd83ecb32a94a31fb64138f84a7834fb657027b366b3668

See more details on using hashes here.

File details

Details for the file qcs_api_client-0.27.7-py3-none-any.whl.

File metadata

  • Download URL: qcs_api_client-0.27.7-py3-none-any.whl
  • Upload date:
  • Size: 170.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.4.2 CPython/3.12.3 Linux/6.17.0-1022-azure

File hashes

Hashes for qcs_api_client-0.27.7-py3-none-any.whl
Algorithm Hash digest
SHA256 b74caf3a14f21716f1c0fd39cbffd79a59222a115815767c6fce4ddcc89972bb
MD5 76ad577100c227a01cd37cdd6d090303
BLAKE2b-256 62430fb789017da9efd77132fb5d5c42411cd79f4e00632652ce2539e270a36d

See more details on using hashes here.

Release history Release notifications | RSS feed

0.27.8

2 files

This release

0.27.7 This release

2 files

0.27.6

2 files

0.27.5

2 files

0.27.4

2 files

0.27.3

2 files

0.26.5

2 files

0.26.4

2 files

0.25.5

2 files

0.25.4

2 files

0.25.3

2 files

0.25.2

2 files

0.25.1

2 files

0.25.0

2 files

0.24.1

2 files

0.23.4

2 files

0.23.3

2 files

0.23.2

2 files

0.23.1

2 files

0.23.0

2 files

0.22.0

2 files

0.21.6

2 files

0.21.5

2 files

0.21.4

2 files

0.21.3

2 files

0.21.2

2 files

0.21.1

2 files

0.21.0

2 files

0.20.17

2 files

0.20.16

2 files

0.20.14

2 files

0.20.13

2 files

0.20.12

2 files

0.20.11

2 files

0.20.10

2 files

0.20.9

2 files

0.20.8

2 files

0.20.7

2 files

0.20.6

2 files

0.20.5

2 files

0.20.4

2 files

0.20.3

2 files

0.20.2

2 files

0.20.1

2 files

0.20.0

2 files

0.19.0

2 files

0.18.0

2 files

0.17.0

2 files

0.16.0

2 files

0.15.0

2 files

0.14.0

2 files

0.13.0

2 files

0.12.1

2 files

0.12.0

2 files

0.11.0

2 files

0.10.0

2 files

0.9.0

2 files

0.8.0

2 files

0.7.0

2 files

0.6.2

2 files

0.6.1

2 files

0.6.0

2 files

0.5.2

2 files

0.4.3

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page