The Yandex Query official HTTP client
Project Links
Meta
Requires Python: >=3.8
Classifiers
License
- OSI Approved :: MIT License
Operating System
- OS Independent
Programming Language
- Python :: 3
Installation
Install pip package:
%pip install yandex-query-client --upgrade --quiet
Example: simple select
# IAM token to access YandexQuery service
IAM_TOKEN="...."
# Folder ID to work within
PROJECT="my_folder_id"
config = YQHttpClientConfig(IAM_TOKEN, PROJECT)
client = YQHttpClient(config)
# start new query
query_id = client.create_query(query_text="select 777", name="my sample query")
# wait query to succeed
result_set_count = client.wait_query_to_succeed(query_id)
# results with column names, types and values in rows
results = client.get_query_all_result_sets(query_id, result_set_count=result_set_count)
print(f"results={results}")
Wheel compatibility matrix
Files in release
Extras:
Dependencies:
pandas
(>=1.2.5)
python-dateutil
(>=2.8.2)
requests
(>=2.31.0)
urllib3
(>=1.26.5)