--- id: dune-client version: "1.11.4" license: Apache License Version 2.0 license_treatment: permissive maintenance: active --- # dune-client — A simple framework for interacting with Dune Analytics official API service. License: permissive · Maintenance: active · Downloads: 218.3K/mo ## What it is and what it does dune-client is a Python wrapper around Dune Analytics' official REST API, designed to let you run SQL queries against blockchain data and retrieve results programmatically. It handles authentication, query parameterization (text, number, date, enum types), and result formatting—you can fetch results as JSON, CSV, or Pandas DataFrames. The package also supports advanced features like fetching cached results without re-running queries, and for paid subscribers, full CRUD operations to create, update, archive, and manage queries directly from Python. The library is built on standard HTTP clients (aiohttp and requests) and JSON serialization tools, making it straightforward to integrate into data pipelines, analytics scripts, or automated reporting workflows. It requires Python 3.11 or later and is actively maintained by the Dune Analytics team. Use it for: - Run parameterized SQL queries against Ethereum and other blockchain data without leaving Python. - Fetch cached query results to avoid re-execution costs when data freshness allows. - Build automated dashboards or reports that pull on-chain metrics into Pandas DataFrames. - Programmatically manage a library of Dune queries (create, update, archive) as part of a data pipeline. - Integrate blockchain data retrieval into Python applications that need real-time or periodic on-chain metrics. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. A Python client for querying and managing Dune Analytics queries via their official API, supporting parameterized queries, result retrieval in multiple formats, and CRUD operations on queries. Yes. The package is actively maintained, has low install friction, carries no known vulnerabilities, and is the official client for Dune's API. Install it if you need to query Dune Analytics from Python; the main prerequisite is a valid API key and an active Dune account. ## Install pip install dune-client uv add dune-client poetry add dune-client ## Installing dune-client Before you install: Low friction install with six straightforward dependencies. The package is actively maintained with a release within the last 10 days and supports current Python versions (3.11–3.14). License in practice: Apache License 2.0 is permissive; you can use, modify, and distribute this package freely in commercial and private projects as long as you include the license notice. Quickstart: pip install dune-client from dune_client.client import DuneClient from dune_client.types import QueryParameter from dune_client.query import QueryBase dune = DuneClient() query = QueryBase(name="Sample", query_id=1215383) results = dune.run_query(query) Requires a valid DUNE_API_KEY environment variable to authenticate with the Dune Analytics API. Verify before relying: - Rate limits or throttling behavior on the Dune API when running frequent queries. - Whether paid subscription features (CRUD operations, query creation) are fully functional in all environments. - Performance characteristics when handling large result sets or complex parameterized queries. ## Package facts - License: Apache License Version 2.0 (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 218.3K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags dune analytics api client, query blockchain data python, dune query execution, on-chain data retrieval, dune sql client, blockchain-data, api-client, analytics [View on SkillFed](https://skillfed.io/packages/dune-client) · [View on PyPI](https://pypi.org/project/dune-client/)