refactor main.py click to use click commands to allow passing parameters to commands and enable fetching districts by district name

This commit is contained in:
Viktor Barzin 2025-05-14 19:41:13 +00:00
parent bb2488a63b
commit ea56555884
3 changed files with 73 additions and 38 deletions

View file

@ -1,36 +1,37 @@
def get_districts():
return {
# "Barking and Dagenham": "REGION^61400",
# "Barnet": "REGION^93929",
# "Bexley": "REGION^93932",
# "Brent": "REGION^93935",
# "Bromley": "REGION^93938",
"Barking and Dagenham": "REGION^61400",
"Barnet": "REGION^93929",
"Bexley": "REGION^93932",
"Brent": "REGION^93935",
"Bromley": "REGION^93938",
"Camden": "REGION^93941",
"City of London": "REGION^61224",
# "Croydon": "REGION^93944",
# "Ealing": "REGION^93947",
# "Enfield": "REGION^93950",
# "Greenwich": "REGION^61226",
"Croydon": "REGION^93944",
"Ealing": "REGION^93947",
"Enfield": "REGION^93950",
"Greenwich": "REGION^61226",
"Hackney": "REGION^93953",
"Hammersmith and Fulham": "REGION^61407",
# "Haringey": "REGION^61227",
# "Harrow": "REGION^93956",
# "Havering": "REGION^61228",
# "Hillingdon": "REGION^93959",
# "Hounslow": "REGION^93962",
"Haringey": "REGION^61227",
"Harrow": "REGION^93956",
"Havering": "REGION^61228",
"Hillingdon": "REGION^93959",
"Hounslow": "REGION^93962",
"Islington": "REGION^93965",
"London": "REGION^87490",
"Kensington and Chelsea": "REGION^61229",
# "Kingston upon Thames": "REGION^93968",
# "Lambeth": "REGION^93971",
# "Lewisham": "REGION^61413",
# "Merton": "REGION^61414",
# "Newham": "REGION^61231",
# "Redbridge": "REGION^61537",
# "Richmond upon Thames": "REGION^61415",
# "Southwark": "REGION^61518",
# "Sutton": "REGION^93974",
"Kingston upon Thames": "REGION^93968",
"Lambeth": "REGION^93971",
"Lewisham": "REGION^61413",
"Merton": "REGION^61414",
"Newham": "REGION^61231",
"Redbridge": "REGION^61537",
"Richmond upon Thames": "REGION^61415",
"Southwark": "REGION^61518",
"Sutton": "REGION^93974",
"Tower Hamlets": "REGION^61417",
# "Waltham Forest": "REGION^61232",
# "Wandsworth": "REGION^93977",
"Waltham Forest": "REGION^61232",
"Wandsworth": "REGION^93977",
"Westminster": "REGION^93980",
}