Skip to content
Open
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
8 changes: 5 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,13 @@ jobs:
run: |
apt update || echo "apt-update failed" # && apt -y upgrade
- uses: actions/checkout@v3
- name: Setup Python
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Setup Python dependencies
run: |
sudo apt -y update
sudo apt -y install python3-pip python3-testresources
cd src
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
- name: Setup app
run: |
Expand Down
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ To run this prebuilt project, you will need:

- [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.
- To run this tutorial using a self managed Couchbase cluster, please refer to the [appendix](#running-self-managed-couchbase-cluster).
- [Python](https://www.python.org/downloads/) 3.9 or higher installed
- [Python](https://www.python.org/downloads/) 3.12 or higher installed
- This quickstart is verified in CI and locally with Python 3.12.
- 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.
- Loading Travel Sample Bucket
If travel-sample is not loaded in your Capella cluster, you can load it by following the instructions for your Capella Cluster:
Expand All @@ -37,16 +38,16 @@ git clone https://github.com/couchbase-examples/python-quickstart.git

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.

> Note: If your Python is not symbolically linked to python3, you need to run all commands using `python3` instead of `python`.

```shell
cd src
python -m pip install -r requirements.txt
python3 -m pip install -r requirements.txt
Comment thread
dex-the-ai marked this conversation as resolved.
```

> Note: On Windows, or inside an activated virtual environment where `python3` is not available, use `python` in the commands below instead.

> 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

> `python -m pip install couchbase --no-binary couchbase`
> `python3 -m pip install couchbase --no-binary couchbase`

> Refer to the [instructions in the SDK](https://github.com/couchbase/couchbase-python-client#alternative-installation-methods) for more info.

Expand Down Expand Up @@ -79,7 +80,7 @@ At this point, we have installed the dependencies, loaded the travel-sample data

```sh
cd src
python app.py
python3 app.py
```

### Using Docker
Expand Down Expand Up @@ -115,7 +116,7 @@ To run the integration tests, use the following commands:

```sh
cd src
python -m pytest
python3 -m pytest
```

## Appendix
Expand Down
2 changes: 1 addition & 1 deletion src/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.9-slim-bullseye
FROM python:3.12-slim-bookworm

WORKDIR /app

Expand Down
2 changes: 1 addition & 1 deletion src/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
couchbase==4.6.1
flask_restx==1.3.0
flask_restx==1.3.2
pytest==9.0.3
python-dotenv==1.2.2
requests==2.33.1
Loading