weatherkit


Nameweatherkit JSON
Version 1.1.0 PyPI version JSON
download
home_pagehttps://github.com/suvanbanerjee/weatherkit
SummaryGet weather details of any city or latitude and longitude of the location. without an API key.
upload_time2024-03-29 11:26:41
maintainerNone
docs_urlNone
authorSuvan Banerjee
requires_python>=3.5
licenseNone
keywords python weather weatherkit openweatherapi
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
# WeatherKit ☀️
## What is It?
WeatherKit is a python pacakge that provides a simple interface to get weather data without any API key or any other credentials. It is a simple and easy to use package that provides the current weather data of any location in the world. It can get weather details from address, city, country, or latitude and longitude of the location.

Currently it Provies the following weather details for current time and forecast for 7 days:
- Temperature ☀️
- Humidity 💧
- Wind Speed 💨
- Weather Code ⛅️
- Precipitation ☔️

## Where to get it?

The easy way to get WeatherKit is from pip:

```bash
pip install weatherkit
```

## Dependencies
[geopy](https://pypi.org/project/geopy/) - For getting latitude and longitude of the location if the location is given in address or city format.

## Installing from source
Download the source code by cloning the repository or by clicking [here](https://github.com/suvanbanerjee/weatherkit/archive/refs/heads/main.zip)

```
git clone https://github.com/suvanbanerjee/weatherkit.git
cd weatherkit
```
Build the package using the following command:
```
python setup.py sdist bdist_wheel
```
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.

## Contributing
Contributions are welcome, and they are greatly appreciated! just fork the repository, make changes and create a pull request.

## License
WeatherKit is distributed under the MIT License. See the [LICENSE](https://github.com/suvanbanerjee/weatherkit/blob/main/LICENSE) file for more information.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/suvanbanerjee/weatherkit",
    "name": "weatherkit",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.5",
    "maintainer_email": null,
    "keywords": "python, weather, weatherkit, openweatherapi",
    "author": "Suvan Banerjee",
    "author_email": "<banerjeesuvan@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/90/36/09f3c7d0082638b6ba9db14c86ca0483b701fd6ca1794940f54a2adf4e4c/weatherkit-1.1.0.tar.gz",
    "platform": null,
    "description": "\n# WeatherKit \u2600\ufe0f\n## What is It?\nWeatherKit is a python pacakge that provides a simple interface to get weather data without any API key or any other credentials. It is a simple and easy to use package that provides the current weather data of any location in the world. It can get weather details from address, city, country, or latitude and longitude of the location.\n\nCurrently it Provies the following weather details for current time and forecast for 7 days:\n- Temperature \u2600\ufe0f\n- Humidity \ud83d\udca7\n- Wind Speed \ud83d\udca8\n- Weather Code \u26c5\ufe0f\n- Precipitation \u2614\ufe0f\n\n## Where to get it?\n\nThe easy way to get WeatherKit is from pip:\n\n```bash\npip install weatherkit\n```\n\n## Dependencies\n[geopy](https://pypi.org/project/geopy/) - For getting latitude and longitude of the location if the location is given in address or city format.\n\n## Installing from source\nDownload the source code by cloning the repository or by clicking [here](https://github.com/suvanbanerjee/weatherkit/archive/refs/heads/main.zip)\n\n```\ngit clone https://github.com/suvanbanerjee/weatherkit.git\ncd weatherkit\n```\nBuild the package using the following command:\n```\npython setup.py sdist bdist_wheel\n```\nInstall the package using the following command:\n```\npip install dist/*.whl\n```\n\n## Usage\n### Current Weather\nSample usage providing city name\n```python\nimport weatherkit\nNYC = weatherkit.current_weather('New York')\nprint(NYC.temperature())\n# Output: 20.0\nprint(NYC.temperature(units='imperial'))\n# Output: 68.0\nprint(NYC.humidity())\n# Output: 50\nprint(NYC.weather_code())\n# Output: 3\nprint(NYC.precipitation())\n# Output: 0.0\n```\nSample usage providing latitude and longitude\n\n```python\nimport weatherkit\nNYC = weatherkit.current_weather(40.7128, -74.0060)\nprint(NYC.temperature())\n# Output: 20.0\nprint(NYC.temperature(units='imperial'))\n# Output: 68.0\nprint(NYC.humidity())\n# Output: 50\nprint(NYC.weather_code())\n# Output: 3\nprint(NYC.precipitation())\n# Output: 0.0\n```\n### Daily Forecast\nSample usage providing city name\n```python\nimport weatherkit\nNYC = weatherkit.daily_forecast('New York')\nprint(NYC.max_temperature())\n# Output: 20.0\nprint(NYC.max_temperature(units='imperial'))\n# Output: 68.0\nprint(NYC.min_temperature())\n# Output: 10.0\nprint(NYC.max_temperature(day_offset=3))\n# Output: 20.0\nprint(NYC.max_temperature(day_offset=3, units='imperial'))\n# Output: 68.0\nprint(NYC.prediction_sum())\n# Output: 0.0\nprint(NYC.prediction_sum(day_offset=3))\n# Output: 3.2\nprint(NYC.prediction_sum(units='imperial'))\n# Output: 0.0 (in Inches)\nprint(NYC.weather_code())\n# Output: 3\nprint(NYC.weather_code(day_offset=3))\n# Output: 3\n```\n#### Note \n- Similar to current weather, daily forecast can also be used by providing latitude and longitude.\n\n- 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.\n\n## Contributing\nContributions are welcome, and they are greatly appreciated! just fork the repository, make changes and create a pull request.\n\n## License\nWeatherKit is distributed under the MIT License. See the [LICENSE](https://github.com/suvanbanerjee/weatherkit/blob/main/LICENSE) file for more information.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Get weather details of any city or latitude and longitude of the location. without an API key.",
    "version": "1.1.0",
    "project_urls": {
        "Homepage": "https://github.com/suvanbanerjee/weatherkit"
    },
    "split_keywords": [
        "python",
        " weather",
        " weatherkit",
        " openweatherapi"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "60d772d862bbdc2cceb53340c2f374aa27d4b257925dbe729f63c2903350f58f",
                "md5": "eea44b7fa1f773be4a29ceebd0927e36",
                "sha256": "18b2f015d7e25c6f66f99fbdf531c4e0468cff77e2e0d39c3a52b068264401dc"
            },
            "downloads": -1,
            "filename": "weatherkit-1.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "eea44b7fa1f773be4a29ceebd0927e36",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.5",
            "size": 8230,
            "upload_time": "2024-03-29T11:26:40",
            "upload_time_iso_8601": "2024-03-29T11:26:40.804070Z",
            "url": "https://files.pythonhosted.org/packages/60/d7/72d862bbdc2cceb53340c2f374aa27d4b257925dbe729f63c2903350f58f/weatherkit-1.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "903609f3c7d0082638b6ba9db14c86ca0483b701fd6ca1794940f54a2adf4e4c",
                "md5": "fd893633611c11126221cb398d68fb29",
                "sha256": "59477ee38cae2a00b524af385365405b0b5d6c380ed6ad698ea7159cad1799d6"
            },
            "downloads": -1,
            "filename": "weatherkit-1.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "fd893633611c11126221cb398d68fb29",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.5",
            "size": 6252,
            "upload_time": "2024-03-29T11:26:41",
            "upload_time_iso_8601": "2024-03-29T11:26:41.789523Z",
            "url": "https://files.pythonhosted.org/packages/90/36/09f3c7d0082638b6ba9db14c86ca0483b701fd6ca1794940f54a2adf4e4c/weatherkit-1.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-29 11:26:41",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "suvanbanerjee",
    "github_project": "weatherkit",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "weatherkit"
}
        
Elapsed time: 0.22717s