A small, dependency-free Ruby client for the (unofficial) Paprika Recipe
Manager Cloud Sync API. Read your own recipes
and write changes — including nutritional_info — back to your Paprika account
so they sync to all your devices.
This uses Paprika's private sync API, which is not officially documented or supported. It works today because it's the same API the Paprika apps use, but it could change without notice. Use it with your own account and data.
gem "paprika_client"Or install directly:
gem install paprika_clientrequire "paprika_client"
client = PaprikaClient::Client.new(
email: "you@example.com",
password: "your-paprika-password"
)
# List every recipe (lightweight: uid + change-detection hash)
client.recipes
# => [{ "uid" => "00011ACD-...", "hash" => "B84E5D7D..." }, ...]
# Fetch a full recipe
recipe = client.recipe("00011ACD-...")
recipe.name # => "Low Fodmap Ground Pork Noodle Bowls"
recipe.nutritional_info # => "Fat: 22.6 g\nCalories: 487 calories\n..."
# Update nutrition and save it back (recomputes the sync hash and notifies apps)
recipe.nutritional_info = "Calories: 500 calories\nProtein: 30 g"
client.save_recipe(recipe)save_recipe accepts either a PaprikaClient::Recipe or a plain attributes
hash, always recomputes the sync hash, uploads the gzipped payload, and (by
default) calls notify so your devices refresh. Pass notify: false to batch
several writes and notify once at the end.
Paprika uses a per-recipe hash to detect changes during sync. The server
stores whatever hash a client sends, so PaprikaClient recomputes a
deterministic SHA-256 (matching the community reference implementation) on every
write. You never manage it yourself.
Authentication is HTTP Basic (your Paprika email/password) against the v1 sync endpoints. Keep credentials out of source control — use environment variables or an encrypted credential store.
bin/setup # install dependencies
bundle exec rake # run tests + RuboCopTests use WebMock (no live API calls) and enforce 100% line and branch coverage via SimpleCov.
Released under the MIT License.