百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
D

dify-sandbox-py

> 编程语言
开源

一个与官方沙箱 API 调用和依赖安装兼容的 Dify 代码执行器。

394 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

一个与官方沙箱 API 调用和依赖安装兼容的 Dify 代码执行器。

DIFY-SANDBOX-PY

English | 中文

A code executor for Dify that is compatible with the official sandbox API calls and dependency installation.

  • Supports Python 3.12
  • Supports Node.js 20

Purpose

While the official sandbox has many permission settings and is a better sandboxing solution, in personal use cases where Dify's code nodes are entirely self-edited, there's no risk of code injection. This project aims to provide broader permissions and support for more dependencies (like numpy>2.0, matplotlib, scikit-learn) to reduce confusing error messages. This code was developed by referencing the official sandbox's API call examples.

Usage

In the official docker-compose.yaml, locate the sandbox image section and replace it with:

  sandbox:
    # image: langgenius/dify-sandbox:0.2.10
    image: svcvit/dify-sandbox-py:0.1.4

If you prefer to build the image yourself, you can clone this repository and run:

bash
docker build -t dify-sandbox-py:local .

Then modify the sandbox image in docker-compose.yaml to use dify-sandbox-py:local

Screenshots

Python support

Node.js support

Docker container logs

Notes

  • Network access restrictions have been removed; network access is enabled by default
  • Using UV as the dependency manager for faster package installation, allowing millisecond-level dependency installation on restart
  • Third-party dependencies can be installed following the official method: simply add required dependencies to /docker/volumes/sandbox/dependencies/python-requirements.txt and restart the sandbox
  • The image only contains FastAPI-related dependencies. Any additional dependencies you need must be manually added to python-requirements.txt

Issues· 5 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Pythondifysandbox

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言