[PR #3866] [CLOSED] feat: Add management and execution for python scripts in workspace #60200

Closed
opened 2026-05-06 02:51:23 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/3866
Author: @powerfooI
Created: 7/14/2024
Status: Closed

Base: devHead: feat/python-scripts-execution


📝 Commits (7)

📊 Changes

13 files changed (+1049 additions, -2 deletions)

View changed files

backend/apps/webui/internal/migrations/019_add_scripts.py (+57 -0)
📝 backend/apps/webui/main.py (+2 -0)
backend/apps/webui/models/scripts.py (+146 -0)
backend/apps/webui/routers/scripts.py (+189 -0)
📝 backend/migrations/env.py (+1 -0)
📝 package-lock.json (+14 -0)
📝 package.json (+2 -0)
src/lib/apis/scripts/index.ts (+162 -0)
src/lib/components/workspace/Scripts.svelte (+448 -0)
📝 src/lib/stores/index.ts (+3 -2)
📝 src/lib/types/index.ts (+11 -0)
📝 src/routes/(app)/workspace/+layout.svelte (+9 -0)
src/routes/(app)/workspace/scripts/+page.svelte (+5 -0)

📄 Description

Pull Request Checklist

Note to first-time contributors: Please open a discussion post in Discussions and describe your changes before submitting a pull request.

Before submitting, make sure you've checked the following:

  • Target branch: Please verify that the pull request targets the dev branch.
  • Description: Provide a concise description of the changes made in this pull request.
  • Changelog: Ensure a changelog entry following the format of Keep a Changelog is added at the bottom of the PR description.
  • Documentation: Have you updated relevant documentation Open WebUI Docs, or other documentation sources?
  • Dependencies: Are there any new dependencies? Have you updated the dependency versions in the documentation?
  • Testing: Have you written and run sufficient tests for validating the changes?
  • Code review: Have you performed a self-review of your code, addressing any coding standard issues and ensuring adherence to the project's coding standards?
  • Prefix: To cleary categorize this pull request, prefix the pull request title, using one of the following:
    • BREAKING CHANGE: Significant changes that may affect compatibility
    • build: Changes that affect the build system or external dependencies
    • ci: Changes to our continuous integration processes or workflows
    • chore: Refactor, cleanup, or other non-functional code changes
    • docs: Documentation update or addition
    • feat: Introduces a new feature or enhancement to the codebase
    • fix: Bug fix or error correction
    • i18n: Internationalization or localization changes
    • perf: Performance improvement
    • refactor: Code restructuring for better maintainability, readability, or scalability
    • style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc.)
    • test: Adding missing tests or correcting existing tests
    • WIP: Work in progress, a temporary label for incomplete or ongoing work

Changelog Entry

Description

This PR aims to address issue #3583, allowing users to manage python scripts and do some experiments (execute the python scripts) in their workspace.

Added

  • Workspace panel named Python Scripts with management and execution for user-scoped python scripts
  • A script table in database to store users' python scripts
  • API group for script management
  • Added two dev dependencies for better typing

Additional Information

  • Targets to issue #3583.

Screenshots or Videos

