{"id":21811793,"url":"https://github.com/svcvit/dify-sandbox-py","last_synced_at":"2026-02-07T19:20:26.271Z","repository":{"id":263976300,"uuid":"891948724","full_name":"svcvit/dify-sandbox-py","owner":"svcvit","description":"A code executor for Dify that is compatible with the official sandbox API calls and dependency installation.","archived":false,"fork":false,"pushed_at":"2025-04-28T09:00:31.000Z","size":2662,"stargazers_count":233,"open_issues_count":0,"forks_count":51,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-04-28T10:25:11.996Z","etag":null,"topics":["dify","sandbox"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/svcvit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-11-21T08:46:09.000Z","updated_at":"2025-04-28T09:00:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"c0aa78a4-8df2-40df-aee0-16eb7f38c2dd","html_url":"https://github.com/svcvit/dify-sandbox-py","commit_stats":null,"previous_names":["svcvit/dify-sandbox-py"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/svcvit/dify-sandbox-py","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svcvit%2Fdify-sandbox-py","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svcvit%2Fdify-sandbox-py/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svcvit%2Fdify-sandbox-py/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svcvit%2Fdify-sandbox-py/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/svcvit","download_url":"https://codeload.github.com/svcvit/dify-sandbox-py/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svcvit%2Fdify-sandbox-py/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29205244,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-07T17:44:10.191Z","status":"ssl_error","status_checked_at":"2026-02-07T17:44:07.936Z","response_time":63,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dify","sandbox"],"created_at":"2024-11-27T14:00:53.377Z","updated_at":"2026-02-07T19:20:26.266Z","avatar_url":"https://github.com/svcvit.png","language":"Python","funding_links":[],"categories":["SANDBOX","2024-11-22更新"],"sub_categories":[],"readme":"# DIFY-SANDBOX-PY\n[English](README.md) | [中文](README_CN.md)\n\nA code executor for Dify that is compatible with the official sandbox API calls and dependency installation.\n- Supports Python 3.12\n- Supports Node.js 20\n\n## Purpose\nWhile 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\u003e2.0, matplotlib, scikit-learn) to reduce confusing error messages. This code was developed by referencing the official sandbox's API call examples.\n\n## Usage\nIn the official docker-compose.yaml, locate the sandbox image section and replace it with:\n```\n  sandbox:\n    # image: langgenius/dify-sandbox:0.2.10\n    image: svcvit/dify-sandbox-py:0.1.4\n```\n\nIf you prefer to build the image yourself, you can clone this repository and run:\n```\ndocker build -t dify-sandbox-py:local .\n```\nThen modify the sandbox image in `docker-compose.yaml` to use `dify-sandbox-py:local`\n\n## Screenshots\nPython support\n![](/images/Xnip2024-11-25_11-30-12.jpg)\nNode.js support\n![](/images/Xnip2024-11-25_11-31-01.jpg)\nDocker container logs\n![](/images/Xnip2025-04-28_16-48-48.jpg)\n\n\n## Notes\n- Network access restrictions have been removed; network access is enabled by default\n- Using UV as the dependency manager for faster package installation, allowing millisecond-level dependency installation on restart\n- 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\n- The image only contains FastAPI-related dependencies. Any additional dependencies you need must be manually added to python-requirements.txt","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsvcvit%2Fdify-sandbox-py","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsvcvit%2Fdify-sandbox-py","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsvcvit%2Fdify-sandbox-py/lists"}