A small weather package using Open-Meteo
Project description
PyOMWeather
A python module to fetch weather data from Open-Meteo
Installation
PyOMWeather
is available on PyPi :
Install the package using pip:
pip install PyOmWeather
Usage
PyOMWeather
is meant to be used in your own Python programs. The PyOMWeather.weather
module contains a class called Weather that contains functions that can access data from OpenMeteo's API for your Python programs. To do this, you can import Weather
and create a weather instance.
from PyOMWeather.weather import Weather
weather_instance = Weather()
The weather class contains four methods that can access different data from OpenMeteo's API
get_temperature(location_string)
Retrieves the hourly temperature data.
Arguments:
location_string
: A string representing the location.
Returns:
- A pandas DataFrame with two columns: 'date' and 'values' for temperatures.
get_apparent_temperature(location_string)
Retrieves the hourly apparent temperature data.
Arguments:
location_string
: A string representing the location.
Returns:
- A pandas DataFrame with hourly apparent temperature data.
get_relative_humidity(location_string)
Retrieves the hourly relative humidity data.
Arguments:
location_string
: A string representing the location.
Returns:
- A pandas DataFrame with hourly relative humidity data.
get_rain_probability(location_string)
Retrieves the hourly rain probability data.
Arguments:
location_string
: A string representing the location.
Returns:
- A pandas DataFrame with hourly precipitation probability data.
An example Python program that uses each of the functions and prints the fetched data is provided here
Contributing
If you want to contribute to PyOMWeather
, follow these steps to set up your development environment:
- Fork the Project: Create your own fork of the project to work on. This will allow you to make changes to your own copy of the project.
- Clone your fork: Clone your fork to your local machine.
git clone https://github.com/your-username/3-python-package-exercise-team1-pt3.git
cd 3-python-package-exercise-team1-pt3
- Set up your Virtual Environment: It's recommended to use a virtual environment to keep dependencies required by different projects separate. Create a virtual environment by running:
python -m venv venv
Activate the virtual environment: On Windows:
.\venv\Scripts\activate
On MacOS/Linux:
source venv/bin/activate
- Install Dependencies: Install all required dependencies using the
requirements.txt
file
pip install -r requirements.txt
- Make Your Changes: Make your changes to the codebase. Be sure to write or update tests as appropriate.
- Run the Tests: Before submitting your changes, make sure all tests pass:
pytest
- Submit a Pull Request : Once you've made your changes, tested everything, and are happy with the result, push your changes to your fork and submit a pull request to the main repository. Don't forget to update the documentation if needed. Thank you for your contributions!
Authors
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file PyOMWeather-0.1.0.tar.gz
.
File metadata
- Download URL: PyOMWeather-0.1.0.tar.gz
- Upload date:
- Size: 16.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4ceddc3e322b5c6081f3d1afc6212ec0303df46b39c05730e9db2b3ba78a12a3 |
|
MD5 | ffdfcc7f9b876410c9a0dafd41fe0295 |
|
BLAKE2b-256 | b3750bbc74a7718d9508d6322563973688837897b96764bbd60f6ba3d930ce3e |
File details
Details for the file PyOMWeather-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: PyOMWeather-0.1.0-py3-none-any.whl
- Upload date:
- Size: 16.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 74d6660670d2ad28e80d3ce45b0f7fae519fa609a339d33e45daf5cb34d6db46 |
|
MD5 | 70907be8ec21c4c2f2429da27572ca04 |
|
BLAKE2b-256 | 751636b9a175d1ede84bdf268e05918974d8276a9cb7940beba244b9d61f1187 |