--- id: td-client version: "1.7.0" license: Apache Software License license_treatment: permissive maintenance: aging --- # td-client — Treasure Data API library for Python License: permissive · Maintenance: aging · Downloads: 370.2K/mo ## What it is and what it does td-client is a Python wrapper around Treasure Data's REST API that lets you run queries, manage jobs, and import data into Treasure Data's cloud warehouse. It supports direct API calls and Database API compatibility for tools like pandas. The library includes comprehensive type hints for static type checking and handles streaming imports, bulk batch imports, and result retrieval. You interact with Treasure Data through a Client context manager, passing your API key and choosing an endpoint. The package handles authentication, request formatting, and response parsing. It depends on python-dateutil, msgpack, and urllib3 for date handling, binary serialization, and HTTP requests respectively. Use it for: - Run SQL queries (Hive or Presto) against Treasure Data and retrieve results row-by-row in Python. - List and monitor query jobs running on Treasure Data, checking status and retrieving results. - Import CSV or JSON files into Treasure Data tables in streaming or batch mode with custom column type handling. - Load Treasure Data query results into DataFrames using pandas with Database API compatibility. - Bulk import msgpack-formatted data with error tracking and validation before committing to the warehouse. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Python client library for the Treasure Data REST API, enabling queries, job management, and data import to a cloud data warehouse. Yes, if you use Treasure Data. The library is stable, has low install friction, carries no known vulnerabilities, and provides both raw API access and Database API compatibility. The 197-day release gap suggests maintenance is reactive rather than proactive, so verify that it still aligns with your Treasure Data API version before relying on it for production. ## Install pip install td-client uv add td-client poetry add td-client ## Installing td-client Before you install: Low install friction with three common runtime dependencies. Package is aging (197 days since last release) but maintains stable support for Python 3.10 through 3.14 and PyPy. License in practice: Apache Software License (permissive) allows use in most projects with minimal restrictions; you must include a copy of the license and state significant changes. Quickstart: pip install td-client import tdclient with tdclient.Client() as td: for job in td.jobs(): print(job.job_id) Requires Python 3.10 or later. Treasure Data API key must be provided via TD_API_KEY environment variable or apikey= argument. Verify before relying: - Whether the 197-day release gap indicates active maintenance or dormancy relative to Treasure Data's own API evolution. - Current state of SSL certificate verification and whether certifi is still recommended or now bundled. - Whether the package implements the full Python Database API v2.0 specification or a subset. ## Package facts - License: Apache Software License (permissive) - Python support: supports_current - Install friction: low - Maintenance: aging - Downloads: 370.2K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags treasure data python client, treasure data api library, cloud data warehouse python, query treasure data from python, bulk data import python, treasure data job management, python database api wrapper, data-warehouse, rest-client, bulk-import [View on SkillFed](https://skillfed.io/packages/td-client) · [View on PyPI](https://pypi.org/project/td-client/)