Skip to content

nachochiappe/notion-savings

Repository files navigation

Notion Savings

This AWS Lambda Python script runs every hour and updates the prices of cryptocurrencies. It also calculates the total value of your crypto and fiat savings.

Features

  • Updates the prices of specified cryptocurrencies every hour.
  • Calculates the total value of your crypto and fiat savings.
  • Saves the data to a database or file for future reference.

Requirements

  • AWS Lambda account
  • Python 3.x
  • Required Python packages (specified in requirements.txt)
  • (Optional) python -m unittest for tests

Usage

  1. Clone or download the repository to your local machine.
  2. Create an AWS Lambda function and upload the code.
  3. Set up the required environment variables (e.g. API keys, database connection details).
  4. Configure a CloudWatch event to trigger the Lambda function every hour.

Notes

  • The Lambda validates required environment variables at startup and logs a clear error if one is missing.
  • Notion database queries are paginated, so totals and updates include all rows.
  • HTTP calls use timeouts and retries for transient errors.

Tests

Run the unit tests locally:

pytest
image

About

This is a Python script to update the prices of some cryptocurrencies in a Notion page. It also sums up the total of fiat + crypto savings.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors