fc-python-website
Build and deploy a Python website or HTTP app on function-compute (Aliyun FC 3.0, runtime python3.12).
Skill by Reyvic925
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/reyvic925-fc-python-website
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: documents, backend, devops, agent-building
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/fc-python-website
What's inside
- Skill name
fc-python-website- Description
- Build and deploy a Python website or HTTP app on function-compute (Aliyun FC 3.0, runtime python3.12). Covers the index.handler contract, index.py at the zip root, reading the raw-bytes HTTP event (json.loads, rawPath, requestContext.http.method), and the /functionCompute API to create an environment="python" function and upload code to LATEST (a human publishes). Use when an Agent must host or deploy Python code on function-compute. 在 function-compute(阿里云 FC 3.0,运行时 python3.12)上构建并部署 Python 网站或 HTTP 应用。涵盖 index.handler 约定、zip 根目录放 index.py、读取原始 bytes 请求事件 (json.loads、rawPath、requestContext.http.method),以及创建 environment="python" 函数并上传代码到 LATEST 的 /functionCompute API(由人工发布)。当 Agent 需要在 function-compute 上托管或部署 Python 代码时使用。
- License
- MIT
- Instructions
- 332 lines in SKILL.md · view on GitHub
Before installing
- Instructions call the network
Files (2)
- .bundled-hash
- SKILL.md
SKILL.md (first lines)
# Deploy a Python App on Function-Compute / 在函数计算上部署 Python 应用
## AutoClaw managed-delivery boundary (highest priority) / 受控交付边界(最高优先级)
When `website_delivery_start` or `AUTOCLAW_FUNCTION_COMPUTE_WEBSITE_PROTOCOL`
is active, **do not call `/functionCompute`, read/request/store/output a JWT, or
execute this Skill's curl commands.** API sections are reference-only. Build,
package, and verify the artifact locally; AutoClaw Main owns create/upload, and
the human owns publication. The current managed automatic-preview path supports
nginx only, so do not add an nginx `autoPreview` marker for a Python package.
当 `website_delivery_start` 或 `AUTOCLAW_FUNCTION_COMPUTE_WEBSITE_PROTOCOL`
生效时,**禁止调用 `/functionCompute`、读取/索取/保存/输出 JWT,禁止执行本 Skill 的 curl。**
API 章节仅作参考;Agent 只负责本地构建、打包与验证,创建和上传由 AutoClaw Main 负责,
正式发布由用户负责。当前自动预览仅支持 nginx,Python 产物不得写 nginx `autoPreview` 标记。
## Standalone API reference (not managed delivery) / 独立 API 参考(不适用于受控交付)
1. Write `index.py` exporting `def handler(event, context)` that returns
`{"statusCode", "headers", "body"}`.
2. Zip it with `index.py` **at the root** of the archive.
3. `POST /functionCompute/functions` with `{"environment":"python","name":"..."}` → get `id`.
4. `POST /functionCompute/functions/{id}/code` with `{"zip_base64":"<base64>"}` → your code is now live at **`preview_url`**.
5. Verify on `preview_url`. **You (the Agent) stop here.** The human clicks **Publish** in the UI to promote it to `stable_url`.
中文速览:
1. 编写 `index.py`,导出 `def handler(event, context)`,返回 `{"statusCode","headers","body"}`。
2. 打成 zip,`index.py` 必须在压缩包**根目录**。
3. `POST /functionCompute/functions`,body 为 `{"environment":"python","name":"..."}`,拿到 `id`。
4. `POST /functionCompute/functions/{id}/code`,body 为 `{"zip_base64":"<base64>"}`,代码即刻在 **`preview_url`** 可见。
5. 在 `preview_url` 自测。**Agent 到此为止**,由人工在 UI 点击 **Publish**,才会推送到 `stable_url`。
---
## 1. The Python environment / Python 运行环境
**English.** The `python` environment maps to the Aliyun Function Compute 3.0
**built-in runtime `python3.12`**. It uses FC's built-in HTTP handler: FC
receives the HTTP request, invokes your `handler`, and turns the returned dict
into the HTTP response. You do **not** open a socket or bind a port yourself —
that is only for custom runtimes (nginx / next.js). Your uploaded code is
extracted to **`/code`** inside the instance; `/code` is the working directory
and is on the import path.
Fixed resource preset (from the repo, do not assume you can change these):
| Property | Value |
|---|---|
| Runtime | `python3.12` |
| Handler | `index.handler` (file `index.py`, function `handler`) |
| CPU | 0.35 vCPU |
| Memory | 512 MB |
| Disk | 512 MB |
| Timeout | 60 s per request |
| Instance concurrency | 1 |
| Code location | extracted to `/code` |
| Max upload zip | 50 MB (base64 body) |
**中文。** `python` 环境对应阿里云函数计算 3.0 的**内置运行时 `python3.12`**,
使用 FC 内置 HTTP 处理器:FC 接收 HTTP 请求,调用你的 `handler`,并把返回的
字典转换成 HTTP 响应。你**不需要**自己监听端口或开 socket(那是 nginx /
next.js 等自定义运行时才做的)。上传的代码会解压到实例内的 **`/code`**,
`/code` 即工作目录,也在模块导入路径上。
资源规格是固定的(来自仓库预设,不要假设可以修改):运行时 `python3.12`、
处理器 `index.handler`、CPU 0.35 核、内存 512 MB、磁盘 512 MB、单次请求
超时 60 秒、单实例并发 1、代码解压到 `/code`、上传 zip 上限 50 MB。
### Constraints to respect / 需要遵守的约束
- **Handler name is fixed.** It must be `index.handler` → file `index.py`, function `handler`. Do not rename.
- **Return a dict**, not a string. Keys: `statusCode` (int), `headers` (dict), `body` (str). Missing `statusCode` will error.
- **Requests over 60 s are killed.** Keep handlers fast; do not run long background loops.
- **512 MB memory / disk.** Vendor only the wheels you need. Large ML models will not fit.
- **Instance concurrency is 1** — one request per instance at a time; FC scales out with more instances.
- 处理器名称固定为 `index.handler`;必须返回字典(含 `statusCode`);单次请求超过 60 秒会被终止;内存/磁盘各 512 MB;单实例并发为 1。
---
## 2. File-structure contract / 文件结构约定
The zip you upload must have `index.py` **at the top level** (not inside a
subfolder). Third-party packages must be vendored **beside** `index.py`
(install with `pip install -t .`), because there is no build step on upload.
```
mysite.zip
├── index.py # REQUIRED, at root, defines handler(event, context)
├── requirements deps # optional: vendored packages next to index.py
│ └── ... (e.g. jinja2/, markupsafe/)
└── static/ # optional: your own assets you read from /code/static
```
上传的 zip 必须把 `index.py` 放在**最顶层**(不能在子目录里)。第三方依赖要
用 `pip install -t .` 装到 `index.py` **同级**目录,因为上传时没有构建步骤。
---
## 3. Minimal working example / 最小可运行示例
This is the exact starter that ships with the environment. Copy it verbatim as
`index.py` and it will serve HTML immediately.
```python
# index.py
def handler(event, context):
return {
"statusCode": 200,
"headers": {"content-type": "text/html"},
"body": "<html><body><h1>Hello from Function Compute (Python)</h1></body></html>",
}
```
### Reading the request / 读取请求
For the built-in HTTP handler, `event` arrives as **raw `bytes`** — a
JSON-encoded description of the HTTP request. You **must** `json.loads(event)`
to get a dict; there is no pre-parsed dict handed to you. The parsed object hasFrom Reyvic925/tradingwebsite, MIT.
More from Reyvic925/tradingwebsite
- 0.524score
fc-java-website
Reyvic925
Build and deploy a Java website/app on function-compute (Aliyun FC 3.0 built-in java11 runtime, handler example.App::handleRequest).
SkillBFreshness: BClaude Code +9 - 0.524score
fc-nextjs-website
Reyvic925
Build, package, and deploy a Next.js SSR/SSG app on function-compute's "nextjs" environment — Aliyun FC custom runtime (custom.debian10, Node.js 20), started…
SkillBFreshness: BClaude Code +9 - 0.524score
fc-nginx-website
Reyvic925
Build, package, and deploy a static website (HTML/CSS/JS/images or any pre-built SPA output) on the function-compute service's "nginx" environment, which runs…
SkillBFreshness: BClaude Code +9 - 0.524score
fc-nodejs-website
Reyvic925
Build and deploy a Node.js website/app on the function-compute service (Aliyun FC 3.0 built-in nodejs20 runtime).
SkillBFreshness: BClaude Code +9 - 0.515score
autoclaw-mcp-tools
Reyvic925
Use when users ask to access configured MCP services, external data providers, stocks, funds, macro data, news, files, databases, or mention mcporter/MCP tools.
SkillBFreshness: BClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Aug 19, 2026 (2 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/Reyvic925/tradingwebsite
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from Reyvic925
- 0.524score
fc-java-website
Reyvic925
Build and deploy a Java website/app on function-compute (Aliyun FC 3.0 built-in java11 runtime, handler example.App::handleRequest).
SkillBFreshness: BClaude Code +9 - 0.524score
fc-nextjs-website
Reyvic925
Build, package, and deploy a Next.js SSR/SSG app on function-compute's "nextjs" environment — Aliyun FC custom runtime (custom.debian10, Node.js 20), started…
SkillBFreshness: BClaude Code +9 - 0.524score
fc-nginx-website
Reyvic925
Build, package, and deploy a static website (HTML/CSS/JS/images or any pre-built SPA output) on the function-compute service's "nginx" environment, which runs…
SkillBFreshness: BClaude Code +9 - 0.524score
fc-nodejs-website
Reyvic925
Build and deploy a Node.js website/app on the function-compute service (Aliyun FC 3.0 built-in nodejs20 runtime).
SkillBFreshness: BClaude Code +9 - 0.515score
autoclaw-mcp-tools
Reyvic925
Use when users ask to access configured MCP services, external data providers, stocks, funds, macro data, news, files, databases, or mention mcporter/MCP tools.
SkillBFreshness: BClaude Code +9
Cite this page
fc-python-website skill. Agent Mart. https://agentmart.dev/skills/reyvic925-fc-python-website (last updated 2026-10-24)