Skip to main content

googlewifiapi

An asynchronous Python client for reading status from the local JSON API exposed by Google Wifi routers. The package is designed for integrations such as Home Assistant, but can be used by any Python application that needs router status data.

About this README

This README was generated by AI with human review. All code is either written by a human or is thoroughly reviewed. I'll try to keep the README updated, but sometimes I might forget.

Requirements

  • Python 3.13 or newer
  • A Google Wifi router reachable on the local network

Installation

pip install googlewifiapi

Usage

Pass an aiohttp.ClientSession to the client so your application controls the session lifecycle:

import asyncio

import aiohttp

from googlewifiapi import GoogleWifiAPI


async def main() -> None:
    async with aiohttp.ClientSession() as session:
        router = GoogleWifiAPI(host="192.168.86.1", sess=session)
        await router.async_update()

        if router.data is not None:
            print(router.data.wan.online)
            print(router.data.software.software_version)
            print(router.data.system.last_restart)


asyncio.run(main())

The host defaults to 192.168.86.1. After a successful update:

  • router.raw_data contains the raw JSON response.
  • router.data contains a validated, typed GoogleWifiStatus.
  • IP address fields are parsed as IPv4Address or IPv6Address objects.
  • system.last_restart is calculated from the router's uptime.

The status object exposes dns, software, system, and wan sections. Their fields use Python names such as software_version, gateway_ip_address, and ip_prefix_length, while the client handles the router API's camelCase keys.

Errors

All library errors inherit from GoogleWifiException:

  • GoogleWifiClientError indicates a request, connection, timeout, or JSON decoding failure.
  • GoogleWifiDataValidationError indicates that the response does not match the expected status schema.

Development

Install the test dependencies and run the test suite with uv:

uv sync --group test
uv run pytest

License

This project is licensed under the MIT License. See LICENSE.txt.

Disclaimer

This is an independent, community-developed project and is not affiliated with or endorsed by Google LLC. It relies on a local API that Google may change or remove without notice.

Release files for googlewifiapi 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for googlewifiapi 0.1.1
File Size Uploaded
googlewifiapi-0.1.1.tar.gz 6.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for googlewifiapi 0.1.1
File Interpreter ABI Platform
googlewifiapi-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 12.3 kB

Release files / googlewifiapi-0.1.1.tar.gz

Download URL googlewifiapi-0.1.1.tar.gz
Size 6.3 kB
Tags Source
SHA-256 checksum
How to use checksums
29053761e6ba28a1034977886bc5324f51a968af614ab3c607c402ce824e36ef
BLAKE2b-256 checksum
How to use checksums
a3ffb79f6486f7193990c2c568d10c1381a8ef13fa6c90dec766b7c910b6d1fc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 26, 2026.

Transparency log

Release files / googlewifiapi-0.1.1-py3-none-any.whl

Download URL googlewifiapi-0.1.1-py3-none-any.whl
Size 6.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ec49692bb016b2ddd28c04cc2a19dd69b0ccfc92336ceb3c71e00179894d2e42
BLAKE2b-256 checksum
How to use checksums
4c4db60bf194c7aa1fe87f7c45b67b7ed0cf1e7c2562180c68ad15f692ccf93c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 26, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release 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