New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

soc-executor

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

soc-executor

SOC工具执行器 - 执行本地Python文件并通过HTTP API提交

pipPyPI
Version
0.1.0
Maintainers
1

SOC Executor

SOC工具执行器 - 执行本地Python文件并通过HTTP API提交到SOC平台

功能特性

  • 读取本地Python脚本文件
  • 通过HTTP API提交代码到SOC平台执行
  • 支持环境变量配置
  • 命令行工具,使用简单
  • 支持传递JSON格式参数

安装

pip install soc-executor

使用方法

基本用法

# 执行Python文件
soc-executor script.py

# 使用 --file 参数
soc-executor --file /path/to/script.py

# 传递参数
soc-executor script.py --params '{"key": "value"}'

环境变量配置

export HTTP_BASE_URL="http://your-soc-server:port"
export HTTP_TOKEN="your-api-token"

示例

创建一个测试脚本 test_script.py:

def test_function():
    print("Hello from SOC executor!")
    return {"status": "success", "message": "Test completed"}

if __name__ == "__main__":
    result = test_function()
    print(result)

执行脚本:

soc-executor test_script.py

开发

使用 uv 进行开发环境管理:

# 安装开发依赖
uv sync --dev

# 运行测试
uv run pytest

# 构建包
uv run python -m build

许可证

MIT License

Keywords

soc

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts