Registry / database / ytsaurus-client

ytsaurus-client

JSON →
library0.13.53pypypi✓ verified 22d ago

ytsaurus-client is the official Python client library for YTsaurus, a scalable and fault-tolerant open-source big data platform for distributed storage and processing. It provides a Python-friendly mechanism for running operations, reading/writing data to the cluster, and interacting with distributed file systems, MapReduce, and NoSQL key-value storage. The library is actively maintained with frequent releases, currently at version 0.13.48.

pip install ytsaurus-client
INSTALL
IMPORT
SIG · YTSAURUS-CLIENT
Y
ytsaurus-client
databasepythonv0.13.53
Install
3.0s avg
Import
848ms
Disk
53MB
Pass rate
5/ 10
Env Coverage5 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.13.53 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
2/3 runs
✓ 2.97s
py 3.11
2/3 runs
✓ 3s
py 3.12
2/3 runs
✓ 2.67s
py 3.13
2/3 runs
✓ 2.83s
py 3.9
2/3 runs
✓ 3.4s
53MB installed
● package 53MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

YtClient
from yt.wrapper import YtClient
import yt

This quickstart demonstrates how to initialize the YTsaurus client and perform basic operations like listing a directory and getting a node's attribute. It assumes `YT_PROXY` and `YT_TOKEN` environment variables are set for authentication and cluster proxy address. For a local setup, you might need `ytsaurus-local` and direct configuration.

import os import yt from yt.common import YtError # Configure connection via environment variables for a runnable example # In a real scenario, these would be set in your environment # or passed explicitly in client config. # Example: os.environ['YT_PROXY'] = 'your-yt-cluster-proxy' # Example: os.environ['YT_TOKEN'] = os.environ.get('YT_TOKEN', 'your-oauth-token') # Fallback for demonstration if environment variables are not set # Replace with actual proxy if running locally without env vars set. # For example: config=yt.config.Config(proxy='localhost:8000', token='your-token') client = yt.YtClient(config=yt.default_config.get_config_from_env()) try: # Example: List the root directory of Cypress # This requires 'read' permission on '//' root_content = client.list("//", attributes=["type"]) # Get type attribute print(f"First 5 items in root directory: {[item.attributes.get('type', 'unknown') + ' ' + str(item) for item in root_content[:5]]}") # Example: Get an attribute of a system node node_type = client.get("//sys/@type") print(f"Type of //sys: {node_type}") except YtError as e: print(f"YTsaurus Error: {e.message}") print("Please ensure YT_PROXY and YT_TOKEN environment variables are correctly set and you have access to the cluster.") except Exception as e: print(f"An unexpected error occurred: {e}")
yt --version
Debug
Known issues
breakingLoading snapshots containing 'list nodes' can cause master-server crashes. This is a server-side breaking change, but can impact client operations.
fix
Ensure YTsaurus cluster administrators have applied the recommended mitigation by disabling `alert_on_list_node_load` in the dynamic configuration. List nodes are slated for complete removal in future major versions.
affects: YTsaurus Server versions 25.3.0 and later. Mitigation: disable `alert_on_list_node_load` in dynamic config.
breakingTablet resource accounting changed default behavior from per-account to per-bundle for newly deployed clusters. This is a server-side change that may affect resource management and billing if not accounted for.
fix
Review your resource accounting and capacity planning, especially if you manage multiple tablet bundles or accounts on new YTsaurus deployments. Existing clusters are not affected by default.
affects: YTsaurus Server versions 25.3.0 and later (only for newly deployed clusters).
gotchaYSON C++ bindings (`ytsaurus-yson`) are not supported on Windows and require Rosetta 2 emulation for Apple M1/M2 platforms.
fix
On Windows, YSON will be handled by the slower pure-Python implementation. On Apple Silicon, use Rosetta 2 to run an x86_64 Python environment or be prepared for pure-Python YSON processing. Performance-critical workloads might require Linux environments.
affects: All versions on Windows and Apple Silicon without Rosetta 2.
gotchaMixing installation methods for `ytsaurus-client` and `ytsaurus-yson` (e.g., pip and system packages) can lead to hard-to-diagnose problems.
fix
Always install both `ytsaurus-client` and `ytsaurus-yson` using a consistent method, preferably `pip` within a virtual environment. Avoid using `sudo pip install` if possible.
affects: All versions.
gotchaWhen using dynamic tables, there are strict limits on value size (16 MB per cell), row length (128-512 MB for an entire row across versions), number of values per row (1024), and rows per query (e.g., 100,000 for inserts, 1 million for selects).
fix
Design your data schema and queries to respect these limits. For frequent delta writes in aggregation columns, consider setting `@merge_rows_on_flush=%true` and configuring TTL deletion to manage versions efficiently.
affects: All versions.
gotchaSmall chunks (under 100 MB, ideally aiming for 512 MB average) in static tables can significantly increase master server load and slow down data reads.
fix
For tables with many small chunks, use `yt merge --src //your/table --dst //your/table --spec '{combine_chunks=true;mode=<mode>}'` to increase chunk size. In Python, `auto_merge_output={action=merge}` can be specified in configuration to automatically aggregate resulting tables.
affects: All versions.
Upgrade
Version history
0.13.53latest on PyPI · released Jul 24, 2026
Audit
Dependencies
ytsaurus-ysonoptionalProvides C++ bindings for YSON format for improved performance; optional and platform-dependent.
ytsaurus-client-yc-authoptionalRequired for authentication when connecting to YTsaurus clusters in Yandex Cloud.
Agent activity
43 hits · last 30 days
node
38
OpenAI (training)
1
Resources
ytsaurus-client — pip install ytsaurus-client · libregistry