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.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| grocy_py-1.3.0.tar.gz | 140.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| grocy_py-1.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 178.6 kB
Release files / grocy_py-1.3.0.tar.gz
| Download URL | grocy_py-1.3.0.tar.gz |
|---|---|
| Size | 140.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e4199e08d030780ce095ddb24f27fce0057848988cd0ca1f18f31165fea1888c
|
|
BLAKE2b-256 checksum How to use checksums |
9058a41721785f6807e0e62b896b54df38e1a04d13124ea1abd5ba5385591e85
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.22 {"installer":{"name":"uv","version":"0.12.22","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.3.0-py3-none-any.whl
| Download URL | grocy_py-1.3.0-py3-none-any.whl |
|---|---|
| Size | 37.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
192f3bd26a9717f69aa4ac2a165171973268417d5cfafca96905a75d71811537
|
|
BLAKE2b-256 checksum How to use checksums |
3cbb8c5c4da69d2d7ebce19c1ae22704c818006606ea7740c45a2d7f6169c141
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.22 {"installer":{"name":"uv","version":"0.12.22","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}
|