{"id":21961726,"url":"https://github.com/longern/python-executor","last_synced_at":"2025-07-10T01:09:44.155Z","repository":{"id":97937631,"uuid":"321071468","full_name":"longern/python-executor","owner":"longern","description":"使用阿里云函数计算（Aliyun Function Compute）搭建的一个在线Python代码执行器","archived":false,"fork":false,"pushed_at":"2023-03-03T10:23:06.000Z","size":21,"stargazers_count":10,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-23T20:35:15.857Z","etag":null,"topics":["aliyun","python3","serverless"],"latest_commit_sha":null,"homepage":"https://itecha.longern.com/python-executor","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/longern.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":"2020-12-13T13:28:18.000Z","updated_at":"2024-07-22T17:13:26.000Z","dependencies_parsed_at":"2023-07-03T12:31:09.614Z","dependency_job_id":null,"html_url":"https://github.com/longern/python-executor","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/longern/python-executor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/longern%2Fpython-executor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/longern%2Fpython-executor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/longern%2Fpython-executor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/longern%2Fpython-executor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/longern","download_url":"https://codeload.github.com/longern/python-executor/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/longern%2Fpython-executor/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264507300,"owners_count":23619189,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["aliyun","python3","serverless"],"created_at":"2024-11-29T10:17:38.909Z","updated_at":"2025-07-10T01:09:44.144Z","avatar_url":"https://github.com/longern.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# python-executor\n\n使用阿里云函数计算（Aliyun Function Compute）搭建的一个在线 Python 代码执行器，带你几乎零成本体验 Serverless 技术。\n\n## 部署步骤\n\n### 创建函数\n\n前往阿里云，免费开通函数计算服务（选择后付费模式），创建服务和函数，语言选择 `python3`。\n\n### 自动部署\n\n使用 GitHub Action 可以将项目自动部署至函数计算。使用时需配置以下的环境变量：\n\n- `FUNCTION_COMPUTE_ARN`: 函数 ARN（在函数计算控制台右上角复制）\n- `ACCESS_KEY_ID`: 阿里云账号的 Access Key ID\n- `SECRET_ACCESS_KEY`：阿里云账号的 Access Key 密钥\n\n### 环境变量\n\n在“概览”页面，可以设置环境变量。推荐将 `TZ` 设置为 `Asia/Shanghai`，使得代码中读取到的时间为东八区时间（默认为 UTC 时间）。\n\n## 调用方法\n\n向部署后的 URL 发送 POST 请求，请求体格式为\n```\n{\n    \"source\": \u003cYour source code here\u003e,\n    \"input\": \u003cYour standard input here\u003e\n}\n```\n\n## 安全性\n\n阿里云函数计算每次运行都会创建一个新的容器，因此不需要担心运行危险的代码造成的环境破坏。但是要注意如果用户提交的代码访问公网会产生一定的费用，因此建议关闭函数计算的公网访问功能。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flongern%2Fpython-executor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flongern%2Fpython-executor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flongern%2Fpython-executor/lists"}