Skip to main content

Get the forecast from the norwegian wheather service yr.no in python

Project description

python-yr
=================
Library for the norwegian wheather service yr.no in python.

#### Usage
```python
from yr.libyr import Yr

weather = Yr(location_name='Norge/Telemark/Skien/Skien')
now = weather.now(as_json=True)

print(now)
```

#### This returns
```json
{
"@from": "2014-06-04T08:00:00",
"@to": "2014-06-04T12:00:00",
"@period": "1",
"symbol": {
"@number": "3",
"@numberEx": "3",
"@name": "Partly cloudy",
"@var": "03d"
},
"precipitation": {
"@value": "0",
"@minvalue": "0",
"@maxvalue": "0.1"
},
"windDirection": {
"@deg": "159.4",
"@code": "SSE",
"@name": "South-southeast"
},
"windSpeed": {
"@mps": "1.3",
"@name": "Light air"
},
"temperature": {
"@unit": "celsius",
"@value": "13"
},
"pressure": {
"@unit": "hPa",
"@value": "1012.1"
}
}
```

For more usage examples visit folder [examples](/yr/examples) or project [wiki](https://github.com/wckd/python-yr/wiki)

Pull requests are very welcomed! :-)

#### Changelog

1.4.0 (2014 Sep 12)

* Add support for yr.no api service ~> thanks to lucadelu
* Add hourly forecast ~> thanks to antorweep1987

1.3.2 (2014 Jul 11)

* Improved exception-handling, thanks @mbambas!

1.3.1.1 (2014 Jul 10)

* Bugfix: pypi/pip installer in 'setup.py'

1.3.1 (2014 Jul 10)

* Bugfix: caching mechanism in 'is_fresh' function ~> thanks to antorweep
* Improve examples

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python-yr-1.4.0.tar.gz (5.0 kB view details)

Uploaded Source

File details

Details for the file python-yr-1.4.0.tar.gz.

File metadata

  • Download URL: python-yr-1.4.0.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for python-yr-1.4.0.tar.gz
Algorithm Hash digest
SHA256 146471905b288b4619799fbf292dbaee4cecc39a8f9f417227a3d2b5792b2b62
MD5 288814ba058df7dff5328ef6024b3f2a
BLAKE2b-256 3811a71acd11553a05cc108840616330f0dad0c3f2232288255acdeb0667cea6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page