planqk-service-sdk 2.1.1
pip install planqk-service-sdk==2.1.1
Latest version
Released:
SDK to interact with PLANQK Managed Services.
Navigation
Unverified details
These details have not been verified by PyPIProject links
Meta
- License: Apache Software License (Apache License)
- Author: Kipu Quantum GmbH
- Maintainer: Michael Wurster
- Requires: Python >=3.9
Classifiers
- License
- Operating System
- Programming Language
Project description
PLANQK Service SDK
Installation
The package is published on PyPI and can be installed via pip
:
pip install --upgrade planqk-service-sdk
Usage
import os
from planqk.service.client import PlanqkServiceClient
consumer_key = "..."
consumer_secret = "..."
service_endpoint = "..."
# Create a client
client = PlanqkServiceClient(service_endpoint, consumer_key, consumer_secret)
# Prepare your input data and parameters
data = {"input": {"a": 1, "b": 2}}
params = {"param1": "value1", "param2": "value2"}
# Start a service execution
service_execution = client.run(request={"data": data, "params": params})
# Wait for the service execution to finish (blocking)
service_execution.wait_for_final_state()
status = service_execution.status
ended_at = service_execution.ended_at
print(f"Service execution finished at '{ended_at}' with status '{status}'")
# Use the client to retrieve a service execution by its id
service_execution = client.get_service_execution("0030737b-35cb-46a8-88c2-f59d4885484d")
# Retrieve the result
result = service_execution.result()
# Retrieve service execution logs
logs = service_execution.logs()
# List the result files
files = service_execution.result_files()
# Download a result file
service_execution.download_result_file(files[0], os.getcwd())
Project details
Unverified details
These details have not been verified by PyPIProject links
Meta
- License: Apache Software License (Apache License)
- Author: Kipu Quantum GmbH
- Maintainer: Michael Wurster
- Requires: Python >=3.9
Classifiers
- License
- Operating System
- Programming Language
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file planqk_service_sdk-2.1.1.tar.gz
.
File metadata
- Download URL: planqk_service_sdk-2.1.1.tar.gz
- Upload date:
- Size: 32.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5df45e94bbfa92b090a278245449be0de96cdc8d9b9fc68366f242c3ba57f4ed |
|
MD5 | fa918125335333585943b6f6478d871c |
|
BLAKE2b-256 | bcdb67acdb73eacffea01e18ac61eee164a122de95c3937fda9ecaac0d3900ce |
File details
Details for the file planqk_service_sdk-2.1.1-py3-none-any.whl
.
File metadata
- Download URL: planqk_service_sdk-2.1.1-py3-none-any.whl
- Upload date:
- Size: 42.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 35146a049134a4ceb54f07fd94a449813385460c1943b1c78f14828d3ca76f92 |
|
MD5 | c3c28283959e3b2eb4507197c89aa498 |
|
BLAKE2b-256 | 1ab09b0d7fd61eaeda7da82bf552bf82f1a8df7e2bf736dd6178b3e7d0287787 |