惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Hacker News - Newest:
Hacker News - Newest: "LLM"
Webroot Blog
Webroot Blog
S
Security @ Cisco Blogs
H
Heimdal Security Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
www.infosecurity-magazine.com
www.infosecurity-magazine.com
N
News and Events Feed by Topic
H
Hacker News: Front Page
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Application and Cybersecurity Blog
Application and Cybersecurity Blog
SecWiki News
SecWiki News
N
News | PayPal Newsroom
T
Tor Project blog
W
WeLiveSecurity
A
Arctic Wolf
Security Archives - TechRepublic
Security Archives - TechRepublic
S
Secure Thoughts
月光博客
月光博客
AWS News Blog
AWS News Blog
D
Docker
C
CERT Recently Published Vulnerability Notes
MyScale Blog
MyScale Blog
Google Online Security Blog
Google Online Security Blog
大猫的无限游戏
大猫的无限游戏
T
The Blog of Author Tim Ferriss
I
InfoQ
人人都是产品经理
人人都是产品经理
Recent Announcements
Recent Announcements
Google DeepMind News
Google DeepMind News
Hacker News: Ask HN
Hacker News: Ask HN
Blog — PlanetScale
Blog — PlanetScale
博客园 - 【当耐特】
Engineering at Meta
Engineering at Meta
Stack Overflow Blog
Stack Overflow Blog
Recorded Future
Recorded Future
罗磊的独立博客
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
T
The Exploit Database - CXSecurity.com
D
DataBreaches.Net
S
Security Affairs
WordPress大学
WordPress大学
T
Threatpost
Microsoft Security Blog
Microsoft Security Blog
V
Vulnerabilities – Threatpost
The Hacker News
The Hacker News
S
SegmentFault 最新的问题
B
Blog RSS Feed
Project Zero
Project Zero
P
Proofpoint News Feed

Fastly Blog

Fastly Fastly Fastly Fastly Fastly Fastly Fastly Fastly Fastly Fastly Fastly Fastly Fastly Fastly Six Common Live Streaming Mistakes (And How to Avoid Them) How Fastly and Skyfire Enable Trusted Agentic Commerce at the Edge Bot Defense is Table Stakes. Machine Traffic Requires a Business Strategy AI Traffic Grew 6.5x Faster Than Human Traffic This Year Give AI Agents the Markdown They Actually Want How to Configure Local Logging for an On-Prem Next-Gen WAF Agent Accountability Without Control Is Breaking Security Leadership Fastly Joins the Agentic AI Foundation (AAIF) to Guide Edge AI Interoperability The E-commerce Industry in the AI Era: Has the Agentic Flood Hit? No Margin for Error: What the FIFA World Cup Teaches Us About Performance at the Edge Why iGaming Infrastructure is Breaking and What Comes Next
Python SDK Beta: How the Language of AI Runs Faster and Safer with Fastly
Erik Rose, Ajay Bharadwaj, Terri Allegretto · 2026-06-03 · via Fastly Blog

Staff Engineer - WebAssembly

Your backends are written in Python. You’re building AI agents in Python. Wouldn’t it make sense to write your edge code in Python too? Now you can, with the beta release of the Fastly Compute Python SDK

Because Fastly runs one of the largest, fastest, most secure networks in the world, we can give your growing body of Python code every possible advantage. Whether you are vibe-coding your first AI project, validating access control tokens, or doing something we haven’t yet imagined, this new SDK moves your Python to the network’s edge, close to your users. And it does so with industry-leading speed and security.

Standard CPython, Standard Frameworks

For maximum compatibility, we cross-compile standard CPython so it runs inside our isolated WebAssembly sandboxes. Then, we provide an adapter to run standard WSGI apps atop our high-performance HTTP implementation. If you use popular Python web frameworks like Flask — or even an unusual one, as long as it conforms to WSGI — your code can run on our edge nearly unmodified and feel fully idiomatic. Pure Python modules also work great right out of the box.

A simple hello-world Flask application running on Fastly Compute looks like this:

from fastly_compute.wsgi import WsgiHttpIncoming
from flask import Flask

app = Flask(__name__)

@app.route("/")
def hello_world():
    return "Hello from Python, living on the Fastly edge!"

# The only special line: register the Flask app as the recipient
# of incoming requests, using our WSGI adapter.
HttpIncoming = WsgiHttpIncoming(app)

How We Make Python Fast

If you caught our recent talk at Wasm I/O on Componentizing Fastly Compute, you know that getting runtime-heavy languages to perform well at the edge requires serious engineering work. We shook out a diverse bag of tricks to eliminate CPython’s typically slow startup and present the quickest possible performance to the end user.

  • Memory Snapshotting: In the common case, a great deal of Python code, like module top levels, executes at startup, introducing massive cold-start delays. Fastly completely bypasses this. We let Python do that execution at build time, then create a pre-initialized snapshot of memory. In production, we instantiate from this snapshot within microseconds, allowing it to start up even faster than ordinary Python on a local machine.

  • Data Loops at the Edge vs. The Cloud: For real-time applications and AI agents, proximity matters. If the use of your application involves a series of network round trips to the user — for instance, checking a context, calling a tool, then grabbing a secret — shuttling back and forth to a centralized cloud server kills performance. Keeping that data-orchestration loop localized near the user, care of Fastly’s edge network, keeps the experience snappy and the customer happy.

How We Make Python Secure

The conversation around AI has evolved significantly in a very short time. As we saw across the dedicated AI and Security tracks at PyCon 2026 last month, the focus has shifted from mere prompt engineering to moving autonomous, agentic workflows into production.

This introduces enormous engineering challenges because, as a very dynamic language, Python has historically been hard to sandbox. If you are running LLM-generated code that isn’t fully trustworthy, doing so inside your core infrastructure poses major security risks. Conversely, Fastly’s isolation model offers a bulletproof place to host that code. We isolate every single request execution into its own ephemeral WebAssembly sandbox.

If code does something unintended, whether a mistake or malice, the blast radius is limited to our network edge, completely out of reach from your critical backend infrastructure. In addition, many exploits, like the recent Copy Fail and its brethren, are impossible on our platform because the kernel API surface area is protected — not the case for typical container-based isolation.

How We Keep Python Beautiful

On Fastly, you don't have to write clunky cross-language wrapper code. By leveraging WebAssembly Components and the WIT IDL, we provide type-safe APIs that look, feel, and act like pure, modern Python, even though they mate up to high-performance native code on the backend.

Beyond the WSGI support mentioned earlier, we make additional HTTP requests familiar and quick by giving you a compatible implementation of the de-facto-standard requests library that delegates to our optimized network stack. Just import it like so…

from fastly_compute import requests

... and then use it to make HTTP calls as you normally would.

Current Caveats

Because this is a beta and because of our focus on security and speed, please keep these caveats in mind:

  • Native ML computation frameworks aren’t here yet. NumPy, SciPy, and Pandas need some additional work before they’ll run in our environment. Pure Python logic and any native extensions that support WASI are fair game today.

  • Top-level imports needed. So our memory-snapshotting build process can snag them, packages must be imported at the top level of some module. (If you have third-party code that uses inner imports, you can work around this by importing them at the top level elsewhere.)

  • No filesystem or threads. If you are loading templates off disk or using multiple threads within a web request, your code will need adjustment. There isn’t yet a virtual filesystem or that sort of parallelism within our sandboxes.

Get started today

Ready to bring your Python code to the edge? Here’s how to get started:

We encourage submitting pull requests or open issues on the GitHub repo. Let us know any Python packages that are giving you trouble, what you are building, and how we can refine the developer experience on our way to General Availability!