Skip to main content

The Yandex Query official HTTP client

Project description

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}")

Project details


Download files

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

Source Distribution

yandex_query_client-0.1.1.tar.gz (10.6 kB view hashes)

Uploaded Source

Built Distribution

yandex_query_client-0.1.1-py3-none-any.whl (7.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page