Skip to main content

The official QFieldCloud SDK and CLI

qfieldcloud-sdk is the official client to connect to QFieldCloud API either as a Python module, or directly from the command line interface (CLI).

Contents

Documentation

QFieldCloud SDK Documentation

Installation

Linux/macOS

pip3 install qfieldcloud-sdk

Windows

Install Python with your favorite package manager. Then:

python -m pip install qfieldcloud-sdk

CLI usage

The package provides the official QFieldCloud CLI tool.

Usage

qfieldcloud-cli [OPTIONS] COMMAND [ARGS]...

Examples

# logs in user "user" with password "pass"
qfieldcloud-cli login user pass

# gets the projects of user "user" with password "pass" at "https://localhost/api/v1/"
qfieldcloud-cli -u user -p pass -U https://localhost/api/v1/ list-projects

# gets the projects of user authenticated with token `QFIELDCLOUD_TOKEN` at "https://localhost/api/v1/" as JSON
export QFIELDCLOUD_URL=https://localhost/api/v1/
export QFIELDCLOUD_TOKEN=017478ee2464440cb8d3e98080df5e5a
qfieldcloud-cli --json list-projects

Check the examples page in the documentation for more examples.

Module usage

from qfieldcloud_sdk import sdk

client = sdk.Client(url="https://app.qfield.cloud/api/v1/")
client.login(
    username="user1",
    password="pass1",
)

projects = client.list_projects()
> projects
Projects:
0       myusername/myproject1
1       myusername/myproject2
...

Development

Contributions are more than welcome!

Code style

Code style done with precommit.

uv sync --group dev
# if you want to have git commits trigger pre-commit, install pre-commit hook:
uv run pre-commit install
# else run manually before (re)staging your files:
uv run pre-commit run --all-files

Cloning the project

One time action to clone and setup:

git clone https://github.com/opengisch/qfieldcloud-sdk-python
cd qfieldcloud-sdk-python
# install dev dependencies (+ standard dependencies)
uv sync --group dev
uv run pre-commit install

To run CLI interface for development purposes execute:

uv run python -m qfieldcloud_sdk

To ease development, you can set a .env file. Therefore you can use directly the qfieldcloud-cli executable:

cp .env.example .env
uv run qfieldcloud-cli

Building the package

# make sure your shell is sourced to no virtual environment
deactivate
# build
uv run python -m build
# and install with
uv run python -m pip install . --force-reinstall

Voilà!

Running the tests

uv sync --group dev
ENVIRONMENT=test uv run python -m unittest discover -s tests

Metadata

Release files for qfieldcloud-sdk 0.17.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for qfieldcloud-sdk 0.17.0
File Size Uploaded
qfieldcloud_sdk-0.17.0.tar.gz 106.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for qfieldcloud-sdk 0.17.0
File Interpreter ABI Platform
qfieldcloud_sdk-0.17.0-py3-none-any.whl Python 3 none any Details

Total release size: 134.6 kB

Release files / qfieldcloud_sdk-0.17.0.tar.gz

Download URL qfieldcloud_sdk-0.17.0.tar.gz
Size 106.8 kB
Tags Source
SHA-256 checksum
How to use checksums
8ec008520d51c5247cf2292781ed1360ecf1f6e45db1443072643435889f2c2f
BLAKE2b-256 checksum
How to use checksums
6b675a51e1fef018d4a4cbb119b86b5d5eee97cbdc30e4b223e17d2e7dead91a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / qfieldcloud_sdk-0.17.0-py3-none-any.whl

Download URL qfieldcloud_sdk-0.17.0-py3-none-any.whl
Size 27.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a047bdb95cee763e213d8fa3bf0a8aeaf1d9e3d0c4ba0c40e3b0c078a2df2221
BLAKE2b-256 checksum
How to use checksums
ae1637e1f063fcc8e637b507aac9cfb97bded5ae69351e6005782f0c79acf941
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release history Release notifications | RSS feed

This release

0.17.0 This release

2 release files

0.13.0

2 release files

0.12.0

2 release files

0.11.0

2 release files

0.9.0

2 release files

0.8.4

2 release files

0.8.3

2 release files

0.8.2

2 release files

0.8.1

2 release files

0.7.0

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.1

2 release files

0.2.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page