Skip to main content

A command-line toolset for interacting with the Flai web app.

Project description

Flai SDK

The Flai SDK is a command-line toolset for interacting with the Flai web app. It is also used by our QGIS plugin.

Install

From PyPI

pip install flai-sdk

From source

  1. Clone the repo and enter the directory:

    git clone https://github.com:flai-ai/flai-sdk.git
    cd flai-sdk
    
  2. (Optional) Create and activate a virtual environment.

    With Conda

    conda create --name flai-sdk
    conda activate flai-sdk
    

    With venv

    python3(.VERSION) -m venv ~/.python-virtual-env/flai-sdk
    source ~/.python-virtual-env/flai-sdk/bin/activate
    
  3. Install in “editable” mode in it's directory:

    pip install -e .

First-time setup

To use our package you will need to call login command and pass at least two arguments for authorization (see Tips below).

flai-sdk login

This command will create a json file under path $HOME/.flai (Linux / macOS / Windows - Powershell) or %USERPROFILE%/.flai (Windows - cmd).

Tips:

  • flai_access_token
    • can be found on Flai web app or
    • by going to our Web App at flai.ai > Sign in > Click your icon > Select Settings from menu > Click Access tokens tab > Click Add new personal access token
  • flai_host

Examples

Upload a dataset to a project

Upload all .las/.laz files in the current folder to a project.

# simple example
flai-sdk upload-dataset --project_id PROJECT_NAME --dataset_name DATASET_NAME FILES

# working example
flai-sdk upload-dataset --project_id "Staring project" --dataset_name "Testing upload" "*.la?"

# compact version
flai-sdk upload-dataset -p "Staring project" -n "Testing upload" "*.la?"

The flag --project_id / -p can be omitted. In this case, the data will not be assigned to a project and will be shown in the catalog on your instance of our web app.

Download dataset

flai-sdk download-dataset -d "59d66bfc-c2a4-4e91-91f3-2f469078297b" "downloaded files.zip"

Explore commands

To see what arguments our SDK expects you can start from initial command and then add --help to see more hints.

# to see all available options
flai-sdk --help

# let's say we want to know what option 'download-flainet-model' expects
flai-sdk download-flainet-model --help

# and that is it :)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flai_sdk-1.1.1.tar.gz (22.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

flai_sdk-1.1.1-py3-none-any.whl (32.1 kB view details)

Uploaded Python 3

File details

Details for the file flai_sdk-1.1.1.tar.gz.

File metadata

  • Download URL: flai_sdk-1.1.1.tar.gz
  • Upload date:
  • Size: 22.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.6

File hashes

Hashes for flai_sdk-1.1.1.tar.gz
Algorithm Hash digest
SHA256 83adc245dbdbceb592ad6a7794959540c74c250df39c10223332b251e4bccdcb
MD5 a61715058570b41e1f479cba82b2092a
BLAKE2b-256 c0b129b4adf789c45c9c411c8924008ad955fbdb53e2c97830c01caa9001f6ca

See more details on using hashes here.

File details

Details for the file flai_sdk-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: flai_sdk-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 32.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.6

File hashes

Hashes for flai_sdk-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5169f03395d30d78c01e1d984341f48e5bad4227948629708ff9db68ea617531
MD5 3b8b0834c44edc00968a72d8cb5b463b
BLAKE2b-256 df0716baffd6b0d652fe6bf5a78b59662b7507d354b837403f4c293691249edb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page