owm2json package
Owm2json is a Python library for combining multiple OpenWeatherMap API calls into one.
Installation
Use the package manager pip to install owm2json.
pip install owm2json
Usage
import owm2json
apinames = ["air_pollution", "roadrisk"]
myOWM = owm2json.owmRequestor(apinames, latitude, longitude, appid)
print(myOWM.GetData())
Explanation
apinames: a list of APIs to call. The full list can be seen on the official OpenWeatherMap web site.
latitude, longitude: coordinates of the desired location.
appid: API key to use with the service. You can obtain yours at OpenWeatherMap
If the call is successful, owm2json returns a string that contains a concatenated version of all the API calls that were requested. It also contains version information about itself.
Sample response from owm2json:
{
"module": {
"version": "0.1.86"
},
"air_pollution": {
"coord": {
"lon": 12.34,
"lat": 12.34
},
"list": [{
"main": {
"aqi": 2
},
"components": {
"co": 216.96,
"no": 0.36,
"no2": 2.49,
"o3": 98.71,
"so2": 5.19,
"pm2_5": 5.18,
"pm10": 5.46,
"nh3": 0.33
},
"dt": 1617289200
}]
},
"roadrisk": {
"message": "Please use POST request according to the documentation https://openweathermap.org/api/road-risk"
}
}
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
License
Metadata
Release files for owm2json 0.1.89
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 |
|---|---|---|---|---|
| owm2json-0.1.89.tar.gz | 2.9 kB | Without provenance | Details for owm2json-0.1.89.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| owm2json-0.1.89-py3-none-any.whl | Python 3 | none | any | Details for owm2json-0.1.89-py3-none-any.whl |
Total release size: 6.3 kB
Release files / owm2json-0.1.89.tar.gz
| Download URL | owm2json-0.1.89.tar.gz |
|---|---|
| Size | 2.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
efbe6b662d37ffba125f363ef6cbea4c731f42ad1c80b3a8a8d2b659fcd7fe4b
|
|
BLAKE2b-256 checksum How to use checksums |
dc1ecb45e7e9b13b19fa14b49645a80b477d3df1c7aec28004f864f5820c81a6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.0 requests-toolbelt/0.8.0 tqdm/4.59.0 CPython/3.7.3
|
Release files / owm2json-0.1.89-py3-none-any.whl
| Download URL | owm2json-0.1.89-py3-none-any.whl |
|---|---|
| Size | 3.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8d297b6858072652faf4318f924eddb8db42deb53c237a009c484fbe147b2817
|
|
BLAKE2b-256 checksum How to use checksums |
c26ac55a394bcff8b3de09f3dc8196b32c9bc665fc6d5b21fdf4874fa78f1bbe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.0 requests-toolbelt/0.8.0 tqdm/4.59.0 CPython/3.7.3
|
Security for owm2json 0.1.89
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.