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.4.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.4.0
File Size Uploaded Provenance
grocy_py-1.4.0.tar.gz 144.8 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 183.5 kB

Release files / grocy_py-1.4.0.tar.gz

Download URL grocy_py-1.4.0.tar.gz
Size 144.8 kB
Tags Source
SHA-256 checksum
How to use checksums
0e5f98369bea5c66a38ecb8e40445824b242793a4274f95a83aa052535351b6c
BLAKE2b-256 checksum
How to use checksums
b5b55ecc23a7149ee67185da7646aba4f64a7d16f3e5f919b392c44163017969
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.3 {"installer":{"name":"uv","version":"0.13.3","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.4.0-py3-none-any.whl

Download URL grocy_py-1.4.0-py3-none-any.whl
Size 38.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9290bcae053b31e4fa698ad2e7e717e77eac7742fd4a9e13c767ed042132ec67
BLAKE2b-256 checksum
How to use checksums
1af9a305724486b8cee163cc50dc409323031f751a11985de29de073568017a0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.3 {"installer":{"name":"uv","version":"0.13.3","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}

Security for grocy-py 1.4.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

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