image

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/open-webui/open-webui/pull/3866 **Author:** [@powerfooI](https://github.com/powerfooI) **Created:** 7/14/2024 **Status:** ❌ Closed **Base:** `dev` ← **Head:** `feat/python-scripts-execution` --- ### 📝 Commits (7) - [`9bcd4ce`](https://github.com/open-webui/open-webui/commit/9bcd4ce5c0a01af68c0d2aa44554a68bb741c61b) Merge pull request #3559 from open-webui/dev - [`d506399`](https://github.com/open-webui/open-webui/commit/d50639971ab7b5351dff874d643c96904746399f) Merge pull request #3768 from open-webui/dev - [`3661dd1`](https://github.com/open-webui/open-webui/commit/3661dd16b80d536a57e322c5c926f9503b5cef5e) Merge pull request #3769 from open-webui/dev - [`2011cbd`](https://github.com/open-webui/open-webui/commit/2011cbd2105f0fb1aa14a7167d41260c3d736aef) Merge pull request #3773 from open-webui/dev - [`eff736a`](https://github.com/open-webui/open-webui/commit/eff736acd2e0bbbdd0eeca4cc209b216a1f23b6a) Merge pull request #3774 from open-webui/dev - [`42b706e`](https://github.com/open-webui/open-webui/commit/42b706e3f2e577132720a3da41b01c95990e44ac) feat: added management and execution for python scripts - [`f409d87`](https://github.com/open-webui/open-webui/commit/f409d87f24881530333e9c67fc023573e56e4652) chore: removed unused files ### 📊 Changes **13 files changed** (+1049 additions, -2 deletions) <details> <summary>View changed files</summary> ➕ `backend/apps/webui/internal/migrations/019_add_scripts.py` (+57 -0) 📝 `backend/apps/webui/main.py` (+2 -0) ➕ `backend/apps/webui/models/scripts.py` (+146 -0) ➕ `backend/apps/webui/routers/scripts.py` (+189 -0) 📝 `backend/migrations/env.py` (+1 -0) 📝 `package-lock.json` (+14 -0) 📝 `package.json` (+2 -0) ➕ `src/lib/apis/scripts/index.ts` (+162 -0) ➕ `src/lib/components/workspace/Scripts.svelte` (+448 -0) 📝 `src/lib/stores/index.ts` (+3 -2) 📝 `src/lib/types/index.ts` (+11 -0) 📝 `src/routes/(app)/workspace/+layout.svelte` (+9 -0) ➕ `src/routes/(app)/workspace/scripts/+page.svelte` (+5 -0) </details> ### 📄 Description # Pull Request Checklist ### Note to first-time contributors: Please open a discussion post in [Discussions](https://github.com/open-webui/open-webui/discussions) and describe your changes before submitting a pull request. **Before submitting, make sure you've checked the following:** - [x] **Target branch:** Please verify that the pull request targets the `dev` branch. - [x] **Description:** Provide a concise description of the changes made in this pull request. - [x] **Changelog:** Ensure a changelog entry following the format of [Keep a Changelog](https://keepachangelog.com/) is added at the bottom of the PR description. - [x] **Documentation:** Have you updated relevant documentation [Open WebUI Docs](https://github.com/open-webui/docs), or other documentation sources? - [x] **Dependencies:** Are there any new dependencies? Have you updated the dependency versions in the documentation? - [x] **Testing:** Have you written and run sufficient tests for validating the changes? - [x] **Code review:** Have you performed a self-review of your code, addressing any coding standard issues and ensuring adherence to the project's coding standards? - [x] **Prefix:** To cleary categorize this pull request, prefix the pull request title, using one of the following: - **BREAKING CHANGE**: Significant changes that may affect compatibility - **build**: Changes that affect the build system or external dependencies - **ci**: Changes to our continuous integration processes or workflows - **chore**: Refactor, cleanup, or other non-functional code changes - **docs**: Documentation update or addition - **feat**: Introduces a new feature or enhancement to the codebase - **fix**: Bug fix or error correction - **i18n**: Internationalization or localization changes - **perf**: Performance improvement - **refactor**: Code restructuring for better maintainability, readability, or scalability - **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc.) - **test**: Adding missing tests or correcting existing tests - **WIP**: Work in progress, a temporary label for incomplete or ongoing work # Changelog Entry ### Description This PR aims to address issue #3583, allowing users to manage python scripts and do some experiments (execute the python scripts) in their workspace. ### Added - Workspace panel named `Python Scripts` with management and execution for user-scoped python scripts - A `script` table in database to store users' python scripts - API group for `script` management - Added two dev dependencies for better typing ### Additional Information - Targets to issue #3583. ### Screenshots or Videos <img width="1052" alt="image" src="https://github.com/user-attachments/assets/2b082096-366b-44da-9994-9ad0c7432e01"> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-05-06 02:51:23 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#60200