Skip to content

smittytone/OpenWeather-Python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenWeather-Python 2.1.0

The class this integration contains allows you to make calls to OpenWeather’s One Call API 1.0.

Access to the API is controlled by key. You will need to register for developer access to obtain your key.

Note This class does not parse the incoming data, which is highly complex. It is up to your application to extract the data you require.

Python Requests

The library uses the Python Requests module or equivalent to issue HTTP requests to the API and process the responses. Your code will need to import Requests and pass an instance into the library’s constructor.

The library does not import requests itself in order to support different species of Python, such as MicroPython and CircuitPython which have different implementations of Requests. For instance:

# MicroPython example
import urequests as requests

ow = OpenWeather(requests, secrets["apikey"], True
# CircuitPython example
import adafruit_requests as requests

ow = OpenWeather(requests, secrets["apikey"], False)

The library uses Requestsget() method, and works with Response instances created by requests.

Documentation

You can find full library documentation at smittytone.net.

Copyright and licence

OpenWeather-Python is © 2022 by Tony Smith and is licensed under the terms of the MIT licence.

The OpenWeather One Call API is © 2012—2022, OpenWeather.

About

Python integration for the OpenWeather API.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages