https://github.com/othercodes/technical-assessment-weather-console-python
A console-based weather viewer satisfying the scenarios required for a technical assessment in python.
https://github.com/othercodes/technical-assessment-weather-console-python
assessment console python weather
Last synced: 8 months ago
JSON representation
A console-based weather viewer satisfying the scenarios required for a technical assessment in python.
- Host: GitHub
- URL: https://github.com/othercodes/technical-assessment-weather-console-python
- Owner: othercodes
- License: apache-2.0
- Created: 2022-01-31T15:47:34.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-03-23T08:30:47.000Z (about 4 years ago)
- Last Synced: 2025-03-17T21:56:07.590Z (over 1 year ago)
- Topics: assessment, console, python, weather
- Language: Python
- Homepage:
- Size: 20.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Technical Assessment - Weather Console
Implement a console-based weather viewer satisfying the scenarios below.
## Installation
Just clone the repository and install the dependencies using [Poetry](https://python-poetry.org/):
```bash
git clone https://github.com/othercodes/technical-assessment-weather-console
cd technical-assessment-weather-console
poetry install
# this will create a virtual env for the app
cp example.env .env
# copy the example.env as .env and set the required credentials
# finally run the application :D
poetry run python myweatherapp.py
```
## Scenarios
**Get the current weather data for the given location.**
Arguments:
* Location, in "`{city},{country code}`" format.
Options:
* --units: Units of measurement must be `metric` or `imperial`, `metric` by default.
Example:
```bash
$ myweatherapp current Irvine,US --units=imperial
IRVINE (US)
Jan 31, 2022
> Weather: Clear sky.
> Temperature: 48.72 ºF
```
**Get the weather forecast for max 5 days for the given location.**
Arguments:
* Location, in "`{city},{country code}`" format.
Options:
* --days: The number of days to retrieve forecast data for, `1` by default.
* --units: Units of measurement must be `metric` or `imperial`, `metric` by default.
Example:
```bash
$ myweatherapp forecast Santander,ES --days=3
SANTANDER (ES)
Feb 01, 2022
> Weather: Clouds.
> Temperature: 11.1 ºC
Feb 02, 2022
> Weather: Broken clouds.
> Temperature: 14 ºC
Feb 03, 2022
> Weather: Sunny.
> Temperature: 16 ºC
```
## Details
* Use the language you feel more comfortable.
* The application must use the console for input and output.
* The application must have a small help message (just as normal console commands).
* You can name your application as you wish (in the examples above is "myweatherapp").
* You must use at least one of the following APIs to get the weather data (registration and usage is free).
* https://developer.accuweather.com/apis
* https://openweathermap.org/api
* Please follow best practices on storing your API Keys.
* Add instructions about how to run the application.
## What we are looking for:
* Don't use any framework, we want to see you code.
* Pay attention about how your code is organized.
* How you are reflecting the domain in the code.
* We love clean code.
* We love tests, 95% of coverage will be appreciated but not required.
* Logging support will be appreciated but not required.