Skip to main content

Official Python SDK for MAPIR Chloros image processing

Project description

Chloros Python SDK

Official Python SDK for MAPIR Chloros image processing software. Provides programmatic access to the Chloros API for automation, integration, and custom workflows.

🚀 Quick Start

from chloros_sdk import ChlorosLocal
from pathlib import Path

# Initialize SDK (auto-starts backend)
chloros = ChlorosLocal()

# Create project and import images
chloros.create_project("MyProject", camera="Survey3N_RGN")
chloros.import_images(str(Path.home() / "DroneImages" / "Flight001"))

# Configure settings
chloros.configure(
    vignette_correction=True,
    reflectance_calibration=True,
    indices=["NDVI", "NDRE", "GNDVI"]
)

# Process images
chloros.process(mode="parallel", wait=True)

One-Line Processing

from chloros_sdk import process_folder
from pathlib import Path

images_dir = Path.home() / "DroneImages" / "Flight001"
results = process_folder(str(images_dir), indices=["NDVI", "NDRE"])

📋 Requirements

Requirement Details
Chloros Desktop Must be installed locally
License Chloros+ required (paid plan)
Operating System Windows 10/11 or Linux (64-bit)
Python Python 3.7 or higher
Memory 8GB RAM minimum (16GB recommended)

⚠️ License Requirement: The Chloros SDK requires an active Chloros+ subscription. Standard (free) plans do not have API access. Upgrade at https://cloud.mapir.camera/pricing

📥 Installation

From PyPI (Recommended)

pip install chloros-sdk

From Source

git clone https://github.com/mapircamera/chloros-sdk.git
cd chloros-sdk
pip install -e .

With Progress Monitoring

pip install chloros-sdk[progress]

Platform-Specific Notes

Linux:

  • Requires exiftool: sudo apt install libimage-exiftool-perl
  • Data stored in ~/.local/share/chloros (XDG compliant)
  • Config stored in ~/.config/chloros

Windows:

  • ExifTool bundled with Chloros Desktop
  • Data stored in %LOCALAPPDATA%\Chloros

📖 Documentation

Complete documentation available at: https://docs.chloros.com/api-python-sdk

🎯 Use Cases

Research & Academia

# Integrate Chloros into analysis pipelines
import chloros_sdk
import pandas as pd

chloros = chloros_sdk.ChlorosLocal()

results = []
for survey in field_surveys:
    chloros.process(survey.images)
    ndvi_data = chloros.get_index_values("NDVI")
    results.append({'chloros_ndvi': ndvi_data, 'biomass': survey.biomass})

df = pd.DataFrame(results)
correlation = df.corr()

Batch Processing

# Process multiple flights automatically
from chloros_sdk import ChlorosLocal

chloros = ChlorosLocal()

for flight in flight_database:
    chloros.create_project(flight.name)
    chloros.import_images(flight.folder)
    chloros.configure(indices=flight.requested_indices)
    chloros.process()

Custom Workflows

# Advanced progress monitoring
from pathlib import Path

def progress_callback(progress, message):
    print(f"[{progress}%] {message}")

chloros = ChlorosLocal()
chloros.create_project("CustomWorkflow")
chloros.import_images(str(Path.home() / "Data"))
chloros.configure(indices=["NDVI", "NDRE"])
chloros.process(progress_callback=progress_callback)

🔑 License Activation

The SDK uses the same license as Chloros Desktop:

  1. Open Chloros Desktop GUI
  2. Login with your Chloros+ credentials (one-time)
  3. SDK automatically uses cached license
  4. License persists across reboots (30-day offline support)

🛠️ API Reference

ChlorosLocal Class

Main SDK class for local Chloros processing.

chloros = ChlorosLocal(
    api_url="http://localhost:5000",     # Backend URL
    auto_start_backend=True,             # Auto-start if not running
    backend_exe=None,                    # Auto-detect backend path
    timeout=30                           # Request timeout (seconds)
)

Methods

create_project(project_name, camera=None)

Create a new Chloros project.

import_images(folder_path, recursive=False)

Import images from a folder.

configure(**settings)

Configure processing settings.

process(mode="parallel", wait=True, progress_callback=None)

Start processing images.

get_config()

Get current project configuration.

get_status()

Get backend status.

🔐 Security

  • Proprietary Software: Licensed under MAPIR proprietary license
  • Local Processing: All processing happens locally (localhost API)
  • License Enforcement: Requires active Chloros+ subscription
  • No Data Transmission: Images never leave your computer

💡 Examples

See complete examples in the documentation.

🐛 Support

📄 License

Copyright (c) 2025 MAPIR Inc. All rights reserved.

This is proprietary software requiring an active Chloros+ subscription. Unauthorized use, distribution, or modification is prohibited.

🔄 Version History

v1.0.4 (2025)

  • Added Linux support
  • Cross-platform path handling
  • XDG-compliant directories on Linux

v1.0.0 (2025)

  • Initial release
  • Full API coverage for local processing
  • Auto-backend startup
  • Progress monitoring support
  • Context manager support

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

chloros_sdk-1.0.41.tar.gz (577.1 kB view details)

Uploaded Source

Built Distribution

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

chloros_sdk-1.0.41-py3-none-any.whl (15.0 kB view details)

Uploaded Python 3

File details

Details for the file chloros_sdk-1.0.41.tar.gz.

File metadata

  • Download URL: chloros_sdk-1.0.41.tar.gz
  • Upload date:
  • Size: 577.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.11

File hashes

Hashes for chloros_sdk-1.0.41.tar.gz
Algorithm Hash digest
SHA256 00bef0ac2d7edddf2e1fa91d91efee2e306da3376f25f7aee043bba2c5c725cb
MD5 bc955227588403712c1654e80696a4a1
BLAKE2b-256 64a7a1d037b0f9d7825bf63cccecefc54c6793053c032d104b0c11b892fa3433

See more details on using hashes here.

File details

Details for the file chloros_sdk-1.0.41-py3-none-any.whl.

File metadata

  • Download URL: chloros_sdk-1.0.41-py3-none-any.whl
  • Upload date:
  • Size: 15.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.11

File hashes

Hashes for chloros_sdk-1.0.41-py3-none-any.whl
Algorithm Hash digest
SHA256 9391146ca1e4c32da2b4a38a5ef61fa4ad94f85a7e6d74f88f2a43d43a29b204
MD5 abb892f352a94ca353cb64b12eac968d
BLAKE2b-256 12f25beead8bde00a8475e9948cc853098c7db1779e6d3619243ac43739b86a6

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