Dune Analytics
Unofficial Python Library for Dune Analytics
The library can be used to fetch the table data from python backend.
Disclaimer: Use at your own risk!
It may not work for some/all urls.
This library doesn't run the query, rather it fetches the query result from the backend.
Charts Plotted:
Here are some examples of charts plotted in Googlesheet after fetching the data.
@balancerlabs / Balancer New/Old Traders
@k06a / 1inch New/Old Users Per Day
@Bancor / Bancor Unique Protected Wallets Over Time
Installation:
use pip to install:
pip install duneanalytics
Authentication:
You need to have username & password for Dune Analytics
Example usage:
from duneanalytics import DuneAnalytics
# initialize client
dune = DuneAnalytics('username', 'password')
# try to login
dune.login()
# fetch token
dune.fetch_auth_token()
# fetch query result id using query id
# query id for any query can be found from the url of the query:
# for example:
# https://dune.com/queries/4494/8769 => 4494
# https://dune.com/queries/3705/7192 => 3705
# https://dune.com/queries/3751/7276 => 3751
result_id = dune.query_result_id(query_id=5508)
# fetch query result
data = dune.query_result(result_id)
For some queries above might not work specially if using v3. Try to use below in that case:
# for example:
# https://dune.com/queries/1105079
result_id = dune.query_result_id_v3(query_id=1105079)
# fetch execution result
data = dune.get_execution_result(result_id)
Metadata
Release files for duneanalytics 2.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| duneanalytics-2.0.0.tar.gz | 8.4 kB | Without provenance | Details for duneanalytics-2.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| duneanalytics-2.0.0-py3-none-any.whl | Python 3 | none | any | Details for duneanalytics-2.0.0-py3-none-any.whl |
Total release size: 17.5 kB
Release files / duneanalytics-2.0.0.tar.gz
| Download URL | duneanalytics-2.0.0.tar.gz |
|---|---|
| Size | 8.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ba38787aefccfa80d415793d7b55cd75684aaee239466712503911a29209242f
|
|
BLAKE2b-256 checksum How to use checksums |
cce460b298e5bb2eb74c5019fcb401a0007ae11caa6f499ec6703be4c07922d5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.1
|
Release files / duneanalytics-2.0.0-py3-none-any.whl
| Download URL | duneanalytics-2.0.0-py3-none-any.whl |
|---|---|
| Size | 9.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6a74f5d7cae58869dd87c3bc3b4781136391fd92661c5fb7bf2fcffcc0e3180e
|
|
BLAKE2b-256 checksum How to use checksums |
288343a49dfb0cc357badc34b9aebeb90cbf64b94febdfde0f901067f93d1c59
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.1
|
Security for duneanalytics 2.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.