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.4.tar.gz (62.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.4-py3-none-any.whl (1.8 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sentry_script_runner-0.2.4.tar.gz
  • Upload date:
  • Size: 62.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.4.tar.gz
Algorithm Hash digest
SHA256 5c84e3e2ac3ed382d39cba869dec46bd3a412d343866bae694905e2165abfa07
MD5 e2791ff8128a4dcf27ec58e98ed4c4ef
BLAKE2b-256 a1e642cd356f07b209b3cc9e47141438375dd0124642555bc6620accadc9595c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sentry_script_runner-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 1ae175524b98861ac5de3d0e620763bfcd283e6d6db3c90a75573ef5f502c34b
MD5 dc22991a0b95a032239f2bac8c350b34
BLAKE2b-256 ca0166f30fbbc8e098ebce5d15697d32376db1a71b5c426ee10118e1c515329f

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