Our Groceries Unofficial Python Package
Project description
Unofficial asyncio python wrapper for the Our Groceries API. This library requires Python >=3.5
.
Installation
pip install ourgroceries
Usage
import asyncio
from ourgroceries import OurGroceries
username = ''
password = ''
og = OurGroceries(username, password)
asyncio.run(og.login())
my_lists = asyncio.run(og.get_my_lists())
print(my_lists)
my_todo_list = asyncio.run(og.get_list_items(list_id=''))
print(my_todo_list)
Methods
def login()
Logs into our groceries
def get_my_lists()
Gets all of your lists
def get_list_items(list_id)
Gets the items for a list
def create_list(name, list_type='SHOPPING')
Creates a new list. list_type can be 'RECIPES' or 'SHOPPING'
def toggle_item_crossed_off(list_id, item_id, cross_off=False)
Toggle a list item's crossed off property based on cross_off
def add_item_to_list(list_id, value)
Adds a new item to a given list
def remove_item_from_list(list_id, item_id)
Removes an item from a given list
Exceptions
throws InvalidLoginException
if can't login.
Development
prerequisites
pip install --upgrade pip setuptools wheel
pip install tqdm
pip install --upgrade twine
build
python setup.py sdist
install
python setup.py install
upload
twine upload dist/*
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
Built Distribution
Hashes for ourgroceries-1.3.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5e316ebb091199ace8da5e1bb269b47392ea227211b59ad4d22fc40940ff7b7f |
|
MD5 | 0c08c6640a4a42a1ccdc5230623f7a5d |
|
BLAKE2b-256 | 650714c3966dac1af4aee25eb545fc09e96da11b499f29e9765f6e0dc12f9a87 |