Skip to main content

Automatically order Swiggy food matching your personality when you work too long

Project description

Food-AI Library (food-ai-swiggy) 🍊

An automated, background activity-tracking daemon that checks user working hours on Windows, performs a psychological personality mapping, and automatically orders a surprise Swiggy food treat based on their profile.

Features

  • 16-Personalities Style Onboarding: A 10-question Likert-scale CLI questionnaire mapping psychological/behavioral traits to food preferences (e.g. Adventure, Complexity, Heat Tolerance, Social Sharing).
  • Windows Activity Tracking: A background tracking daemon using native Windows APIs (GetLastInputInfo via ctypes) that tracks user keystrokes and mouse movements system-wide without polling loops or keyboard logging.
  • Aesthetic Tkinter Popup: A beautiful dark-theme popup asking the user: "You've been working too much, let me surprise you?" when they exceed the continuous work threshold.
  • Swiggy Food MCP Client: A native JSON-RPC-over-HTTP client for calling Swiggy Food MCP tools.
  • Simulation / Dry-Run Mode: Automatically runs in a visual dry-run mode when no live API token is supplied, allowing testing of the complete checkout, ordering, and tracking flow.

Directory Structure


Setup & Installation

Ensure you have Python 3.8+ installed. Navigate to the project directory and install in editable mode:

pip install -e .

Usage

1. Onboarding Assessment

Complete the 10-question CLI questionnaire to establish your food profile:

python main.py --onboard

2. Start Activity Tracking Daemon

Launches the background monitor that tracks continuous working hours:

python main.py --track

Testing Tip: By default, config.json has use_test_threshold set to true, which sets the active tracking threshold to 15 seconds instead of 5 hours. Move your mouse or type to trigger the popup in seconds!

3. Test Surprise Order Flow Directly

Triggers the entire Swiggy Food MCP flow immediately using your stored personality:

python main.py --surprise

4. Test Pop-Up Window Interface

Review the Tkinter styling of the notification window directly:

python main.py --test-popup

Configuration (config.json)

Modify values in config.json to change thresholds and live API connection settings:

{
  "tracking_threshold_hours": 5.0,
  "tracking_threshold_test_sec": 15,
  "use_test_threshold": true,
  "idle_timeout_min": 5.0,
  "default_address_label": "Home",
  "dry_run": true
}

To connect to a live Swiggy MCP account, set "dry_run": false and set the SWIGGY_ACCESS_TOKEN environment variable.

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

food_ai_swiggy-0.1.0.tar.gz (15.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

food_ai_swiggy-0.1.0-py3-none-any.whl (15.1 kB view details)

Uploaded Python 3

File details

Details for the file food_ai_swiggy-0.1.0.tar.gz.

File metadata

  • Download URL: food_ai_swiggy-0.1.0.tar.gz
  • Upload date:
  • Size: 15.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.14

File hashes

Hashes for food_ai_swiggy-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a57fd294ada1c76cd8e475d58c495590ca4e60c557284beeb0602933d654401d
MD5 307b656b7bc2c63fa0ee44fcaf40db8e
BLAKE2b-256 8142a77c579f67e7ae8b7280fcd183b2a1a04ddc18613f8879aabb1683e22790

See more details on using hashes here.

File details

Details for the file food_ai_swiggy-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: food_ai_swiggy-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 15.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.14

File hashes

Hashes for food_ai_swiggy-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a5b048debf5011ab705201a7a51754cb736281528ba008c63b44dfba301ef3dd
MD5 7af60015ac12ecc4dfff9dce960b0383
BLAKE2b-256 0b0f402248f4fcc82c863cc2e5d36393b471be45c750f6d053bdfb4b9ac72df1

See more details on using hashes here.

Supported by

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