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

Uploaded Python 3

File details

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

File metadata

  • Download URL: sentry_script_runner-0.2.2.tar.gz
  • Upload date:
  • Size: 61.7 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.2.tar.gz
Algorithm Hash digest
SHA256 c15d9ce5b372173612512cd541ef403e8a1d4005c5fd229a91f8b9941b4fa89b
MD5 e242eda727faa735e72b9aaccb621d5c
BLAKE2b-256 f36c720a3dfd47da19bb62939d8de4b44a5ff04f3db17e5a52b2d7aa4fbc7967

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sentry_script_runner-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f98fdf6f86abb43d95ec5c7bd2b8e2ed5c9caec851403f534e3a44e2357719a2
MD5 4bdce3d4c7c8ab8f6a70dbf9f806819b
BLAKE2b-256 1d1b9805885aacf65e6193667ce722f6cd90dad0e75a44e1a13702d4cd62b836

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