Install & Compatibility
Where this runs
tested against v1.7.10 · 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
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.824s · 34.3MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 5.4s · import 0.742s · 37MB
33MB installed
● package 33MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
DuneClient
✓ from dune_client.client import DuneClient
✗ from dune_client import DuneClient
DuneClient is in the client submodule, not top-level
AsyncDuneClient
✓ from dune_client.async_client import AsyncDuneClient
Initialize client with API key, fetch latest query result, and refresh a query with parameters.
import os
from dune_client.client import DuneClient
from dune_client.types import QueryParameter
api_key = os.environ.get("DUNE_API_KEY", "")
if not api_key:
raise ValueError("Set DUNE_API_KEY environment variable")
client = DuneClient(api_key)
# Execute a query by ID
result = client.get_latest_result(12345)
print(result)
# Execute a query with parameters
params = [QueryParameter.text_type(name="network", value="ethereum")]
result = client.refresh(12345, params=params)
print(result)
Errors
Common errors & fixes
from dune_client import DuneClient
ImportError: cannot import name 'DuneClient' from 'dune_client'
DuneClient is in the client submodule.
fixUse: from dune_client.client import DuneClient
AttributeError: 'DuneClient' object has no attribute 'from_env'
from_env() removed in v1.8.0.
fixUse: DuneClient(os.getenv('DUNE_API_KEY')) dune_client.client.DuneAuthenticationError: API key not found
API key not provided or empty.
fixSet DUNE_API_KEY environment variable or pass key argument.
Upgrade
Version history
1.11.2latest on PyPI · released Jun 9, 2026
Audit
Dependencies
No dependency data recorded yet.