Qandle AI Python SDK
A Python client for interacting with the Qandle AI API.
Installation
Install the package from PyPI:
pip install qandle-ai
Configuration
The client can be configured using environment variables:
QANDLE_API_KEY: Your Qandle AI API key (required)QANDLE_API_URL: The base URL for the Qandle AI API (optional, defaults tohttps://api.qandle.ai)
Usage
Basic Usage
from qandle_ai import QandleClient
# Initialize the client (uses QANDLE_API_KEY environment variable)
client = QandleClient()
# Get stock summary
summary = client.get("AAPL")
print(summary)
Custom Configuration
from qandle_ai import QandleClient
# Initialize with custom API key and base URL
client = QandleClient(
api_key="your-api-key-here",
base_url="https://custom-api.qandle.ai"
)
# Get stock summary
summary = client.get("TSLA")
print(summary)
API Reference
QandleClient
__init__(api_key=None, base_url=None)
Initialize the Qandle AI client.
Parameters:
api_key(str, optional): The API key for Qandle AI. If not provided, will attempt to get fromQANDLE_API_KEYenvironment variable.base_url(str, optional): The base URL for the Qandle AI API. If not provided, will use the defaulthttps://api.qandle.aiorQANDLE_API_URLenvironment variable.
get(symbol)
Retrieve the current action summary for a stock using the Qandle AI API.
Parameters:
symbol(str): The stock symbol for which to obtain the current action summary.
Returns:
str: The stock summary message or error message.
Error Handling
The client handles various types of errors and returns descriptive error messages:
- Missing API key: Raises
ValueErrorduring initialization - Network errors: Returns error message with details
- JSON parsing errors: Returns error message with details
- Other unexpected errors: Returns generic error message
Metadata
Release files for qandle-ai 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| qandle_ai-0.0.1.tar.gz | 3.8 kB | Without provenance | Details for qandle_ai-0.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| qandle_ai-0.0.1-py3-none-any.whl | Python 3 | none | any | Details for qandle_ai-0.0.1-py3-none-any.whl |
Total release size: 8.0 kB
Release files / qandle_ai-0.0.1.tar.gz
| Download URL | qandle_ai-0.0.1.tar.gz |
|---|---|
| Size | 3.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4cabb5fdedbc707311fcef5d00a711902bac1c8dc2485e38e58be5bfaa0d730f
|
|
BLAKE2b-256 checksum How to use checksums |
c108201e06dd9640df429f23564ed7af71a2e7ce4e31a8b986a0ae7aaa60d4ed
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.6
|
Release files / qandle_ai-0.0.1-py3-none-any.whl
| Download URL | qandle_ai-0.0.1-py3-none-any.whl |
|---|---|
| Size | 4.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5ec1e05f3667a39e05584b60362478222842da2afe93ced02e92df804074291d
|
|
BLAKE2b-256 checksum How to use checksums |
7e3d017acb94fd37b227f037cbcfdc9f507f5b130c3799effcdd964d7e0d226e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.6
|
Security for qandle-ai 0.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.