Skip to content

Commit

Permalink
add README and include more Dune Configuration Options
Browse files Browse the repository at this point in the history
  • Loading branch information
bh2smith committed Oct 13, 2024
1 parent 1593068 commit 5770b8d
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 6 deletions.
1 change: 0 additions & 1 deletion .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ DB_URL=postgresql://postgres:postgres@localhost:5432/postgres

QUERY_ID=
POLL_FREQUENCY=10
# Optional.
QUERY_ENGINE=medium
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Dune Sync V2




## Local Development

Fill out the empty fields in [Sample Env](.env.sample) (`DUNE_API_KEY` and `QUERY_ID`)

```shell
docker-compose up -d
python -m src.main
```
10 changes: 5 additions & 5 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
from src.types import DUNE_TO_PG

load_dotenv()
DUNE_API_KEY = os.getenv("DUNE_API_KEY")
DB_URL = os.getenv("DB_URL")
DUNE_API_KEY = os.environ.get("DUNE_API_KEY")
DB_URL = os.environ.get("DB_URL")

# TODO(bh2smith): parse config file for most of the following stuff
QUERY_ID = int(os.getenv("QUERY_ID"))
POLL_FREQUENCY=int(os.getenv("POLL_FREQUENCY"))
QUERY_ENGINE = os.getenv("QUERY_ENGINE")
QUERY_ID = int(os.environ.get("QUERY_ID"))
POLL_FREQUENCY=int(os.environ.get("POLL_FREQUENCY"))
QUERY_ENGINE = os.environ.get("QUERY_ENGINE")
TABLE_NAME = f"dune_data_{QUERY_ID}"


Expand Down

0 comments on commit 5770b8d

Please sign in to comment.