Skip to content

EnerMaps provides FAIR energy data with a visualization tool. The EnerMaps project has received funding from the European Union’s Horizon 2020 research and innovation program under grant agreement N°884161.

License

Notifications You must be signed in to change notification settings

historeno/enermaps

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Launch Historeno platform

Cpmmand

  • build of the plateform
docker-compose up --build
  • download of the datasets
docker-compose exec api /bin/bash -c 'flask update-dataset 1'
docker-compose --file docker-compose-db.yml up -d data-integration

CM Historeno

Service name

  • cm-historeno

Database

Service name

  • db

Modification from EmerMaps

  • added variable environment in the docker-compose
PGDATA: /var/lib/postgresql/data/historeno

pgAdmin acess

host : 127.0.0.1
Port : 5433
Maintenance database : postgres
Username : test (or see .env-db)
DB_PASSWORD : example (or see .env-db)

Postgrest

Modification from EmerMaps

  1. generate the json web token, with this tutorial :
  1. add .postgrest file
PGRST_DB_URI=postgres://test:example@db:5432/dataset
PGRST_DB_ANON_ROLE=api_anon
PGRST_JWT_SECRET=4yHaZ1QtEKmgpR7E295RSs6CdiWyWyjn48DXr3tcLAMawDew5MiFJJLMdDwbc6fi
  1. Test with simple request
import requests
API_KEY = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlIjoiYXBpX3VzZXIifQ.II34IQz5jIqOnOoAKM7ou9eg8zOxnQqjHhJx0eshfY4"
r = requests.get(
    'http://localhost:3000/datasets',
     headers={'Authorization': 'Bearer {}'.format(API_KEY)}
)
print(r.url)
response = r.json()
print(response)

About

EnerMaps provides FAIR energy data with a visualization tool. The EnerMaps project has received funding from the European Union’s Horizon 2020 research and innovation program under grant agreement N°884161.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 89.9%
  • Svelte 5.0%
  • JavaScript 2.5%
  • PLpgSQL 1.3%
  • Dockerfile 0.9%
  • Shell 0.3%
  • Other 0.1%