Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
aio-georss-gdacs
Readme
This library provides convenient async access to the Global Disaster Alert and Coordination System (GDACS) feeds.
pip install aio-georss-gdacs
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. |
Categories | filter_categories | Array of category names. Only events with a category matching any of these is included. Supported/known categories are "Drought", "Earthquake", "Flood", "Tropical Cyclone", "Tsunami", "Volcano" |
Example
import asyncio
from aiohttp import ClientSession
from aio_georss_gdacs import GdacsFeed
async def main() -> None:
async with ClientSession() as websession:
# Home Coordinates: Latitude: -33.0, Longitude: 150.0
# Filter radius: 500 km
feed = GdacsFeed(websession,
(-33.0, 150.0),
filter_radius=500)
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 |
---|---|---|
geometries | All geometry details of this entry (except bounding boxes). | georss:point |
coordinates | Best coordinates (latitude, longitude) of this entry. | georss:point |
external_id | The unique public identifier for this incident. | guid |
title | Title of this entry. | title |
attribution | Attribution of the feed. | n/a |
distance_to_home | Distance in km of this entry to the home coordinates. | n/a |
category | The alert level of the incident. | gdacs:alertlevel |
description | The description of the incident. | description |
alert_level | Alert level ("Red", "Orange", "Green"). | gdacs:alertlevel |
country | Country where incident happened. | gdacs:country |
duration_in_week | Duration of the incident in full weeks. | gdacs:durationinweek |
event_id | Event ID (numerical). | gdacs:eventid |
event_name | Short event name. | gdacs:eventname |
event_type_short | Short event type ("DR, "EQ", "FL", "TC", "TS", "VO", "WF"). | gdacs:eventtype |
event_type | Long event type ("Drought", "Earthquake", "Flood", "Tropical Cyclone", "Tsunami", "Volcano", "Wild Fire"). | gdacs:eventtype |
from_date | Date and time this incident started. | gdacs:fromdate |
icon_url | Icon URL. | gdacs:icon |
is_current | Whether this incident is current. | gdacs:iscurrent |
population | Exposed population. | gdacs:population |
severity | Severity of the incident. | gdacs:severity |
temporary | Whether this incident is temporary. | gdacs:temporary |
to_date | Date and time this incident ended. | gdacs:todate |
version | Version of the incident in this feed. | gdacs:version |
vulnerability | Vulnerability score (textual or numerical). | gdacs:vulnerability |
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
(optional, depends on the feed data) will be the latest
timestamp extracted from the feed data.
This requires that the underlying feed data actually contains a suitable
date. This date may be useful if the consumer of this library wants to
process feed entries differently if they haven't actually been updated.FAQs
An async GeoRSS client library for GDACS feeds.
We found that aio-georss-gdacs 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.