Skip to main content

ngf-aws-open-data-client

Read miniSEED waveforms directly from S3, mirroring obspy.clients.fdsn.Client.get_waveforms.

Defaults to EarthScope's public AWS Open Data bucket (s3://earthscope-geophysical-data/miniseed, us-east-2, unsigned/anonymous access), but every aspect of the connection (bucket path, region, credentials, endpoint) and the key layout is configurable, so the same client works against any S3 bucket that stores day-volume miniSEED files.

Installing

pip install -e .          # editable install for development
pip install -e ".[test]"  # + pytest, for running tests/

Usage

from obspy import UTCDateTime
from ngf_aws_open_data_client import NGFS3Client

client = NGFS3Client()

st = client.get_waveforms(
    network="IU", station="ANMO", location="00", channel="BHZ",
    starttime=UTCDateTime("2023-01-01T00:00:00"),
    endtime=UTCDateTime("2023-01-01T00:10:00"),
)
st.write("waveformData.mseed", format="MSEED")

Against a private bucket with a different key layout:

client = NGFS3Client(
    bucket_path="s3://my-miniseed",
    anon=False,
    profile_name="my_profile",
    key_template="{station}/{year}/{doy}/{station}.{network}.{year}.{doy}",
)

Running tests

pytest tests/

Building and publishing to PyPI

python -m pip install build twine
python -m build                                        # writes dist/*.tar.gz and dist/*.whl
python -m twine upload --repository testpypi dist/*    # try it on TestPyPI first
python -m twine upload dist/*                           # then the real PyPI

Bump the version in pyproject.toml (and __version__ in src/ngf_aws_open_data_client/__init__.py) before each release.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ngf_aws_open_data_client-0.1.0.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ngf_aws_open_data_client-0.1.0-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

Details for the file ngf_aws_open_data_client-0.1.0.tar.gz.

File metadata

File hashes

Hashes for ngf_aws_open_data_client-0.1.0.tar.gz
Algorithm Hash digest
SHA256 047cf501ce1dccc91c7765a0a1192401dcea773a55a6de65a707f37e1898dacb
MD5 d4958b69b1ca5943ceabd4856a29bc00
BLAKE2b-256 0e49809707a86e31192d65ac4198bec0834b643d25eee4bfdf3b9afc72248a99

See more details on using hashes here.

File details

Details for the file ngf_aws_open_data_client-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for ngf_aws_open_data_client-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b593ffd97d29180e6538a8d35ed1c61c59529dd2f044a5db431fa0468cb3a1b8
MD5 48a753943534ed7a4542fc074c6270a4
BLAKE2b-256 5da6217f9328b2b4d7878c9289f2886de51af252511546494614427152bde09e

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page