accuweather-client


Nameaccuweather-client JSON
Version 1.0.0 PyPI version JSON
download
home_pageNone
SummaryThe goal of this project is to create a user-friendly api client for AccuWeather api.
upload_time2024-09-19 18:21:12
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
licenseMIT
keywords accuweather api weather client python pydantic
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # AccuWeather
A python library to interact with the accuweather api.

## General information
The functionality that makes this package unique is the integration of the
location client within the weather client. Specifying location by city name
(and country optionally) is a more user-friendly way to interact with the api.

## Before you start
You need to create an api token on the AccuWeather website
(https://developer.accuweather.com).

## How to use the package
```python
""""Some code to show the functionality of the package"""

from accuweather_client.clients import WeatherClient
from constants import API_KEY

# Create an instance of the WeatherClient class, a regular search
weather = WeatherClient(token=API_KEY, city="sydney")
# Provides information about the location
weather.location

# In the example above, the selected location is Sydney, Australia
# If you like to select Sydney in Canada, you can refine your search with
# the addition of the country parameter
weather = WeatherClient(token=API_KEY, city="sydney", country="canada")
weather.location

# Create an instance of the WeatherClient class, POI search
weather = WeatherClient(token=API_KEY, poi="Eiffel tower")
weather.location

# Create an instance of the WeatherClient class, lat lon search
weather = WeatherClient(token=API_KEY, lat=51.988, lon=-4.88)
weather.location

# Creates an object that yields forecast information
forecast = weather.get_5day_forecast()
# Prints the forecast for tomorrow
forecast.forecast_tomorrow
# Returns a pandas df with forecast information
forecast_df = forecast.to_pandas_df()

# Creates an object that yields hourly forcast information
forecast_hourly = weather.get_hourly_forecast_12h()

# Creates an object that yiels information about the current conditions
conditions = weather.get_current_conditions()
# Prints the current conditions
conditions.current_conditions

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "accuweather-client",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "AccuWeather, API, weather, client, python, pydantic",
    "author": null,
    "author_email": "Thomas <thomas.development1942@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/e4/fc/b8d143f5ebdf4fa4d4542a0a0f3b79524e269fe3088bc2b3f024ff16cdc3/accuweather_client-1.0.0.tar.gz",
    "platform": null,
    "description": "# AccuWeather\r\nA python library to interact with the accuweather api.\r\n\r\n## General information\r\nThe functionality that makes this package unique is the integration of the\r\nlocation client within the weather client. Specifying location by city name\r\n(and country optionally) is a more user-friendly way to interact with the api.\r\n\r\n## Before you start\r\nYou need to create an api token on the AccuWeather website\r\n(https://developer.accuweather.com).\r\n\r\n## How to use the package\r\n```python\r\n\"\"\"\"Some code to show the functionality of the package\"\"\"\r\n\r\nfrom accuweather_client.clients import WeatherClient\r\nfrom constants import API_KEY\r\n\r\n# Create an instance of the WeatherClient class, a regular search\r\nweather = WeatherClient(token=API_KEY, city=\"sydney\")\r\n# Provides information about the location\r\nweather.location\r\n\r\n# In the example above, the selected location is Sydney, Australia\r\n# If you like to select Sydney in Canada, you can refine your search with\r\n# the addition of the country parameter\r\nweather = WeatherClient(token=API_KEY, city=\"sydney\", country=\"canada\")\r\nweather.location\r\n\r\n# Create an instance of the WeatherClient class, POI search\r\nweather = WeatherClient(token=API_KEY, poi=\"Eiffel tower\")\r\nweather.location\r\n\r\n# Create an instance of the WeatherClient class, lat lon search\r\nweather = WeatherClient(token=API_KEY, lat=51.988, lon=-4.88)\r\nweather.location\r\n\r\n# Creates an object that yields forecast information\r\nforecast = weather.get_5day_forecast()\r\n# Prints the forecast for tomorrow\r\nforecast.forecast_tomorrow\r\n# Returns a pandas df with forecast information\r\nforecast_df = forecast.to_pandas_df()\r\n\r\n# Creates an object that yields hourly forcast information\r\nforecast_hourly = weather.get_hourly_forecast_12h()\r\n\r\n# Creates an object that yiels information about the current conditions\r\nconditions = weather.get_current_conditions()\r\n# Prints the current conditions\r\nconditions.current_conditions\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "The goal of this project is to create a user-friendly api client for AccuWeather api.",
    "version": "1.0.0",
    "project_urls": {
        "repository": "https://github.com/Thomas1942/AccuWeather"
    },
    "split_keywords": [
        "accuweather",
        " api",
        " weather",
        " client",
        " python",
        " pydantic"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0fb2e1ef79d67bdfd23b8d5955883ece7bfbf7772b7c13c7b4c3d4bad715583e",
                "md5": "b0e4771d463163ab92e062130bbdeefa",
                "sha256": "b3b49c6c1c5b8d44158239b3337e46ad255a51bbce86f8793ab26555ff5ba76e"
            },
            "downloads": -1,
            "filename": "accuweather_client-1.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b0e4771d463163ab92e062130bbdeefa",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 10962,
            "upload_time": "2024-09-19T18:21:11",
            "upload_time_iso_8601": "2024-09-19T18:21:11.580556Z",
            "url": "https://files.pythonhosted.org/packages/0f/b2/e1ef79d67bdfd23b8d5955883ece7bfbf7772b7c13c7b4c3d4bad715583e/accuweather_client-1.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e4fcb8d143f5ebdf4fa4d4542a0a0f3b79524e269fe3088bc2b3f024ff16cdc3",
                "md5": "3316e79ea1a4b9923880db8ba9ed5385",
                "sha256": "5680c8e74241d2e2f9c74a92636ccefef717314459fe550c1c6cba4a1c9bbe4e"
            },
            "downloads": -1,
            "filename": "accuweather_client-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "3316e79ea1a4b9923880db8ba9ed5385",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 9982,
            "upload_time": "2024-09-19T18:21:12",
            "upload_time_iso_8601": "2024-09-19T18:21:12.959585Z",
            "url": "https://files.pythonhosted.org/packages/e4/fc/b8d143f5ebdf4fa4d4542a0a0f3b79524e269fe3088bc2b3f024ff16cdc3/accuweather_client-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-19 18:21:12",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Thomas1942",
    "github_project": "AccuWeather",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "accuweather-client"
}
        
Elapsed time: 0.72047s