QhashAI SDK to integrate quantumhash.me APIs
Project description
Qhash Python SDK
The Qhash Python SDK provides a powerful interface for interacting with Qhash AI services. This SDK simplifies the process of making API calls, handling authentication, and managing responses from Qhash endpoints.
Installation
To install the Qhash Python SDK, use the following command:
pip install qhash-python
Quick Start
Here's how to get started with the Qhash Python SDK:
from qhash import (
ConnectionConfig,
)
from pprint import pprint
connection_config = ConnectionConfig.default_connection_config(
ConnectionConfig.with_sdk(
"{your-api-key-here}" # Replace with your actual API key
)
)
Authentication
You can configure the Qhash SDK to authenticate using your API Key or Personal Token:
Authenticating with API Key
import os
from qhash.connections import ConnectionConfig
connection_config = ConnectionConfig.with_sdk(
os.environ["QHASH_API_KEY"] # API Key from environment variables
)
Authenticating with Personal Token
import os
from qhash.connections import ConnectionConfig
connection_config = ConnectionConfig.with_personal_token(
os.environ["QHASH_AUTHORIZATION_TOKEN"], # Authorization Token
os.environ["QHASH_AUTH_ID"], # Authentication ID
os.environ["QHASH_PROJECT_ID"], # Project ID
)
Configuration Options
The DefaultConnectionConfig accepts multiple options for configuring the SDK. Key options include:
with_sdk(api_key: str): Sets the API key for authentication.with_personal_token(auth_token: str, auth_id: str, project_id: str): Configures the connection for personal tokens.with_endpoint_url(url: str): Overrides the default API endpoint URL.with_timeout(timeout: float): Sets the timeout for API requests (in seconds).
Compatibility
This SDK requires Python 3.8 or later. Ensure your system meets this requirement:
python --version
To upgrade or specify a version, use the following command:
pip install --upgrade qhash-python
Conclusion
The Qhash Python SDK provides everything necessary to integrate seamlessly with Qhash AI services, offering flexible configuration and authentication options. With the examples provided, you should be able to get started quickly and make advanced API calls as needed.
Project details
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file qhash_python-0.1.16.tar.gz.
File metadata
- Download URL: qhash_python-0.1.16.tar.gz
- Upload date:
- Size: 98.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1ed0ffedc184a9c5266ef093dfbb76ba4928cc8e40c17f29dfd543b021039208
|
|
| MD5 |
f9c68592057e10201ff61f9b703b049f
|
|
| BLAKE2b-256 |
d6d292cb63ebe14f848275ddf0ad8822466863caccaf341f212e55bc3e1d6693
|
File details
Details for the file qhash_python-0.1.16-py3-none-any.whl.
File metadata
- Download URL: qhash_python-0.1.16-py3-none-any.whl
- Upload date:
- Size: 136.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2ca976309cfde364676743806e853c75d66ce959ff60d470ce1221ecd23c444c
|
|
| MD5 |
b22c3b64110099e9d90a3993cb357ebe
|
|
| BLAKE2b-256 |
8ed0c8f30d2ceffb68fc17acabf37e747b7fb7ad26183b9164bbf80c67bfd62f
|