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)
loop = asyncio.get_event_loop()
loop.run_until_complete(og.login())
my_lists = loop.run_until_complete(og.get_my_lists())
print(my_lists)
my_todo_list = loop.run_until_complete(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_category_items()
Gets all of your category items
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 create_category(name)
Create a new category
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, category="uncategorized")
Adds a new item to a given list/category
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
python3 -m pip install --user --upgrade setuptools wheel
python3 -m pip install --user --upgrade twine
python3 setup.py sdist bdist_wheel
python3 -m 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.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e57f1a76344286dbcb4635c17a5c8b7208d28e1323a2343eaccce8ba7f0ade01 |
|
MD5 | 71eec58a95c80de7410f834d21096ca9 |
|
BLAKE2b-256 | 1da6d6e275eee3cd182b6bd770c8d2ff4e60fa4abe042b8680fc543dc1eb6c32 |