$npx skillfedfor your agent

pytd

Treasure Data Driver for Python

Worth itPyPI DatabaseReleased Feb 2026352.0K downloads / moApache-2.0Pure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — pytd-2.4.0-py3-none-any.whl
v2.4.0 · released 2026-02-03 · Python >=3.10 · 8 runtime deps: urllib3, trino, pandas, numpy, td-client, pytz, tqdm, pyarrow

Yes. pytd is actively maintained, has no known vulnerabilities, uses a permissive license, and offers low install friction. It is the recommended Python client for analytical workflows and efficient data movement with Treasure Data. Install it if you need to query Treasure Data or write pandas DataFrames to it; use td-client-python instead if you only need basic REST API operations.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires TD_API_KEY and TD_API_SERVER environment variables, or explicit apikey and endpoint parameters.
  • Python 3.10+ and pandas 2.1+ required.
  • Low install friction with a pure-wheel distribution.

License · maintenance · safety

Apache-2.0 (permissive) — Apache-2.0 permissive license allows commercial and private use with minimal restrictions.

last release 2026-02-03 (192 days) · last repo commit 2026-04-14 · 20 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 352,031 downloads/mo, #7,316 on PyPI

Verify before relying

pip install pytd

import pytd
client = pytd.Client(database='sample_datasets')
result = client.query('select symbol, count(1) as cnt from nasdaq group by 1')
  • Whether Presto or Hive query performance characteristics are documented for typical data volumes
  • Current status and migration path for deprecated spark writer option
  • Whether DB-API cursor.description field is reliably populated across all query types
Same gist for agents: .md · .json

What it is and what it does

pytd is a Python driver for Treasure Data that bridges pandas DataFrames with Treasure Data's query engines and storage. It wraps the REST API, Presto query engine, and Plazma primary storage into a single client interface, letting you issue SQL queries and retrieve results as structured data, or write DataFrames back to Treasure Data using bulk import or INSERT INTO methods.

The package is designed for analytical workflows in Jupyter notebooks and Python applications where you need to move data between pandas and Treasure Data efficiently. It supports both Presto and Hive query engines, offers generator-based iterative result retrieval via DB-API to handle timeouts on large result sets, and provides multiple data ingestion strategies—bulk import for scalability, INSERT INTO for memory efficiency on smaller datasets, or Spark for high-performance writes to Plazma storage (requires special account activation).

Use it for

  • Run Presto or Hive SQL queries against Treasure Data and retrieve results as Python dicts or via DB-API cursors
  • Write pandas DataFrames to Treasure Data tables using bulk import, INSERT INTO, or Spark writer
  • Migrate from the deprecated pandas-td package while maintaining compatible function signatures
  • Perform iterative data retrieval in Jupyter notebooks to avoid Presto timeout errors on large result sets
  • Access Treasure Data's Plazma primary storage directly via PySpark for high-volume analytical workloads

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

pytd is actively maintained, has no known vulnerabilities, uses a permissive license, and offers low install friction. It is the recommended Python client for analytical workflows and efficient data movement with Treasure Data. Install it if you need to query Treasure Data or write pandas DataFrames to it; use td-client-python instead if you only need basic REST API operations.

Install

pytd on PyPI

Before you install

Low install friction with a pure-wheel distribution. Active maintenance with recent commits and stable production status. Requires Python 3.10 or later and pandas 2.1 or later.

Requires TD_API_KEY and TD_API_SERVER environment variables, or explicit apikey and endpoint parameters. Python 3.10+ and pandas 2.1+ required.

License in practice

Apache-2.0 permissive license allows commercial and private use with minimal restrictions.

Quickstart

pip install pytd

import pytd
client = pytd.Client(database='sample_datasets')
result = client.query('select symbol, count(1) as cnt from nasdaq group by 1')

Verify before relying

  • Whether Presto or Hive query performance characteristics are documented for typical data volumes
  • Current status and migration path for deprecated spark writer option
  • Whether DB-API cursor.description field is reliably populated across all query types

Package facts

LicenseApache-2.0 permissive
Python supportSupports the current Python release >=3.10
Install frictionLow. Pure-Python wheel
Runtime dependencies
8 packages
urllib3trinopandasnumpytd-clientpytztqdmpyarrow
MaintenanceActively maintained 192 days since the last release
Last repo commit
First released
Downloads352,031 / month, #7,316 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableIntended Audience :: DevelopersProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Database

Evidence: pytd-2.4.0-py3-none-any.whl

Tags

Capabilities
treasure data python clientpresto query engine pythonpandas dataframe to treasure databulk import data warehousesql query result to dataframe
Topics
data-warehousepandas-integrationsql-query
PyPI keywords
databasetreasure-data

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “presto query engine python”

  • pytdpytd provides Python interfaces to Treasure Data's REST APIs, Presto…
  • presto-python-clientProvides a Python DBAPI-compatible client to query Presto, a…
  • PyHivePyHive provides DB-API and SQLAlchemy interfaces to query Presto,…

Give your agent the search over MCP, or paste the wish link into any chat.

More Database packages

psycopg2-binary Worth it
PyPI · Software Development · released Apr 2026

psycopg2-binary is a PostgreSQL database adapter for Python that implements the DB API 2.0 specification, enabling Python applications to connect to and query PostgreSQL databases with thread-safe concurrent operations.

copyleftcompiled wheel · 3.9+
271.6Mdownloads / mo
redis Worth it
PyPI · Database · released Jul 2026

Python client library for connecting to and executing commands against Redis key-value stores, supporting both synchronous and asynchronous operations.

Install it if your application needs to interact with Redis; the only prerequisite is a running Redis server instance.

MITpure Python · 3.10+
268.3Mdownloads / mo
ydb Worth it
PyPI · Database · released Jul 2026

YDB Python SDK is the official client library for connecting to and querying YDB databases from Python applications.

Install it if you need to connect Python applications to YDB databases.

permissive licensepure Python · 3.10+
210.0Mdownloads / mo
snowflake-connector-python Worth it
PyPI · Software Development · released Aug 2026

Connects Python applications to Snowflake data warehouses using the DB API 2.0 specification, enabling SQL queries, data transfers, and warehouse operations.

Apache-2.0compiled wheel · 3.10+
193.6Mdownloads / mo
sqlparse Worth it
PyPI · Software Development · released Aug 2026

sqlparse tokenizes SQL text into a tree of statements, clauses, and expressions, and provides functions to split scripts, format queries, and inspect parsed tokens without validating dialect or syntax.

Install it if you need to manipulate, format, or analyze SQL text programmatically.

BSD-3-Clausepure Python · 3.10+
148.9Mdownloads / mo
dbt-adapters With conditions
PyPI · Database · released Jul 2026

Provides base adapter protocols and shared functionality that database adapters use to integrate with dbt-core, handling connections, dialect translation, relation caching, and core interface management.

Apache-2.0pure Python · 3.10.0+
121.3Mdownloads / mo

See also pandas-td · td-client · presto-python-client · PyHive · db-dtypes · qpd · fastparquet · presto-types-parser · Quandl · pandasql