#Bring! Shopping list tools

2 messages Β· Page 1 of 1 (latest)

grand mulch
#

πŸ›’ Bring! Shopping List Tool - Discord Post


πŸ›’ Bring! Shopping List Tool - Python Edition

A fully embedded Python tool for managing your Bring! shopping lists - no external packages required!

✨ Features:

βœ… No pip install needed - Bring! API directly embedded in code
βœ… Automatic authentication - Login happens automatically
βœ… Client caching - Faster performance through connection reuse
βœ… Batch operations - Multiple actions in one call
βœ… Essentials & Recipes - Reusable shopping list patterns
βœ… History tracking - Track all changes
βœ… 100% secure - No hardcoded credentials, only environment variables
βœ… Optional Discord integration - Persistent storage for Essentials/Recipes

πŸš€ Quick Start:

# 1. Set environment variables
export BRING_EMAIL="[email protected]"
export BRING_PASSWORD="your-password"

# 2. Use the tool
python3 bring_shopping_list_public.py

πŸ“– Example Usage:

from bring_shopping_list_public import get_lists, add_item, create_essential

# Get lists
lists = get_lists()

# Add item
add_item("Tofu", list_name="Shopping List", specification="500g Organic")

# Create essential
create_essential(
    "Standard Week",
    ["Milk", "Bread", "Eggs"],
    specifications=["1 Liter", "1 Loaf", "6 Pieces"]
)

🎯 Available Functions:

List Management:

  • get_lists() - Get all lists
  • get_list_items(list_name) - Get items from a list

Item Management:

  • add_item(item_name, list_name, specification) - Add item
  • remove_item(item_name, list_name) - Remove item
  • complete_item(item_name, list_name) - Mark as purchased
  • uncomplete_item(item_name, list_name) - Unmark as purchased

Batch Operations:

  • add_items_to_list(items, list_name) - Add multiple items at once
  • execute_batch(operations) - Execute multiple operations in one call

Essentials & Recipes:

  • create_essential(name, items, specifications, description) - Create essential
  • create_recipe(name, items, specifications, description) - Create recipe
  • list_essentials() / list_recipes() - List all
  • apply_essential(name, list_name) - Apply to list
  • delete_essential(name) / delete_recipe(name) - Delete

History:

  • get_history(limit, action_filter, list_name_filter) - Get history

πŸ”’ Security:

  • βœ… No hardcoded credentials
  • βœ… Input validation
  • βœ… Automatic token management
  • βœ… Structured logging

πŸ’Ύ Discord Integration (Optional):

For persistent storage of Essentials & Recipes:

export DISCORD_BOT_TOKEN="your-token"
export BRING_STORAGE_CHANNEL_ID="your-channel-id"

Without Discord: In-memory storage (lost on restart)
With Discord: Persistent storage in Discord channel

Note: Discord is completely optional - tool works perfectly without it!

πŸ“ Batch Example:

from bring_shopping_list_public import bring_shopping_list

result = bring_shopping_list(
    action="execute_batch",
    operations=[
        {"action": "add_item", "item_name": "Tofu", "list_name": "Shopping List"},
        {"action": "add_item", "item_name": "Milk", "list_name": "Shopping List"},
        {"action": "get_items", "list_name": "Shopping List"},
    ]
)

πŸ› Troubleshooting:

"Missing Bring! credentials"
β†’ Make sure BRING_EMAIL and BRING_PASSWORD are set

"Login failed"
β†’ Verify your Bring! credentials

"List not found"
β†’ Use get_lists() to see all available lists

⚠️ Disclaimer:

Uses the unofficial Bring! API. No guarantee for stability. Use at your own risk.

πŸ”— Links:


Made with ❀️ for the Bring! Community

Questions? Issues? Pull Requests? All welcome!

Die einfache Einkaufsliste βœ“ immer dabei βœ“ teilen mit Partner & Familie βœ“ Über 20 Mio. Nutzer β–· Vergiss’ den Papierzettel – Hol’ dir Bring! auf alle GerΓ€te