Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
aio-geojson-geonetnz-volcano
Advanced tools
An async GeoJSON client library for GeoNet NZ Volcanic Alert Level feed.
This library for convenient async access to GeoNet NZ Volcanic Alert Level feed.
pip install aio-geojson-geonetnz-volcano
See below for examples of how this library can be used. After instantiating a
particular class - feed or feed manager - and supply the required parameters,
you can call update
to retrieve the feed data. The return value
will be a tuple of a status code and the actual data in the form of a list of
feed entries specific to the selected feed.
Status Codes
Parameters
Parameter | Description |
---|---|
home_coordinates | Coordinates (tuple of latitude/longitude) |
Supported Filters
Filter | Description | |
---|---|---|
Radius | filter_radius | Radius in kilometers around the home coordinates in which events from feed are included. |
Example
import asyncio
from aiohttp import ClientSession
from aio_geojson_geonetnz_volcano import GeonetnzVolcanoFeed
async def main() -> None:
async with ClientSession() as websession:
# Home Coordinates: Latitude: -41.2, Longitude: 174.7
# Filter radius: 200 km
feed = GeonetnzVolcanoFeed(websession,
(-41.2, 174.7),
filter_radius=200)
status, entries = await feed.update()
print(status)
print(entries)
asyncio.get_event_loop().run_until_complete(main())
Each feed entry is populated with the following properties:
Name | Description | Feed attribute |
---|---|---|
geometry | All geometry details of this entry. | geometry |
coordinates | Best coordinates (latitude, longitude) of this entry. | geometry |
external_id | The unique public identifier for this volcano. | volcanoID |
title | Volcano title. | volcanoTitle |
attribution | Attribution of the feed. | n/a |
distance_to_home | Distance in km of this entry to the home coordinates. | n/a |
alert_level | Volcanic alert level (0-5). | level |
activity | Volcanic activity. | activity |
hazards | Most likely hazards. | hazards |
The Feed Manager helps managing feed updates over time, by notifying the consumer of the feed about new feed entries, updates and removed entries compared to the last feed update.
After a successful update from the feed, the feed manager provides two different dates:
last_update
will be the timestamp of the last update from the feed
irrespective of whether it was successful or not.last_update_successful
will be the timestamp of the last successful update
from the feed. This date may be useful if the consumer of this library wants
to treat intermittent errors from feed updates differently.last_timestamp
is not available for this feed.FAQs
An async GeoJSON client library for GeoNet NZ Volcanic Alert Level feed.
We found that aio-geojson-geonetnz-volcano demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.