Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alvaropaco/py-weather-micro-service
https://github.com/alvaropaco/py-weather-micro-service
docker fault-tolerant microservice nameko python rabbitmq
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/alvaropaco/py-weather-micro-service
- Owner: alvaropaco
- Created: 2018-12-27T15:36:52.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-01-08T18:22:28.000Z (about 6 years ago)
- Last Synced: 2023-08-03T23:11:28.784Z (over 1 year ago)
- Topics: docker, fault-tolerant, microservice, nameko, python, rabbitmq
- Language: Python
- Size: 12.7 KB
- Stars: 33
- Watchers: 2
- Forks: 9
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Playlists from Weather [![CircleCI](https://circleci.com/gh/alvaropaco/py-weather-micro-service.svg?style=svg)](https://circleci.com/gh/alvaropaco/py-weather-micro-service) [![Maintainability](https://api.codeclimate.com/v1/badges/3fc099559a53bc7800d0/maintainability)](https://codeclimate.com/github/alvaropaco/py-weather-micro-service/maintainability)
Tha main goal of this project is retreive a list of Spotify playlist based on current Weather. The Weather is retreived from the Open Weather Map service and filtered by *City* name or *geolocation* coordinates.
### Requeriments
* Docker I/O
### Building
Firstly we need to build the docker image:
`docker build -t ifood .`
### Running
Run command will push up the micro-service:
`docker run -it -v $(pwd):/app -p 5000:5000 ifood ./entrypoint.sh`
### Usage
Simple http call to the service URL:
`curl -X GET 127.0.0.1:5000/playlists?city=new+york -H "X-SPOTIFY-TOKEN: " -H"X-OPENWM-APPID: 504002e265ed827f841600d3259c32ee"`
### Testing
Can run the API tests:
`docker run -it -v $(pwd):/app -p 5000:5000 ifood ./entrypoint.tests.sh`