Python SDK for Anova Precision Oven
Project description
⚠️ Disclaimer
This software is provided "as is" without warranty of any kind, express or implied. The authors and contributors are not liable for any damages, losses, or issues arising from the use of this software, including but not limited to:
- Device malfunction or damage
- Property damage
- Food safety issues
- Data loss
- Service interruptions
Use at your own risk. Always supervise cooking operations and follow manufacturer guidelines for your Anova Precision Oven. This is unofficial software not endorsed by Anova Culinary.
Anova Precision Oven Python SDK
Python SDK for controlling Anova Precision Ovens using the official Anova API(https://developer.anovaculinary.com/docs/devices/wifi/oven-commands). The final goal of this project is to create an integration for Home Assistant which leverages this SDK for operation. The majority of this code was written using Anthropic Claude(https://claude.ai)
Installation
# Using pip
pip install .
Quick Start
1. Create configuration files
Create settings.yaml:
default:
log_level: INFO
supported_accessories:
- APO
Create .secrets.yaml (add to .gitignore):
default:
token: "anova-your-token-here"
Or use environment variables:
export ANOVA_TOKEN="anova-your-token-here"
2. Basic usage
from anova_oven_sdk import AnovaOven
from anova_oven_sdk import CookingPresets
async def main():
async with AnovaOven() as oven:
# Discover devices
devices = await oven.discover_devices()
device_id = devices[0].id
# Simple roast
await oven.start_cook(
device_id=device_id,
temperature=200,
duration=1800 # 30 minutes
)
# Or use presets
await CookingPresets.roast(
oven, device_id,
temperature=200,
duration_minutes=30
)
import asyncio
asyncio.run(main())
Environment Management
Switch environments using ANOVA_ENV:
# Development (debug logging, more retries)
export ANOVA_ENV=development
python your_script.py
# Production (warning logging, optimized)
export ANOVA_ENV=production
python your_script.py
CLI Usage
# Discover devices
python anova_oven_cli.py discover
# Start cooking
python anova_oven_cli.py cook --device DEVICE_ID --temp 200 --duration 30
# Stop cooking
python anova_oven_cli.py stop --device DEVICE_ID
# Run example
python anova_oven_cli.py example --env development
Advanced Usage
Multi-stage cooking
from anova_oven_sdk import (
AnovaOven, CookStage, Temperature, Timer,
SteamSettings, SteamMode, HeatingElements,
TemperatureMode, TimerStartType
)
async with AnovaOven() as oven:
devices = await oven.discover_devices()
# Sous vide then sear
stages = [
CookStage(
temperature=Temperature.from_celsius(60),
mode=TemperatureMode.WET,
timer=Timer(initial=3600),
steam=SteamSettings(
mode=SteamMode.STEAM_PERCENTAGE,
steam_percentage=100
),
title="Sous Vide"
),
CookStage(
temperature=Temperature.from_celsius(250),
timer=Timer(
initial=300,
start_type=TimerStartType.WHEN_PREHEATED
),
heating_elements=HeatingElements(
top=True,
bottom=True,
rear=False
),
title="Sear"
)
]
await oven.start_cook(devices[0].id, stages=stages)
Configuration Reference
See settings.yaml for all available configuration options:
- WebSocket settings (timeout, retries)
- Logging configuration (level, file, rotation)
- Environment-specific overrides
- Feature flags
Pydantic Validation
All models are validated automatically:
from anova_oven_sdk import Temperature, HeatingElements
# Automatic validation
temp = Temperature(celsius=200) # ✓ Valid
# temp = Temperature(celsius=-300) # ✗ ValidationError
# Heating elements validation
heating = HeatingElements(rear=True) # ✓ Valid
# heating = HeatingElements(top=True, bottom=True, rear=True) # ✗ ValidationError
Cooking Presets
Available presets:
roast()- High heat roastingsteam()- Steam cookingsous_vide()- Precise temperature controlbake()- Conventional bakingdehydrate()- Bread proofingtoast_v1_oven()- Replicate the Anova v1 Toast Recipe
Error Handling
from anova_oven_sdk import (
AnovaOven, ConfigurationError,
DeviceNotFoundError
)
try:
async with AnovaOven() as oven:
devices = await oven.discover_devices()
await oven.start_cook(devices[0].id, temperature=200)
except ConfigurationError as e:
print(f"Config error: {e}")
except DeviceNotFoundError as e:
print(f"Device not found: {e}")
except ValueError as e:
print(f"Invalid parameters: {e}")
Testing
import pytest
from anova_oven_sdk import Temperature, CookStage, HeatingElements, AnovaOven
def test_temperature_validation():
temp = Temperature.from_celsius(200)
assert temp.celsius == 200
assert temp.fahrenheit == 392
def test_heating_elements_validation():
# Valid configuration
heating = HeatingElements(rear=True)
assert heating.rear is True
# Invalid - all elements
with pytest.raises(ValueError):
HeatingElements(top=True, bottom=True, rear=True)
@pytest.mark.asyncio
async def test_oven_connection():
async with AnovaOven() as oven:
devices = await oven.discover_devices()
assert len(devices) > 0
Project Structure
anova-oven-project/
├── settings.yaml # Main configuration
├── .secrets.yaml # Secrets (gitignored)
├── .env # Environment variables (gitignored)
├── .gitignore # Git ignore file
├── pyproject.toml # Project configuration
├── anova_oven_cli.py # Anova SDK Command-line Interface(CLI)
├── logs/ # Log files (gitignored)
│ ├── anova_dev.log
│ └── anova_prod.log
└── tests/ # Test files
├── __init__.py
├── conftest.py
└── test_client.py
└── test_commands.py
└── test_exceptions.py
└── test_logging_config.py
└── test_models.py
└── test_oven_part1.py
└── test_oven_part2.py
└── test_presets.py
└── test_settings.py
└── test_utils.py
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
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 anova_precision_oven_sdk-2025.11.0.tar.gz.
File metadata
- Download URL: anova_precision_oven_sdk-2025.11.0.tar.gz
- Upload date:
- Size: 50.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1581a60ba2c87516bc618c53c9a1e97abbb71c58d9d1bcc9686ce75426c516a1
|
|
| MD5 |
7de0834ecb166830ef3fdd5413165be8
|
|
| BLAKE2b-256 |
0bd28723c7c92b1983f1e64dea400488e1c0b00aa95bd923552f3e52a960479e
|
File details
Details for the file anova_precision_oven_sdk-2025.11.0-py3-none-any.whl.
File metadata
- Download URL: anova_precision_oven_sdk-2025.11.0-py3-none-any.whl
- Upload date:
- Size: 31.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
abb5708c0273ed619ea8df16a07b504a88eca8612c8e2090a8c3d2858a8c872e
|
|
| MD5 |
712b677e13ab226aeb615770f089bd1f
|
|
| BLAKE2b-256 |
7b7d6063f3177f87b9ebf2fe4364faa334f447e0fc54808223abcb14e74b2d8f
|