Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 
 
 
 

1.5 KiB

Python scripts for FPSMS backend

This folder holds Python programs that integrate with the FPSMS backend (e.g. calling the public /py API).

Setup

cd python
pip install -r requirements.txt

Configuration

Set the backend base URL (optional, default below):

  • Environment: FPSMS_BASE_URL (default: http://localhost:8090/api — includes context path /api)
  • Or edit the default in each script.

Scripts

Script Description
Bag1.py GUI: date selector (default today) and job orders as buttons; click shows “Clicked on Job Order code XXXX item xxxx”. Run: python Bag1.py
fetch_job_orders.py CLI: fetches job orders by plan date from GET /py/job-orders

Building Bag1 as a standalone .exe

To distribute Bag1 to customer PCs without giving them source code or requiring Python:

  1. On your development PC (with Python installed), open a terminal in the python folder.

  2. Install build dependencies:

    pip install -r requirements-build.txt
    
  3. Run the build script:

    build_exe.bat
    

    Or run PyInstaller directly:

    pyinstaller --onefile --windowed --name Bag1 Bag1.py
    
  4. The executable is created at dist\Bag1.exe. Copy only Bag1.exe to the customer computer and run it; no Python or source code is needed. The app will save its settings (bag1_settings.json) in the same folder as the exe.

Adding new scripts

Add new .py files here and list them in this README. Use requirements.txt for any new dependencies.