Skip to content

Commit d1af883

Browse files
authored
Refresh Python quickstart for Python 3.12 (#142)
* Refresh Python quickstart for Python 3.12 * Clarify Python command guidance * Use standard python docs commands --------- Co-authored-by: Dex the DevEx Assistant <dex-the-ai@users.noreply.github.com>
1 parent f715525 commit d1af883

4 files changed

Lines changed: 10 additions & 8 deletions

File tree

.github/workflows/tests.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,13 @@ jobs:
2020
run: |
2121
apt update || echo "apt-update failed" # && apt -y upgrade
2222
- uses: actions/checkout@v3
23-
- name: Setup Python
23+
- uses: actions/setup-python@v5
24+
with:
25+
python-version: '3.12'
26+
- name: Setup Python dependencies
2427
run: |
25-
sudo apt -y update
26-
sudo apt -y install python3-pip python3-testresources
2728
cd src
29+
python -m pip install --upgrade pip
2830
python -m pip install -r requirements.txt
2931
- name: Setup app
3032
run: |

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ To run this prebuilt project, you will need:
1717

1818
- [Couchbase Capella](https://www.couchbase.com/products/capella/) cluster with [travel-sample](https://docs.couchbase.com/python-sdk/current/ref/travel-app-data-model.html) bucket loaded.
1919
- To run this tutorial using a self managed Couchbase cluster, please refer to the [appendix](#running-self-managed-couchbase-cluster).
20-
- [Python](https://www.python.org/downloads/) 3.9 or higher installed
20+
- [Python](https://www.python.org/downloads/) 3.10 or higher installed
2121
- Ensure that the Python version is [compatible](https://docs.couchbase.com/python-sdk/current/project-docs/compatibility.html#python-version-compat) with the Couchbase SDK.
2222
- Loading Travel Sample Bucket
2323
If travel-sample is not loaded in your Capella cluster, you can load it by following the instructions for your Capella Cluster:
@@ -37,13 +37,13 @@ git clone https://github.com/couchbase-examples/python-quickstart.git
3737

3838
The dependencies for the application are specified in the `requirements.txt` file in the source folder. Dependencies can be installed through `pip` the default package manager for Python.
3939

40-
> Note: If your Python is not symbolically linked to python3, you need to run all commands using `python3` instead of `python`.
41-
4240
```shell
4341
cd src
4442
python -m pip install -r requirements.txt
4543
```
4644

45+
> Note: If your environment only provides a `python3` executable, substitute `python3` in the commands below.
46+
4747
> Note: Python SDKs older than version 4.1.9 require OpenSSL v1.1. This might not be the default in some newer platforms. In such scenarios, please install the SDK without using the prebuilt wheels
4848
4949
> `python -m pip install couchbase --no-binary couchbase`

src/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM python:3.9-slim-bullseye
1+
FROM python:3.12-slim-bookworm
22

33
WORKDIR /app
44

src/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
couchbase==4.6.1
2-
flask_restx==1.3.0
2+
flask_restx==1.3.2
33
pytest==9.0.3
44
python-dotenv==1.2.2
55
requests==2.33.1

0 commit comments

Comments
 (0)