Skip to content

Grocy Client

The Grocy class is the main entry point for the library. It wraps the low-level API client and returns rich data model objects.

Usage

from grocy import Grocy

grocy = Grocy("https://your-grocy-instance.com", "YOUR_API_KEY")

Class Reference

Grocy(base_url, api_key, port=DEFAULT_PORT_NUMBER, path=None, verify_ssl=True, debug=False)

Main client for the Grocy ERP API.

Provides access to domain-specific managers as cached properties. Each manager handles a subset of the Grocy API.

Parameters:

Name Type Description Default
base_url

Grocy server URL (e.g. "https://grocy.example.com").

required
api_key

API key for authentication. Use "demo_mode" for the demo server.

required
port int

Server port number.

DEFAULT_PORT_NUMBER
path str | None

Optional URL path prefix (e.g. "grocy" for /grocy/api/).

None
verify_ssl

Whether to verify SSL certificates.

True
debug

Enable debug logging.

False

stock cached property

Access stock management operations.

shopping_list cached property

Access shopping list operations.

recipes cached property

Access recipe operations.

chores cached property

Access chore management operations.

tasks cached property

Access task management operations.

batteries cached property

Access battery tracking operations.

equipment cached property

Access equipment management operations.

meal_plan cached property

Access meal planning operations.

users cached property

Access user management operations.

system cached property

Access system information and configuration.

generic cached property

Access generic entity CRUD operations.

calendar cached property

Access calendar operations.

files cached property

Access file management operations.