From d68b6a4012213fd5252410955d2c60f454d454ab Mon Sep 17 00:00:00 2001 From: suvanbanerjee Date: Tue, 9 Apr 2024 22:33:25 +0530 Subject: [PATCH] added docs in readme --- README.md | 65 ++----------------------------------------------------- setup.py | 2 +- 2 files changed, 3 insertions(+), 64 deletions(-) diff --git a/README.md b/README.md index 46516ae..da41f1d 100644 --- a/README.md +++ b/README.md @@ -36,69 +36,8 @@ Install the package using the following command: pip install dist/*.whl ``` -## Usage -### Current Weather -Sample usage providing city name -```python -import weatherkit -NYC = weatherkit.current_weather('New York') -print(NYC.temperature()) -# Output: 20.0 -print(NYC.temperature(units='imperial')) -# Output: 68.0 -print(NYC.humidity()) -# Output: 50 -print(NYC.weather_code()) -# Output: 3 -print(NYC.precipitation()) -# Output: 0.0 -``` -Sample usage providing latitude and longitude - -```python -import weatherkit -NYC = weatherkit.current_weather(40.7128, -74.0060) -print(NYC.temperature()) -# Output: 20.0 -print(NYC.temperature(units='imperial')) -# Output: 68.0 -print(NYC.humidity()) -# Output: 50 -print(NYC.weather_code()) -# Output: 3 -print(NYC.precipitation()) -# Output: 0.0 -``` -### Daily Forecast -Sample usage providing city name -```python -import weatherkit -NYC = weatherkit.daily_forecast('New York') -print(NYC.max_temperature()) -# Output: 20.0 -print(NYC.max_temperature(units='imperial')) -# Output: 68.0 -print(NYC.min_temperature()) -# Output: 10.0 -print(NYC.max_temperature(day_offset=3)) -# Output: 20.0 -print(NYC.max_temperature(day_offset=3, units='imperial')) -# Output: 68.0 -print(NYC.prediction_sum()) -# Output: 0.0 -print(NYC.prediction_sum(day_offset=3)) -# Output: 3.2 -print(NYC.prediction_sum(units='imperial')) -# Output: 0.0 (in Inches) -print(NYC.weather_code()) -# Output: 3 -print(NYC.weather_code(day_offset=3)) -# Output: 3 -``` -#### Note -- Similar to current weather, daily forecast can also be used by providing latitude and longitude. - -- day_offset is the number of days from today for which the forecast is required. day_offset=0 (which is default) will give the forecast for today, day_offset=1 will give the forecast for tomorrow and so on. +## Documentation +Documentation is available at [WeatherKit Documentation](https://suvanbanerjee.github.io/WeatherKit/) ## Contributing Contributions are welcome, and they are greatly appreciated! just fork the repository, make changes and create a pull request. diff --git a/setup.py b/setup.py index 960f434..9822011 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ with codecs.open(os.path.join(here, "README.md"), encoding="utf-8") as fh: long_description = "\n" + fh.read() -VERSION = '1.1.0' +VERSION = '1.1.1' DESCRIPTION = 'Get weather details of any city or latitude and longitude of the location. without an API key.' setup(