--- id: pyairvisual version: "2023.12.0" license: MIT license_treatment: permissive maintenance: active --- # pyairvisual — A simple API for AirVisual air quality data License: permissive · Maintenance: active · Downloads: 74.0K/mo ## What it is and what it does pyairvisual is an async Python client for the AirVisual air quality API. It wraps the AirVisual service to let you query air quality data by city, station, or geographic coordinates, and retrieve supported locations and global rankings depending on your API plan tier (Community, Startup, or Enterprise). The library uses aiohttp for HTTP requests and supports connection pooling via a ClientSession for efficiency. It also supports direct queries to AirVisual Node/Pro air quality monitoring units, either through the cloud API or over the local network via Samba. The library is async-first, requiring asyncio patterns for all operations, and targets Python 3.10 and later. Use it for: - Fetch current air quality metrics for a specific city or geographic location in an async application. - Query the nearest air quality station or city based on latitude/longitude coordinates. - Retrieve air quality history and trends from a local Node/Pro monitoring unit over Samba. - Build a dashboard or alert system that polls multiple cities or stations concurrently using connection pooling. - List supported countries, states, and cities to populate location selectors in a web or mobile app. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. A thin async Python wrapper for the AirVisual API to retrieve air quality data by location, station, or global ranking. Yes. The package is actively maintained, has low install friction, carries a permissive MIT license, and provides a clean async interface to AirVisual data. Install it if you need to integrate air quality lookups into a Python application and already have or can obtain an AirVisual API key. No known vulnerabilities as of August 2026. ## Install pip install pyairvisual uv add pyairvisual poetry add pyairvisual ## Installing pyairvisual Before you install: Low install friction with a pure-Python wheel. Actively maintained as of August 2026 with recent commits; supported on Python 3.10, 3.11, and 3.12. License in practice: MIT license permits commercial and private use with minimal restrictions; suitable for most projects. Quickstart: pip install pyairvisual import asyncio from pyairvisual.cloud_api import CloudAPI async def main(): cloud_api = CloudAPI("") data = await cloud_api.air_quality.nearest_city() print(data) asyncio.run(main()) Requires a valid AirVisual API key (available from the AirVisual API site); async/await syntax requires Python 3.10+. Verify before relying: - Whether the library supports all current AirVisual API endpoints or only a subset of the documented API. - Performance characteristics when pooling connections across many concurrent requests. - Whether Node/Pro unit Samba access works reliably across different network configurations. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 74.0K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags air quality data api, airvisual python client, async air quality lookup, aqi retrieval library, environmental monitoring api, location-based air quality, station air quality data, air-quality, async-http, environmental-data [View on SkillFed](https://skillfed.io/packages/pyairvisual) · [View on PyPI](https://pypi.org/project/pyairvisual/)