GithubHelp home page GithubHelp logo

dhandspikerwade / py-our-groceries Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ljmerza/py-our-groceries

0.0 0.0 0.0 34 KB

Unofficial Python Wrapper for Our Groceries

License: MIT License

Python 100.00%

py-our-groceries's Introduction

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

increment version in `setup.py`
delete build folder

python3 setup.py sdist bdist_wheel
twine upload --repository ourgroceries dist/*

py-our-groceries's People

Contributors

ljmerza avatar pironic avatar tritium21 avatar andreasbrett avatar dhandspikerwade avatar stratus-ss avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.