Ladybug target

Talk to a Ladybug API server over HTTP, map collected rows to nodes or relationships, and get an embedded property-graph target with lakehouse-friendly tooling.

Language
Python 3.11+
Requires
Ladybug API server
Version
v 0.3.37
Last reviewed
Feb 22, 2026

Exports data to a Ladybug graph database. Ladybug is a maintained fork of Kuzu that carries forth the original vision of Kuzu, with added functionality for the lakehouse ecosystem. Just like Kuzu, Ladybug follows the structured property graph model and functions as a fast, embedded database with a permissive (MIT) license.

Get Started

Read Property Graph Targets for more information to get started on how it works in CocoIndex.

Spec

CocoIndex supports talking to Ladybug through its API server. You can run the server from LadybugDB/api-server.

The Ladybug target spec takes the following fields:

  • connection (auth reference to LadybugConnectionSpec): The connection to the Ladybug database. LadybugConnectionSpec has the following fields:
    • api_server_url (str): The URL of the Ladybug API server, e.g. http://localhost:8123.
  • mapping (Nodes | Relationships): The mapping from collected row to nodes or relationships of the graph. For either nodes to export or relationships to export.

Ladybug also provides a declaration spec LadybugDeclaration, to configure indexing options for nodes only referenced by relationships. It has the following fields:

  • connection (auth reference to LadybugConnectionSpec)
  • Fields for nodes to declare, including
    • nodes_label (required)
    • primary_key_fields (required)

Ladybug API server

For running the API server locally or in Docker, follow the instructions in the Ladybug documentation.

Python client

If you want the Ladybug Python client, install it with:

pip install real_ladybug

Example

CocoIndex Docs Edit this page Report issue