Adds metro stations (cities and lines too) from HH api to local database
- load sql (create tables) from
init.sql
psql -h localhost -d database_name -U username -f init.sql
- install requirements:
pip install -r requirements.txt
{
"id":"2",
"name":"Санкт-Петербург",
"url":"https://api.hh.ru/metro/2",
"lines":[
{
"id":"14",
"hex_color":"D6083B",
"name":"Кировско-Выборгская",
"stations":[
{
"id":"14.190",
"name":"Девяткино",
"lat":60.050182,
"lng":30.443045,
"order":0
}
]
}
]
}
Total cities added: 2
Total metro lines added: 24
Total metro stations added: 357