No project description provided
Project description
pygrocy
Installation
pip install pygrocy
Usage
Import the package:
from pygrocy import Grocy
Obtain a grocy instance:
grocy = Grocy("https://example.com", "GROCY_API_KEY")
or
grocy = Grocy("https://example.com", "GROCY_API_KEY", port = 9192, verify_ssl = True)
Get current stock:
for entry in grocy.stock():
print("{} in stock for product id {}".format(entry.available_amount, entry.id))
Development testing
You need a Grocy instance running in demo mode at localhost with https (docker or a php server) You can setup url, port and ssl in test/test_const.py
curl -L https://github.com/grocy/grocy-docker/raw/master/Dockerfile-grocy > Dockerfile-grocy
docker-compose build grocy
docker pull grocy/grocy-docker:nginx
docker-compose up -d
curl -kX GET https://localhost
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pygrocy-ext-1.0.5.tar.gz
(15.1 kB
view hashes)
Built Distribution
Close
Hashes for pygrocy_ext-1.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 960ec94fbd37c7e354e2b818348e2516680048003ce63804ec4306f767cd3e4d |
|
MD5 | 5c0cad98281d3b82c1f41322cd1d8b47 |
|
BLAKE2b-256 | 444fbd1edd49a174651ee20ed31f4c3c0d0b0f31e705c8903bb843cb315dda05 |