Unofficial library for Dune Analytics.
Project description
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)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
duneanalytics-1.2.1.tar.gz
(8.0 kB
view hashes)
Built Distribution
Close
Hashes for duneanalytics-1.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2e4bf5ec1b4cdad19e82fb7adf19d15c59bb9971dda000ceb56969ff44348a5 |
|
MD5 | 6535b95e48bf2bf50450eaaf6c94f579 |
|
BLAKE2b-256 | 46bce514d9ffafb33a264b9f55994165a966b15ba1933c06bc9279a7d95a2863 |