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.3.tar.gz (189.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.3-py3-none-any.whl (260.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mosaicolabs-0.4.3.tar.gz
  • Upload date:
  • Size: 189.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.14.2 Darwin/22.6.0

File hashes

Hashes for mosaicolabs-0.4.3.tar.gz
Algorithm Hash digest
SHA256 a23a1d4b4c49bea2962ab8f0b2d7b206bff4e69c9313a57236e9d803d2b81b61
MD5 4c6c443269575f07977d297989ce3b9c
BLAKE2b-256 8dafb0ccc148e56223a3002cbf10245ccb82df204ed0ae2e61402936687a31a9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mosaicolabs-0.4.3-py3-none-any.whl
  • Upload date:
  • Size: 260.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.14.2 Darwin/22.6.0

File hashes

Hashes for mosaicolabs-0.4.3-py3-none-any.whl
Algorithm Hash digest
SHA256 b57769c37a2c498b5959e91a480aeee1f12d60ab3a112ec40a48ee55ae1c3950
MD5 647c01dd1dd2aa265148b4a03b3b976b
BLAKE2b-256 017f7f71907949ac8e5e485377dcbe82834621711451397827b0f6c2736f2a44

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