Skip to main content

A web application for running Python scripts.

Project description

script-runner

Run Python scripts on production data.

This application can run in either combined or multi-region mode.

For multi-region mode, set mode: region for region, and mode: main for the main deployment. mode: combined runs both together.

Example data:

  • These are in the examples/scripts directory
  • You can generate data for the examples via make generate-example-data

Configuration

Runs in combined, main and region mode. Combined is mostly for dev and testing.

check config.schema.json

Development Setup

To run the application locally for development, you need to start both the backend (Flask) and frontend (Vite) servers in separate terminals.

1. Start the Backend Server:

  • Navigate to the project root directory (script-runner).
  • Activate the Python virtual environment (e.g., source .venv/bin/activate).
  • Set the configuration file path environment variable (replace with your actual config file):
    export CONFIG_FILE_PATH="example_config_main.yaml"
    
  • Run the Flask development server:
    flask --app script_runner.app run
    
  • The backend should now be running (typically on http://127.0.0.1:5000).

2. Start the Frontend Server:

  • Open a separate terminal.
  • Navigate to the frontend directory:
    cd script_runner/frontend
    
  • Install dependencies if you haven't already:
    npm install
    
  • Run the Vite development server:
    npm run dev
    
  • The frontend should now be running (typically on http://localhost:5173) and will automatically proxy API requests to the backend thanks to the proxy configured in vite.config.ts.

Accessing the App:

Open your browser and navigate to the frontend URL (e.g., http://localhost:5173).

Stopping the Servers:

Press Ctrl + C in each terminal window.

(Optional) Using Make:

This project may contain a Makefile with a command to simplify this process (e.g., make devserver). Check the Makefile content; if available, this command might start both servers for you.

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

sentry_script_runner-0.2.0.tar.gz (61.5 kB view details)

Uploaded Source

Built Distribution

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

sentry_script_runner-0.2.0-py3-none-any.whl (1.8 MB view details)

Uploaded Python 3

File details

Details for the file sentry_script_runner-0.2.0.tar.gz.

File metadata

  • Download URL: sentry_script_runner-0.2.0.tar.gz
  • Upload date:
  • Size: 61.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.2

File hashes

Hashes for sentry_script_runner-0.2.0.tar.gz
Algorithm Hash digest
SHA256 c4405b1637e0332131031388078d56e02a9030a326811329e309bb3d41742ca5
MD5 5dbb43f7a1095333db6766072a9f7e07
BLAKE2b-256 67631b4de28ce20368d7779539e810975ac569ecf0b6e4b2d1d6faa9c0f9ce11

See more details on using hashes here.

File details

Details for the file sentry_script_runner-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for sentry_script_runner-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e587ca85f7498b2bb99ea513d7fc4d862a42c7430230c8156d483460ac565c04
MD5 85247a6bf71570d7735618977a33a7f3
BLAKE2b-256 13b7951522b8b72629bdeec5888b691af55a4390cfd640e5a7f50406d7614f3e

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