Skip to content
Weather resource for Concourse (Yahoo weather)
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Weather Resource

Powered by YahooBuild Status

Implements a resource that reports when the weather changes. The resource can detect new forecasts, or just when the current weather has changed.

This resource is powered by Yahoo! Weather

Source Configuration

  • city: The city used for the weather forecast. Valid values will look like Paris, France or boulder, co. To check whether your city will be recognized by Yahoo, use their YQL API, and try the following request in their online console:
select * from geo.places where text="YOUR CITY NAME"
  • weather_change_only: Optional. Default false. wether the resource should create new versions only when the weather changes, as opposed to when a new forecast is released.


check: Produce current weather conditions.

Returns current weather.

in: Report the given weather.

Fetches the current weather, writing the value in two separate files in the destination:

  • weather.txt: Short message describing the weather, e.g. "Mostly Cloudy"
  • weather.json: JSON object, containing the weather as described above, as well as the date of the forecast:
    "weather": "Scattered Snow Showers",
    "date": "Wed, 23 May 2018 02:34 PM CEST"



out: Produce the current weather.

Just don't.


- name: weather
  type: docker-image
    repository: kehrlann/weather-resource

- name: budapest-weather
  type: weather
    city: Budapest, HU
    weather_change_only: true

- name: something-when-the-weather-changes
  - get: budapest-weather
    trigger: true
  - task: look-out-the-window
    config: # ...



  • python is required - version 3.6.x is tested.
  • docker is required - version 18.03.x is tested; earlier versions may work.
  • pip is used for dependency management - just installing requests
  • virtualenv is heavily encouraged, but not mandatory.

Bootstraping / creating your environment

There is a bootstrap script that will create a venv and install requests. To run it, just:


If you do not wish to use a virtualenv, a standard pip install should do:

pip3 install requests

Running the tests locally

The tests are in the test module, under src. To run them, simply:

cd src
python -m unittest

If you are using a virtualenv as described above, you can also use a script to watch your files and re-run the tests when changes are detected:


Running the tests on build

The tests have been embedded with the Dockerfile; ensuring that the testing environment is consistent across any docker enabled platform. When the docker image builds, the test are run inside the docker container, on failure they will stop the build.

Run the tests with the following command:

docker build -t weather-resource .


Please make all pull requests to the master branch and ensure tests pass locally.

You can’t perform that action at this time.