WeatherLoc
What is WeatherLoc
WeatherLoc is a Pythonic API for weather and geolocation, powered by WeatherAPI
Installation
WeatherLoc is available on PyPI and can be installed via:
pip install weatherloc
Usage
This package is designed to be as easy as possible to use. Simply create a client object using your API Key as shown below and all commands are available as methods under the newly created client object
import weatherloc
#create a PyWeather client using your API key from www.weatherapi.com
client = weatherloc.Client("YOUR_KEY_HERE")
weather = client.current("London") # checks and returns current weather
print(weather.condition) # print current weather condition
print(weather.feelslike_c) # print feelslike in celsius
# Check the location using an IP address
my_ip = client.ip_lookup("209.142.68.29")
print(my_ip.country_name)
Features
- Get current weather condition
- Future weather predictions upto 300 days from present
- Forecast for days and hours separetely
- Search location by IP address, longitude and latitude, City/Country name, as well as Zip codes and Postcodes
- IP lookup
- Timezone search, get the timezone information for any region
- Astronomical data including sunrise/sunset and moonrise/moonset time, moon phases, and illumination
- Air quality data based on atmospheric gas concentrations and US Gebra and Uk Defra indexes
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
License
MIT
Metadata
Release files for WeatherLoc 1.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| WeatherLoc-1.0.3.tar.gz | 10.4 kB | Without provenance | Details for WeatherLoc-1.0.3.tar.gz |
Release files / WeatherLoc-1.0.3.tar.gz
| Download URL | WeatherLoc-1.0.3.tar.gz |
|---|---|
| Size | 10.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7707f11888e39089d1893104bf5df7fb37e18b2efb925940d262d565c2fbb4e0
|
|
BLAKE2b-256 checksum How to use checksums |
226e411f8e1af08985494ed469d505726d2cbf15d241968d093320b99b9e484c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.6
|
Security for WeatherLoc 1.0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.