This consumer pulls data from the Rajasthan Urja Vikas Nigam Limited (RUVNL) website.
The API used is http://sldc.rajasthan.gov.in/rrvpnl/read-sftp?type=overview
Install dependencies (requires poetry)
poetry install
Lint with:
make lint
Format code with:
make format
make test
Replace {DB_URL}
with a postgres DB connection string (see below for setting up a ephemeral local DB)
If testing on a local DB, you may use the following script to seed the the DB with a dummy user, site and site_group.
DB_URL={DB_URL} poetry run seeder
This example invokes app.py and passes the help flag
DB_URL={DB_URL} poetry run app --help
docker run \
-it --rm \
-e POSTGRES_USER=postgres \
-e POSTGRES_PASSWORD=postgres \
-p 54545:5432 postgres:14-alpine \
postgres
The corresponding DB_URL
will be
postgresql://postgres:postgres@localhost:54545/postgres
Building and running in Docker
Build the Docker image
make docker.build
Run the image (this example invokes app.py and passes the help flag)
docker run -it --rm ocf/ruvnl-consumer-app --help