Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/beyondopen/geocode-cache-service
Flask app to geocode & cache
https://github.com/beyondopen/geocode-cache-service
Last synced: 5 days ago
JSON representation
Flask app to geocode & cache
- Host: GitHub
- URL: https://github.com/beyondopen/geocode-cache-service
- Owner: beyondopen
- License: mit
- Created: 2020-03-17T22:41:00.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-07-25T18:34:18.000Z (over 1 year ago)
- Last Synced: 2024-08-02T12:44:36.910Z (3 months ago)
- Language: Python
- Homepage: https://geocode.app.vis.one
- Size: 78.1 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-starred - beyondopen/geocode-cache-service - Flask app to geocode & cache (others)
README
# cache-geocode-service
Flask app to geocode locations and cache the results.
Using .
https://developer.here.com/documentation/geocoding-search-api/api-reference-swagger.html
```bash
curl -u username:password https://geocode.app.vis.one/\?city=Berlin\&provider\=here\&country\=Deutschland\&state\=Berlin
```## API
Two endpoints:
### GET
```
GET https://geocode.app.vis.one/?provider=here&city=Haldensleben&county=B%C3%B6rde&state=Sachsen-Anhalt&country=Deutschland
```Returns 400 if no location was found.
### POST
```
POST https://geocode.app.vis.one/
```with data in body:
```json
{
"provider": "here",
"locations": [
{
"query": {
"city": "Haldensleben",
"county": "Börde",
"state": "Sachsen-Anhalt",
"country": "Deutschland"
}
}
]
}
```NB: Returns 200 even if no location wasn't found (for one item). Iterate over the responding array to verify if matching geo coords were found.
## Development
Create `keys.txt` and store a HERE API key in it.
```bash
docker-compose up
```## Deployment
Deploy with Dokku.
```bash
sudo dokku run geocode flask resetdb
```## License
MIT