Metadata-Version: 2.4
Name: pydrawise
Version: 2026.7.1
Summary: Python API for interacting with Hydrawise sprinkler controllers.
Author-email: David Knowles <dknowles2@gmail.com>
License: Apache-2.0
Project-URL: Homepage, https://github.com/dknowles2/pydrawise
Project-URL: Source Code, https://github.com/dknowles2/pydrawise
Project-URL: Bug Reports, https://github.com/dknowles2/pydrawise/issues
Keywords: hydrawise,api,iot
Platform: any
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: aiohttp
Requires-Dist: apischema
Requires-Dist: gql
Requires-Dist: graphql-core
Requires-Dist: requests
Provides-Extra: docs
Requires-Dist: mkdocs==1.6.1; extra == "docs"
Requires-Dist: mkdocstrings==1.0.6; extra == "docs"
Requires-Dist: mkdocstrings-python==2.0.7; extra == "docs"
Dynamic: license-file

# Pydrawise

[![Build and Test](https://github.com/dknowles2/pydrawise/workflows/Build%20and%20Test/badge.svg)](https://github.com/dknowles2/pydrawise/actions/workflows/build-and-test.yml)
[![pypi version](https://img.shields.io/pypi/v/pydrawise.svg)](https://pypi.python.org/pypi/pydrawise)
[![docs](https://readthedocs.org/projects/pydrawise/badge/?version=latest)](https://pydrawise.readthedocs.io/en/latest/?badge=latest)

Pydrawise is an asynchronous Python 3 library for interacting with Hydrawise sprinkler controllers.

*Note that this project has no official relationship with Hydrawise or Hunter. Use at your own risk.*

## Usage

```python
import asyncio

from pydrawise import Auth, Hydrawise


async def main():
    # Create a Hydrawise object and authenticate with your credentials.
    h = Hydrawise(Auth("username", "password"))

    # List the controllers attached to your account.
    controllers = await h.get_controllers()

    # List the zones controlled by the first controller.
    zones = await h.get_zones(controllers[0])

    # Start the first zone.
    await h.start_zone(zones[0])


if __name__ == "__main__":
    asyncio.run(main())
```

The example above uses `pydrawise.Hydrawise`, which talks to Hydrawise's GraphQL API. Pydrawise
also provides a REST API client (`pydrawise.rest.RestClient`) and a hybrid client
(`pydrawise.hybrid.HybridClient`) that prefers GraphQL but falls back to REST when GraphQL
requests are throttled. See the [usage guide](https://pydrawise.readthedocs.io/en/latest/usage/)
for more examples, and the [full API reference](https://pydrawise.readthedocs.io/en/latest/reference/)
for details.

## Installation

### Pip

To install pydrawise, run this command in your terminal:

```sh
$ pip install pydrawise
```

### Source code

Pydrawise is actively developed on Github, where the code is [always available](https://github.com/dknowles2/pydrawise).

You can either clone the public repository:

```sh
$ git clone https://github.com/dknowles2/pydrawise
```

Or download the latest [tarball](https://github.com/dknowles2/pydrawise/tarball/main):

```sh
$ curl -OL https://github.com/dknowles2/pydrawise/tarball/main
```

Once you have a copy of the source, you can embed it in your own Python package, or install it into your site-packages easily:

```sh
$ cd pydrawise
$ python -m pip install .
```
