Skip to main content

grocy-py

A Python client library for the Grocy ERP system API.

Check out the documentation.

Installation

pip install grocy-py

Usage

from grocy import Grocy

grocy = Grocy("https://example.com", "GROCY_API_KEY")

With custom port and SSL options:

grocy = Grocy("https://example.com", "GROCY_API_KEY", port=9192, verify_ssl=True)

Get current stock:

for product in grocy.stock.current():
    print(f"{product.name}: {product.available_amount} in stock")

Features

All features are accessed through manager objects on the Grocy instance:

Manager Access Description
Stock grocy.stock Query, add, consume, open, transfer products
Shopping List grocy.shopping_list View and manage shopping list items
Chores grocy.chores List, execute, and track chores
Chore Log grocy.chores_log Read individual chore execution log entries
Tasks grocy.tasks Manage and complete tasks
Batteries grocy.batteries Track battery charge cycles
Equipment grocy.equipment Manage household equipment
Meal Plan grocy.meal_plan View meal plans and sections
Recipes grocy.recipes Get recipes, check fulfillment, consume
Users grocy.users Manage users and settings
System grocy.system Server info, time, config
Calendar grocy.calendar iCalendar export and sharing
Files grocy.files Upload, download, delete files
Generic grocy.generic CRUD any Grocy entity type

Stability

From 1.0.0 this library follows semantic versioning.

What is covered. Everything exported from the grocy package — Grocy, the manager classes, EntityType, TransactionType — plus any name reachable through a submodule path that does not start with an underscore, such as the data models in grocy.data_models.

Within that surface:

  • a major bump may remove or rename things, or change a signature incompatibly;
  • a minor bump only adds;
  • a patch bump only fixes behaviour.

What is not covered. GrocyApiClient and its _do_get_request / _do_post_request / _do_put_request / _do_delete_request methods are internal. They are deliberately not re-exported from the package root and may change in any release. If you find yourself reaching for them because the managers cannot express what you need, please open an issue — that is a gap worth filling with public API instead.

Development

# Install dependencies
uv sync --group dev

# Run tests
uv run pytest

# Lint and format
uv run ruff check .
uv run ruff format .

# Build docs
uv run mkdocs serve

Support

If you need help using grocy check the discussions section. Feel free to create an issue for feature requests, bugs and errors in the library.

Metadata

Release files for grocy-py 1.1.0

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

Source distribution (sdist)

Source distribution for grocy-py 1.1.0
File Size Uploaded
grocy_py-1.1.0.tar.gz 130.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for grocy-py 1.1.0
File Interpreter ABI Platform
grocy_py-1.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 168.3 kB

Release files / grocy_py-1.1.0.tar.gz

Download URL grocy_py-1.1.0.tar.gz
Size 130.9 kB
Tags Source
SHA-256 checksum
How to use checksums
142c0600f032e8d40f9a8e1a89cd68468c690adb054cb84719fb7b9847767758
BLAKE2b-256 checksum
How to use checksums
8e4f2dee6985c7085598bf42b6da84018712f9f92090c94122aebadf24be3eac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.17 {"installer":{"name":"uv","version":"0.12.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / grocy_py-1.1.0-py3-none-any.whl

Download URL grocy_py-1.1.0-py3-none-any.whl
Size 37.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
edbace5ba1ae046267c62af48602760e1f4d19bfd3ef628db1d6e68fd8cf690b
BLAKE2b-256 checksum
How to use checksums
c6b0a274f3ffc7e0334bc4d60bd062b92abbfd75ee0387915f98fc8c72cc6c25
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.17 {"installer":{"name":"uv","version":"0.12.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

1.3.0

2 release files

1.2.0

2 release files

This release

1.1.0 This release

2 release files

1.0.0

2 release files

0.1.0

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.2

2 release files

0.0.1

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