Skip to content

Commit 2102e36

Browse files
authored
Merge pull request #1299 from tpmccallum/python-version
Update documentation to clarify Python version required
2 parents 52c8d6b + 54fd463 commit 2102e36

11 files changed

+108
-1
lines changed

content/api/hub/template_http_python.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,16 @@ keywords = "web app, http, api"
1818

1919
---
2020

21+
## Prerequisite
22+
23+
Ensure that you have Python 3.10 or later installed on your system. You can check your Python version by running:
24+
25+
```bash
26+
python3 --version
27+
```
28+
29+
If you do not have Python 3.10 or later, you can install it by following the instructions [here](https://www.python.org/downloads/).
30+
2131
This is the default HTTP trigger template for Python. It installs by default with the [Spin install script](https://developer.fermyon.com/spin/install#installing-spin).
2232

2333
This guide walks you through how to use it: [Structure of a Python Component](https://developer.fermyon.com/spin/python-components#structure-of-a-python-component)

content/cloud/develop.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,14 @@ Installing template http-ts...
126126

127127
{{ startTab "Python" }}
128128

129+
Ensure that you have Python 3.10 or later installed on your system. You can check your Python version by running:
130+
131+
```bash
132+
python3 --version
133+
```
134+
135+
If you do not have Python 3.10 or later, you can install it by following the instructions [here](https://www.python.org/downloads/).
136+
129137
<!-- @selectiveCpy -->
130138

131139
```bash

content/cloud/github-actions.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,14 @@ github-actions-tutorial already contains other files. Generate into it anyway? [
8585

8686
{{ startTab "Python" }}
8787

88+
Ensure that you have Python 3.10 or later installed on your system. You can check your Python version by running:
89+
90+
```bash
91+
python3 --version
92+
```
93+
94+
If you do not have Python 3.10 or later, you can install it by following the instructions [here](https://www.python.org/downloads/).
95+
8896
<!-- @selectiveCpy -->
8997

9098
```bash

content/cloud/variables.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,14 @@ This tutorial will guide you through the process of creating a simple applicatio
2424

2525
Before starting, ensure that you have Spin v1.3.0 or greater installed on your computer. You can follow the official Fermyon Cloud Quickstart guide to [install Spin](/cloud/quickstart#install-spin) and [log into Fermyon Cloud](/cloud/quickstart#log-in-to-the-fermyon-cloud).
2626

27+
Ensure that you have Python 3.10 or later installed on your system. You can check your Python version by running:
28+
29+
```bash
30+
python3 --version
31+
```
32+
33+
If you do not have Python 3.10 or later, you can install it by following the instructions [here](https://www.python.org/downloads/).
34+
2735
Since this example is written in Python, make sure you have the required tools installed to write Spin applications in Python. The Spin CLI facilitates the creation of new Spin applications using application [templates](/cloud/cli-reference#templates). In this tutorial, we will use the `http-py` template that provides a `requirements.txt` file to handle dependencies:
2836

2937
<!-- @selectiveCpy -->

content/spin/v2/ai-sentiment-analysis-api-tutorial.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,14 @@ $ spin templates install --git https://github.com/fermyon/spin-js-sdk --upgrade
6363

6464
**Python**
6565

66+
Ensure that you have Python 3.10 or later installed on your system. You can check your Python version by running:
67+
68+
```bash
69+
python3 --version
70+
```
71+
72+
If you do not have Python 3.10 or later, you can install it by following the instructions [here](https://www.python.org/downloads/).
73+
6674
Some of the Serverless AI examples are written using Python. To enable Serverless AI functionality via Python, please ensure you have the latest Python template installed:
6775

6876
<!-- @selectiveCpy -->

content/spin/v2/build.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,14 @@ command = "npm run build"
100100

101101
{{ startTab "Python" }}
102102

103+
Ensure that you have Python 3.10 or later installed on your system. You can check your Python version by running:
104+
105+
```bash
106+
python3 --version
107+
```
108+
109+
If you do not have Python 3.10 or later, you can install it by following the instructions [here](https://www.python.org/downloads/).
110+
103111
For Python applications, you must have [`componentize-py`](https://pypi.org/project/componentize-py/) installed:
104112

105113
<!-- @selectiveCpy -->

content/spin/v2/key-value-store-tutorial.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ url = "https://github.com/fermyon/developer/blob/main/content/spin/v2/key-value-
88
---
99
- [Key Value Store With Spin Applications](#key-value-store-with-spin-applications)
1010
- [Tutorial Prerequisites](#tutorial-prerequisites)
11+
- [Python](#python)
1112
- [Creating a New Spin Application](#creating-a-new-spin-application)
1213
- [Configuration](#configuration)
1314
- [The Spin TOML File](#the-spin-toml-file)
@@ -38,7 +39,17 @@ First, follow [this guide](./install.md) to install Spin. To ensure you have the
3839
$ spin --version
3940
```
4041

41-
> Please ensure you're on version 2.0 or newer.
42+
> Please ensure you're on Spin version 2.0 or newer.
43+
44+
### Python
45+
46+
If you are planning on using Python for this tutorial, please ensure that you have Python 3.10 or later installed on your system. You can check your Python version by running:
47+
48+
```bash
49+
python3 --version
50+
```
51+
52+
If you do not have Python 3.10 or later, you can install it by following the instructions [here](https://www.python.org/downloads/).
4253

4354
## Creating a New Spin Application
4455

content/spin/v2/python-components.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ date = "2023-11-04T00:00:01Z"
55
url = "https://github.com/fermyon/developer/blob/main/content/spin/v2/python-components.md"
66

77
---
8+
- [Prerequisite](#prerequisite)
89
- [Componentize-Py](#componentize-py)
910
- [Spin's Python HTTP Request Handler Template](#spins-python-http-request-handler-template)
1011
- [Creating a New Python Component](#creating-a-new-python-component)
@@ -34,6 +35,16 @@ With <a href="https://www.python.org/" target="_blank">Python</a> being a very p
3435
3536
[**Want to go straight to the Spin SDK reference documentation?** Find it here.](https://fermyon.github.io/spin-python-sdk)
3637

38+
## Prerequisite
39+
40+
Ensure that you have Python 3.10 or later installed on your system. You can check your Python version by running:
41+
42+
```bash
43+
python3 --version
44+
```
45+
46+
If you do not have Python 3.10 or later, you can install it by following the instructions [here](https://www.python.org/downloads/).
47+
3748
## Componentize-Py
3849

3950
The Python SDK is built using [`componentize-py`](https://github.com/bytecodealliance/componentize-py). It is a [Bytecode Alliance](https://bytecodealliance.org/) project that allows converting a Python application to a WebAssembly component. It can be installed using the following command:
@@ -519,3 +530,11 @@ Please note, this error is specific to Homebrew-installed Python installations a
519530
- use the `--break-system-packages` option in your `pip3 install` command i.e. `pip3 install -r requirements.txt --break-system-packages`
520531

521532
We recommend installing a virtual environment using `venv`, as shown in the [system housekeeping section](#system-housekeeping-use-a-virtual-environment) above.
533+
534+
For all Python examples, please ensure that you have Python 3.10 or later installed on your system. You can check your Python version by running:
535+
536+
```bash
537+
python3 --version
538+
```
539+
540+
If you do not have Python 3.10 or later, you can install it by following the instructions [here](https://www.python.org/downloads/).

content/spin/v2/quickstart.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,14 @@ $ spin plugins install js2wasm --yes
211211

212212
{{ startTab "Python" }}
213213

214+
Ensure that you have Python 3.10 or later installed on your system. You can check your Python version by running:
215+
216+
```bash
217+
python3 --version
218+
```
219+
220+
If you do not have Python 3.10 or later, you can install it by following the instructions [here](https://www.python.org/downloads/).
221+
214222
You'll install all the required Python tools as part of building the application. We'll cover that in the Build Your Application section below. For now, there's nothing to do here!
215223

216224
[Learn more in the language guide.](python-components)

content/spin/v2/serverless-ai-hello-world.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,15 @@ $ spin templates install --git https://github.com/fermyon/spin-js-sdk --upgrade
5555

5656
**Python**
5757

58+
Ensure that you have Python 3.10 or later installed on your system. You can check your Python version by running:
59+
60+
```bash
61+
python3 --version
62+
```
63+
64+
If you do not have Python 3.10 or later, you can install it by following the instructions [here](https://www.python.org/downloads/).
65+
66+
5867
To enable Serverless AI functionality via Python, please ensure you have the latest Python template installed:
5968

6069
<!-- @selectiveCpy -->

0 commit comments

Comments
 (0)