An async INGV Centro Nazionale Terremoti (Earthquakes) QuakeML client library.
Project description
python-quakeml-ingv-centro-nazionale-terremoti-client
This library provides convenient async access to the INGV Centro Nazionale Terremoti (Earthquakes) QuakeML feeds.
Examples
Retrieve all events from the last 24 hours (default timeframe):
import asyncio
from aiohttp import ClientSession
from aio_quakeml_ingv_centro_nazionale_terremoti_client import IngvCentroNazionaleTerremotiQuakeMLFeed
async def main() -> None:
async with ClientSession() as websession:
# Home Coordinates: Latitude: 43.7, Longitude: 11.2
feed = IngvCentroNazionaleTerremotiQuakeMLFeed(websession,
(43.7, 11.2))
status, entries = await feed.update()
print(status)
if entries:
for entry in entries:
print(f"- ID: {entry.external_id} - Magnitude: {entry.magnitude.mag} - Distance: {entry.distance_to_home:.2f}")
asyncio.get_event_loop().run_until_complete(main())
Retrieve all events from the last 24 hours (default timeframe) and within a radius of 100km around the provided home coordinates:
import asyncio
from aiohttp import ClientSession
from aio_quakeml_ingv_centro_nazionale_terremoti_client import IngvCentroNazionaleTerremotiQuakeMLFeed
async def main() -> None:
async with ClientSession() as websession:
# Home Coordinates: Latitude: 43.7, Longitude: 11.2
# Filter radius: 100 km
feed = IngvCentroNazionaleTerremotiQuakeMLFeed(websession,
(43.7, 11.2),
filter_radius=100)
status, entries = await feed.update()
print(status)
if entries:
for entry in entries:
print(f"- ID: {entry.external_id} - Magnitude: {entry.magnitude.mag} - Distance: {entry.distance_to_home:.2f}")
asyncio.get_event_loop().run_until_complete(main())
Retrieve all events from the last 24 hours (default timeframe), within a radius of 100km around the provided home coordinates, and with a magnitude of 2.0 or higher:
import asyncio
from aiohttp import ClientSession
from aio_quakeml_ingv_centro_nazionale_terremoti_client import IngvCentroNazionaleTerremotiQuakeMLFeed
async def main() -> None:
async with ClientSession() as websession:
# Home Coordinates: Latitude: 43.7, Longitude: 11.2
# Filter radius: 100 km
# Filter minimum magnitude: 2.0
feed = IngvCentroNazionaleTerremotiQuakeMLFeed(websession,
(43.7, 11.2),
filter_radius=100,
filter_minimum_magnitude=2.0)
status, entries = await feed.update()
print(status)
if entries:
for entry in entries:
print(f"- ID: {entry.external_id} - Magnitude: {entry.magnitude.mag} - Distance: {entry.distance_to_home:.2f}")
asyncio.get_event_loop().run_until_complete(main())
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file aio_quakeml_ingv_centro_nazionale_terremoti_client-0.4.tar.gz.
File metadata
- Download URL: aio_quakeml_ingv_centro_nazionale_terremoti_client-0.4.tar.gz
- Upload date:
- Size: 9.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
74677fee7ecec347e0d92d78f5406fe79e560677f6e3ff4cf8a38e6a4b9af713
|
|
| MD5 |
1e5f29e41914831705ad7dd33c4285fd
|
|
| BLAKE2b-256 |
69cfe2efe8c297719dd39520360bc4321fc8d16675caccc423ebd645703c8113
|
File details
Details for the file aio_quakeml_ingv_centro_nazionale_terremoti_client-0.4-py3-none-any.whl.
File metadata
- Download URL: aio_quakeml_ingv_centro_nazionale_terremoti_client-0.4-py3-none-any.whl
- Upload date:
- Size: 10.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dc5dae542531d80b1bb223fcb88b17f4a6018bfe9b6bc06adbc60cabde0a722f
|
|
| MD5 |
82e7a130f3d00c2ceb1bd0a6df5de3f2
|
|
| BLAKE2b-256 |
36090e1c8f84d506d0e2b60f6027d24ee695f9d04e9678d7051a5e97329f0b46
|