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.3.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.3-py3-none-any.whl (1.8 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sentry_script_runner-0.2.3.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.3.tar.gz
Algorithm Hash digest
SHA256 78e6130cc0a9124f5492e8cb0f42acae608c67af023af2feac4f1eb82128cda8
MD5 f785d4651c0db0bc093294dd4b3039e8
BLAKE2b-256 dde66d42413fdc6a5d79e6135de5dda2a659fd62ca1fb331b276371ac39e0dbf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sentry_script_runner-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 348e59b229c7b25e2bd14450e4f9c8a29ac1c415ecd882b15ef30e06584e880a
MD5 79de1336d44c94c43f645750c1bf2c62
BLAKE2b-256 92823edd27081e360d2fedb5fde9012a38637a88bd27a325e28b079c90b85494

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