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.0.tar.gz (179.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.3.0-py3-none-any.whl (249.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mosaicolabs-0.3.0.tar.gz
  • Upload date:
  • Size: 179.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.3.0.tar.gz
Algorithm Hash digest
SHA256 c4cd1d27b45a244fdf3ff9d2a195a23feba4eb5a31ac211fe20451559e9c3523
MD5 bbb9a874113083aefbb1f3b57565b3e7
BLAKE2b-256 949a5dd29b65685d3b9b4e6e569cb55c54192f90a4f4eae805a2e758b57f4641

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mosaicolabs-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 249.3 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 028cb8cb720d4cb0dabb905df17d27f6f9ec77b3fc20da1693cbf8d222c06049
MD5 3a5af8bd0a9c95abb6d92028e972699d
BLAKE2b-256 785255976d46207de5b18bc07619ca191ce19b61e9cfd9e0cdecee3512816c50

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