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.3.2.tar.gz (180.5 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.3.2-py3-none-any.whl (249.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mosaicolabs-0.3.2.tar.gz
  • Upload date:
  • Size: 180.5 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.3.2.tar.gz
Algorithm Hash digest
SHA256 703b10f639c0a182addbc0dd5c855cdde6130fb568c0d7d4c408cb03b091b326
MD5 849965767689f0d3568f6b709f434845
BLAKE2b-256 f7c8112651363571279dcc657e75c16070c28f97043058eb7b8438137487420d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mosaicolabs-0.3.2-py3-none-any.whl
  • Upload date:
  • Size: 249.7 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.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f5d6b312562a6f4abfc089802ffdeff6f2d305de87f803b8f9858dd93ca564b4
MD5 85568489c9357f8637a3dbfb41323efa
BLAKE2b-256 703b87e7d0404ccf404db871681d60d2646485c872070051356fc169794153c0

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