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.6.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.6.0
File Size Uploaded Provenance Actions
grocy_py-1.6.0.tar.gz 157.8 kB Without provenance Details for grocy_py-1.6.0.tar.gz

Built distribution (wheel)

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

Total release size: 197.5 kB

Release files / grocy_py-1.6.0.tar.gz

Download URL grocy_py-1.6.0.tar.gz
Size 157.8 kB
Tags Source
SHA-256 checksum
How to use checksums
c2ee585f1e0e910d45296ef80e386f52c2f3ba5bc8895074b03ba7db88ae5ed6
BLAKE2b-256 checksum
How to use checksums
716624f716152d0503ec864e7a578b735dc0452a6eff15a575d3b5edfb908c48
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","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.6.0-py3-none-any.whl

Download URL grocy_py-1.6.0-py3-none-any.whl
Size 39.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e7f568b936cc6ef8f2557cd8f569ad0acc9210baa0b87acf0b957508bcb30f03
BLAKE2b-256 checksum
How to use checksums
baa19d0ed58fc7375fa9ff835217f8f5ae9b5c74bdaa4a3a8b3ee428cd0983eb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","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.6.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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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