Skip to main content

Python SDK for Mosaico Data-Platform

Project description

Mosaico Logo

License: AGPL v3 Python Version GitHub release

Mosaico SDK

The Mosaico SDK is the primary interface for interacting with the Mosaico Data Platform, a high-performance system designed for the ingestion, storage, and retrieval of multi-modal sensor data (Robotics, IoT, and Computer Vision).

It provides a seamless bridge between raw data formats (like ROS bags) and the Mosaico high-performance storage layer, leveraging technologies like PyArrow, Pandas, and Pydantic.

For full documentation, see the Mosaico SDK Documentation.

Key Features

  • High-Performance Ingestion: Native support for ROS 1 and ROS 2 data via rosbags.
  • Unified Client: A simple, context-managed MosaicoClient for data retrieval and catalog querying.
  • Multi-Modal Support: Optimized for IMU, Camera, LiDAR, and custom telemetry data.
  • Built-in CLI Tools: Integrated utilities for data injection and interactive examples.
  • Rich Visualization: Beautiful terminal output powered by rich.

Installation

Install the SDK via pip:

pip install mosaicolabs

Note: Requires Python 3.10 or higher.

CLI Utilities

The SDK comes with built-in command-line tools to speed up your workflow.

Infrastructure Prerequisite

Before running any mosaico service via SDK, ensure your Mosaico Infrastructure is active and running. The easiest way to start is using the provided Quick Start environment. Please, refer to the daemon Setup for setting up the environment.

from mosaicolabs import MosaicoClient

# Connect to the Mosaico server
with MosaicoClient.connect(host="localhost", port=6726) as client:
    # Simple is-alive check
    print(client.version())

Interactive Examples

We provide pre-built examples to help you explore the SDK capabilities. You can run them using the mosaicolabs.examples command:

# List all available examples and help
mosaicolabs.examples --help

# Run a specific example
mosaicolabs.examples data_inspection

Available Examples:

  • ros_injection: Demonstrates downloading a sample dataset and ingesting it.
  • data_inspection: Shows how to list sequences and inspect topic metadata.
  • query_catalogs: Advanced querying based on ontology tags and sensor values.

ROS Data Injector

Inject ROS bags (MCAP or legacy) directly into the platform:

mosaicolabs.ros_injector --file path/to/your/data.mcap --sequence my_test_run

Quick Start (Python)

from mosaicolabs import MosaicoClient

# Connect to the Mosaico server
with MosaicoClient.connect(host="localhost", port=6726) as client:
    # List available sequences
    sequences = client.list_sequences()
    print(f"Connected! Found sequences: {sequences}")

    # Get a handle for a specific sequence
    if sequences:
        handler = client.sequence_handler(sequences[0])
        print(f"- Topics: {handler.topics}")
        print(f"- Created: {handler.created_timestamp}")
        print(f"- Updated: {handler.updated_timestamps}")

License

This project is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0). See the LICENSE file for more details.

Contributing

We welcome contributions! Please refer to our Development Guide for instructions on how to set up your environment using Poetry.

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

mosaicolabs-0.4.1.tar.gz (187.8 kB view details)

Uploaded Source

Built Distribution

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

mosaicolabs-0.4.1-py3-none-any.whl (256.9 kB view details)

Uploaded Python 3

File details

Details for the file mosaicolabs-0.4.1.tar.gz.

File metadata

  • Download URL: mosaicolabs-0.4.1.tar.gz
  • Upload date:
  • Size: 187.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.13.7 Darwin/25.3.0

File hashes

Hashes for mosaicolabs-0.4.1.tar.gz
Algorithm Hash digest
SHA256 bceeac94a50a8e3372a6a9e2b65aadd85e5484f55a4c6af84d76b12184a502c3
MD5 b866415fe8f3645edbd87d9a4556e283
BLAKE2b-256 e3b80677bf829ed803d15cfe495216842d2a1224af92217881b6da1314748d98

See more details on using hashes here.

File details

Details for the file mosaicolabs-0.4.1-py3-none-any.whl.

File metadata

  • Download URL: mosaicolabs-0.4.1-py3-none-any.whl
  • Upload date:
  • Size: 256.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.13.7 Darwin/25.3.0

File hashes

Hashes for mosaicolabs-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4cafb0a11c449a1b561bae391be389fe4d064d2e9dc662ec7f4f3629d9128685
MD5 dead4363e496db8ea45f7328bd295a10
BLAKE2b-256 03a24b9a4ac504de088968a185bfaa117eac2baf3dd81d470dd66605af8d22da

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