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.18.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.18.0
File Size Uploaded Provenance Actions
qfieldcloud_sdk-0.18.0.tar.gz 107.4 kB Without provenance Details for qfieldcloud_sdk-0.18.0.tar.gz

Built distribution (wheel)

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

Total release size: 135.8 kB

Release files / qfieldcloud_sdk-0.18.0.tar.gz

Download URL qfieldcloud_sdk-0.18.0.tar.gz
Size 107.4 kB
Tags Source
SHA-256 checksum
How to use checksums
9ef213a0d053be1094554859de390019fe4f8dbe151626b313c822fa2717dc1a
BLAKE2b-256 checksum
How to use checksums
7217acd8a3ed0d4ca23fd138653c96153ad5110d4b88f05f690fd3522f2aed1f
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.18.0-py3-none-any.whl

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

Security for qfieldcloud-sdk 0.18.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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