skillfed

env_canada

A package to access meteorological data from Environment Canada

env-canada v0.19.1 95.2K downloads/30d#13,283 on PyPI110
Permissive license MIT Active released

What it is and what it does

env_canada is an async Python client for Environment Canada's public meteorological and environmental data services. It wraps multiple data sources—weather stations, radar, alerts, air quality indices, and hydrometric measurements—into a unified interface, automatically discovering station locations from coordinates or accepting explicit station codes in flexible formats.

The package is built on aiohttp for async I/O and uses geopy for coordinate handling, lxml for parsing, and pandas for data manipulation. It handles Environment Canada's dynamic infrastructure (including timestamped URL structures as of June 2025) transparently. Typical usage involves instantiating a data class (ECWeather, ECAlerts, ECRadar, etc.), calling update() asynchronously, and accessing the resulting properties. It supports bilingual output and customizable map rendering.

Use it for:

  • Fetch current weather conditions and forecasts for a location by coordinates or station code for a weather app or dashboard.
  • Retrieve active weather alerts (warnings, watches, advisories) with full text and risk levels for alert aggregation or notification systems.
  • Generate animated radar loops or static weather map images with customizable layers, opacity, and dimensions for web display.
  • Monitor air quality health index (AQHI) and hydrometric data (water level/flow) for environmental or public health applications.
  • Build historical weather analysis by querying daily or hourly data for a station across specific years and date ranges.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Provides async access to Environment Canada weather observations, forecasts, alerts, radar imagery, maps, air quality, and hydrometric data via public APIs.

Yes. The package is actively maintained, has no known vulnerabilities, low install friction, and a permissive MIT license. It provides a well-structured async interface to Environment Canada data that would otherwise require direct API calls. Install if you need Canadian weather, alerts, or environmental data in a Python application.

Install

env-canada on PyPI

pip

pip install env-canada

uv

uv add env-canada

poetry

poetry add env-canada

Installing env_canada

Before you install

Low install friction with a pure-Python wheel. Actively maintained as of 2026-08-09 with recent releases. Requires Python 3.11 or later.

License in practice

MIT license permits free use, modification, and distribution with minimal restrictions—suitable for most projects.

Quickstart

import asyncio
from env_canada import ECWeather

ec = ECWeather(coordinates=(50, -100))
await ec.update()  # or asyncio.run(ec.update()) outside Jupyter
print(ec.conditions)
print(ec.daily_forecasts)

Requires Python 3.11 or later. In Jupyter notebooks, use `await` instead of `asyncio.run()`.

Verify before relying

  • Whether the package handles rate limiting or throttling for Environment Canada API endpoints
  • Reliability and uptime guarantees for the underlying Environment Canada data sources
  • Whether historical data retrieval has date range limits or data availability constraints

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.11)
Install friction low — pure-Python wheel
Runtime dependencies 7 — aiohttp, geopy, lxml, pandas, Pillow, python-dateutil, voluptuous
Maintenance actively maintained — 5 days since the last release
Last repo commit
First released
Downloads 95,191/month — #13,283 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: env_canada-0.19.1-py3-none-any.whl

Operating System :: OS IndependentProgramming Language :: Python :: 3

Tags

environment canada weather datacanadian weather api pythonenvironment canada alertsweather radar canadaair quality canada aqhihydrometric data canadacanadian weather forecasts
weather-datacanadian-apisasync-io

More Internet packages