Skip to main content

AsyncIO Library for Communicating with Paprika backend servers.

Project description

Pyprika

Python Package to talk to Paprika's backend server.

Features

  • Configurable periodic retrieval of data
  • Recipes, Categories, Meals, Menus are all linked via relational id
  • Ability to filter recipes that include categories, exclude categories, total cook/prep duration, recipe difficulty and recipe names.

Usage

Initialize

Initialize Pyprika with your username and password from your mobile app. If you so choose, you can also tell it to auto fetch after a certain delay:

pyprika = Pyprika(username, password)
pyprika = Pyprika(username, password, fetch_delay=timedelta(hours=2), auto_fetch=True)

Get all data

recipe_book = pyprika.get_all()

Filter recipes

recipes = pyprika.get_recipes(
            categories=None,
            not_categories=None,
            difficulty=None,
            duration=None,
            name_like=None,
            name_not_like=None
          )

NOTE All arguments here are optional. Passing no arguments will return every recipe.

Enable/disable auto fetch

pyprika.set_auto_fetch(True)  #Enable auto-fetch after delay
pyprika.set_auto_fetch(False)  #Disable auto-fetch immediately

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyprika-client-0.2.1.tar.gz (13.0 kB view hashes)

Uploaded Source

Built Distribution

pyprika_client-0.2.1-py3-none-any.whl (22.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page