Skip to content

rbb-data/update-consumer-price-index-database

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Update consumer price index database

The function update_database in main.py updates the consumer price index database when new data is available from Genesis. It uses the database's API at https://europe-west3-rbb-data-inflation.cloudfunctions.net/consumer-price-index-api (GitHub)

Development

Run locally

Note

The function uses secret environment variables. Add API_SECRET (secret to post to the consumer price index API) and GENESIS_PASSWORD (password for Genesis API) to .env.local that is not checked into version control.

Load environment variables from .env and .env.local:

export $(cat .env .env.local | xargs)

Install dependencies from requirement.txt and run the function:

python dev.py

Deploy

Set cloud project

gcloud config set project rbb-data-inflation

and run:

gcloud functions deploy update-consumer-price-index-database \
  --region=europe-west3 \
  --runtime=python310 \
  --entry-point=update_database \
  --trigger-topic=database-update

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published