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.2.tar.gz (190.3 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.2-py3-none-any.whl (260.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for mosaicolabs-0.4.2.tar.gz
Algorithm Hash digest
SHA256 205a55f01101b8d2923f994f2074f7a78174f2609f215046267838a477a2df10
MD5 fd39ec0531b3432a0c56ae921f4d5388
BLAKE2b-256 9c0befec16aae959c35f6deb7bbc6ff54419be97c9fa18274d60acf279f34e00

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for mosaicolabs-0.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 46f8ff0b0d14f024696418f65e4297edd76da6ebcefdab4ff0a7619e61700909
MD5 f1da15d6c833379aa40dc4fe3f795511
BLAKE2b-256 bfac97eb8ae15a44ffb746207c9348212d4bd94bdc010d4677e7ea8171c42137

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