pygrocydm
Installation
pip install pygrocydm
Documentation
Check Grocy API
https://blueblueblob.github.io/pygrocydm/
Usage
Import the package:
from pygrocydm import GrocyAPI
Obtain a grocy data manager instance:
gapi = GrocyAPI("https://example.com", "GROCY_API_KEY")
or
gapi = GrocyAPI("https://example.com", "GROCY_API_KEY", port = 9192, verify_ssl = True)
Product list (Generic entities API)
products = gapi.generic_entities().products()
products_list = products.list
for product in products_list:
print(vars(product))
if product.name == "Cookies":
product.delete()
if product.name == "Chocolate":
data = {}
data['name'] = "Choco"
product.edit(data)
else:
new_product = {}
new_product['name'] = 'Cookies'
new_product['location_id'] = 1
new_product['qu_id_purchase'] = 1
new_product['qu_id_stock'] = 1
new_product['qu_factor_purchase_to_stock'] = 1
new_product_id = products.add(new_product)
Recipes API :
recipes_api = gapi.recipes()
for recipe in recipes_api.fullfilment_list:
if recipe.recipe_id == 5:
recipe.add_not_fulfilled_products_to_shoppinglist()
else:
recipe.consume()
recipes_api.refresh()
Tasks API :
tasks_api = gapi.tasks()
for task in tasks_api.tasks_list:
if task.id == 5:
task.complete()
task.undo()
tasks_api.refresh()
System API :
system_api = gapi.system()
last_db_change = system_api.db_changed_time()
License
Metadata
Release files for pygrocydm 0.8.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 | Provenance | Actions |
|---|---|---|---|---|
| pygrocydm-0.8.0.tar.gz | 14.8 kB | Without provenance | Details for pygrocydm-0.8.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pygrocydm-0.8.0-py3-none-any.whl | Python 3 | none | any | Details for pygrocydm-0.8.0-py3-none-any.whl |
Total release size: 43.0 kB
Release files / pygrocydm-0.8.0.tar.gz
| Download URL | pygrocydm-0.8.0.tar.gz |
|---|---|
| Size | 14.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0edeb5b341a3e7e3db3ab437ef901e18cf4e3a72dabcc4ede81e74b51c8b1314
|
|
BLAKE2b-256 checksum How to use checksums |
c7ef8e9cb836bdbc7ce39456e5ef9b44010ffb978cd101094f5cca955ea788d3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2
|
Release files / pygrocydm-0.8.0-py3-none-any.whl
| Download URL | pygrocydm-0.8.0-py3-none-any.whl |
|---|---|
| Size | 28.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
66cbabd2ec54ae0a64b11da8f6d67f94f7c5132aaa78317eb4ba80aecc66af4a
|
|
BLAKE2b-256 checksum How to use checksums |
078c0908112ffeda672eccd91cdeede398d255d129d70458a5ab0cd012a13595
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2
|
Security for pygrocydm 0.8.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.