Skip to main content

TUNE DMS desktop GUI automation: login and report generation

Project description

tune-dms

TUNE DMS desktop GUI automation: log in and run reports (e.g. Parts Price List, Parts by Bin Location) via keyboard and screen image matching.

  • Install: pip install tune-dms
  • Editable (from repo root): pip install -e ./packages/tune_dms

Configuration

Set credentials (and optional paths) via environment variables or a .env file. Optional: use python-dotenv so TuneConfig.from_env() can load from .env.

Variable Required Description
TUNE_USER_ID Yes TUNE login user ID
TUNE_USER_PASSWORD Yes TUNE login password
TUNE_SHORTCUT_PATH No Path to TUNE shortcut (default: C:\Users\Public\Desktop\TUNE.lnk)
TUNE_REPORTS_DIR No Directory where reports are saved (default: current working directory)
TUNE_IMAGES_DIR No Override path to reference images (default: package images/)

Custom logger

You can inject your own logger so all library log output uses your handler, level, and format. Call set_logger(my_logger) before using other tune_dms APIs. Pass None to revert to the default.

import logging
from tune_dms import set_logger, TuneConfig, run_tune_reports

logger = logging.getLogger("my_app.tune_dms")
logger.setLevel(logging.INFO)
# add handlers, formatters, etc.
set_logger(logger)

config = TuneConfig.from_env()
run_tune_reports(config)  # all tune_dms logs go to your logger

Usage example

After installing, ensure TUNE is not running and that the desktop/shortcut is as expected. Then load config and run the built-in report workflow:

from tune_dms import TuneConfig, run_tune_reports

# Load from environment (e.g. TUNE_USER_ID, TUNE_USER_PASSWORD in .env or env)
config = TuneConfig.from_env()

# Optional: set reports directory if not using TUNE_REPORTS_DIR
# config = TuneConfig.from_env(reports_dir="C:/path/to/reports")

config.validate()  # raises if user_id/password missing
success = run_tune_reports(config)

The runner will:

  1. Launch TUNE from the configured shortcut
  2. Log in using the configured credentials
  3. Navigate by department and run Parts Price List and Parts by Bin Location for each (department/franchise and output filenames are fixed in the built-in workflow)
  4. Close TUNE when done

For a custom sequence of reports, use TuneReportGenerator with the same config and call run_reports(); the class uses the same flow internally. Report parameters (department, franchise, output file name, etc.) are set via PartsPriceListParams and PartsByBinLocationParams when calling the download helpers inside that flow.

Requirements

  • Windows (shortcut path and automation are Windows-oriented)
  • pyautogui (installed with the package)
  • TUNE desktop application installed and a desktop shortcut at the configured path
  • Reference images are included in the package (tune_dms/images/); do not move the package’s images folder if using the default TUNE_IMAGES_DIR

See the main repo for more context and the monorepo layout.

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

tune_dms-0.1.6.tar.gz (112.0 kB view details)

Uploaded Source

Built Distribution

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

tune_dms-0.1.6-py3-none-any.whl (124.2 kB view details)

Uploaded Python 3

File details

Details for the file tune_dms-0.1.6.tar.gz.

File metadata

  • Download URL: tune_dms-0.1.6.tar.gz
  • Upload date:
  • Size: 112.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for tune_dms-0.1.6.tar.gz
Algorithm Hash digest
SHA256 c502577b8cde01ac9a17c4099af10da0c72b636878f580265f94a006a130a184
MD5 20ac4d2dcaeca0a9e8552c4b46253042
BLAKE2b-256 0fcaa7d25a496c9fe2c338ebbef21b296ba884252fb1d5f59876f4e4ffc9e2c3

See more details on using hashes here.

File details

Details for the file tune_dms-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: tune_dms-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 124.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for tune_dms-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 a5c7b6b8780ab21e8c377b630e0164c14f123e9bc578da780bdb79e922ac7203
MD5 239c83245e7b2ef9409818d8d91390f4
BLAKE2b-256 a165fc74580a561ad1ffc2b92c7b30e7ac5d96bd23f2f8ff9ba338e81fa2c77a

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