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-timeYYYY-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)
- Build:
python -m build(installbuildfirst) - Upload:
twine upload dist/*(use PyPI API token__token__) See below for detailed steps.
Detailed PyPI publish steps
- Create PyPI account and API token (scoped to the project)
- Install tooling:
pip install build twine - Bump version in
pyproject.tomlunder[project] version - Build artifacts:
python -m build(createsdist/*.tar.gz&dist/*.whl) - 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
- Then install to test:
- Upload to PyPI:
twine upload dist/*- Username:
__token__, Password: your API token
- Username:
- Verify install:
pip install wa-weather-station-tool && wa_dpird_weather_downloader --help
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
wa_weather_station_tool-0.1.0.tar.gz
(608.7 kB
view details)
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 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
43e30f6e8d825b1f3c11fe498123ca13163499c7e5f70e6b56856743e444c2ec
|
|
| MD5 |
fc9a28fbbe95741b457f1481a2c00463
|
|
| BLAKE2b-256 |
b894092b592e2de785e4048be4a9393406b981fdc4180dca0e4b7d199e3d6382
|
File details
Details for the file wa_weather_station_tool-0.1.0-py3-none-any.whl.
File metadata
- Download URL: wa_weather_station_tool-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
293849ab5b44b2c7e42d484da3436c10eb5e99f928ae5d268bfe5223354be3cc
|
|
| MD5 |
c748b01b6b4afc77ce8fe0f0117fed95
|
|
| BLAKE2b-256 |
3159fbfb8fd06e5d455d60ea405b4ca601add2d4d87b13bad82f7a5372c18a5b
|