Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Python/uv artifacts
.venv/
*.egg-info
uv.lock

/stubs/
__pycache__
Expand Down
5 changes: 2 additions & 3 deletions examples/flask-app.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# Import and install WASI shims before importing Flask
from shims import install_shims

install_shims()
import sys

# Now we can import Flask and Fastly Compute modules
from flask import Flask, request # noqa: E402
Expand Down Expand Up @@ -31,6 +29,7 @@ def info():
"vcpu_time_ms": vcpu_time,
"request_method": request.environ.get("REQUEST_METHOD"),
"path_info": request.environ.get("PATH_INFO"),
"python_version": sys.version,
}


Expand Down
100 changes: 0 additions & 100 deletions examples/shims.py

This file was deleted.

4 changes: 4 additions & 0 deletions fastly_compute/wsgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
by adapting between the Fastly WIT API and the WSGI specification.
"""

# The IDNA encoding is used by werkzeug (used by flask and others doing wsgi); without
# a top-level import componentize-py won't include the encoding in our final artifact
# and we get runtime LookupErrors when werkzeug tries to use the codec.
import encodings.idna # noqa: F401
import sys
import traceback
from collections.abc import Callable
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ requires-python = ">=3.12"
dependencies = [
"bottle",
"flask",
"componentize-py",
"componentize-py (>=0.18.0,<0.19.0)",
]

[project.optional-dependencies]
Expand Down
Loading