Skip to main content

WA DPIRD weather station downloader (minimal CLI)

Project description

animal_data_analysis_tools

Develop the utility tools for animal experiments data analysis for the researchers.

WA DPIRD Weather Downloader

  • Command: wa_dpird_weather_downloader --help
  • Example: wa_dpird_weather_downloader --station WN --start 2024-03-19T00:00:00 --end 2024-04-19T00:00:00 --out datasets/WN_2024-03-19_to_2025-04-19.csv --api-key YOUR_API_KEY

The CLI downloads real data from the WA DPIRD API with retries and resumable CSV output.

Install locally for development

  • Editable install: pip install -e .
  • Run CLI after install: wa_dpird_weather_downloader --help

Usage

  • Run (API key required via flag):
    • wa_dpird_weather_downloader --station WN --start 2024-03-19T00:00:00 --end 2025-08-01T00:00:00 --out datasets/WN_2024-03-19_to_2025-08-01.csv --api-key YOUR_API_KEY

Flags

  • --station: station ID/code (e.g., WN, 009225)
  • --start, --end: date-time YYYY-MM-DDTHH:MM:SS (UTC)
  • --out: output CSV path
  • --api-key (required): DPIRD API key
  • --limit: page size (default 200)

Features

  • Retries with exponential backoff for 429 and 5xx
  • Resumable downloads: appends pages to CSV and maintains a sidecar checkpoint <out>.ckpt.json
  • Page-by-page writing to keep memory usage low

Build & publish to PyPI (summary)

  1. Build: python -m build (install build first)
  2. Upload: twine upload dist/* (use PyPI API token __token__) See below for detailed steps.

Detailed PyPI publish steps

  1. Create PyPI account and API token (scoped to the project)
  2. Install tooling: pip install build twine
  3. Bump version in pyproject.toml under [project] version
  4. Build artifacts: python -m build (creates dist/*.tar.gz & dist/*.whl)
  5. Upload to TestPyPI (optional): twine upload -r testpypi dist/*
    • Then install to test: pip install -i https://test.pypi.org/simple/ wa-weather-station-tool
  6. Upload to PyPI: twine upload dist/*
    • Username: __token__, Password: your API token
  7. Verify install: pip install wa-weather-station-tool && wa_dpird_weather_downloader --help

Project details


Download files

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

Source Distribution

wa_weather_station_tool-0.1.0.tar.gz (608.7 kB view details)

Uploaded Source

Built Distribution

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

wa_weather_station_tool-0.1.0-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: wa_weather_station_tool-0.1.0.tar.gz
  • Upload date:
  • Size: 608.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.1

File hashes

Hashes for wa_weather_station_tool-0.1.0.tar.gz
Algorithm Hash digest
SHA256 43e30f6e8d825b1f3c11fe498123ca13163499c7e5f70e6b56856743e444c2ec
MD5 fc9a28fbbe95741b457f1481a2c00463
BLAKE2b-256 b894092b592e2de785e4048be4a9393406b981fdc4180dca0e4b7d199e3d6382

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for wa_weather_station_tool-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 293849ab5b44b2c7e42d484da3436c10eb5e99f928ae5d268bfe5223354be3cc
MD5 c748b01b6b4afc77ce8fe0f0117fed95
BLAKE2b-256 3159fbfb8fd06e5d455d60ea405b4ca601add2d4d87b13bad82f7a5372c18a5b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page