diff --git a/src/content/docs/client-apis/c.mdx b/src/content/docs/client-apis/c.mdx index 42e1431..dc56bb2 100644 --- a/src/content/docs/client-apis/c.mdx +++ b/src/content/docs/client-apis/c.mdx @@ -38,7 +38,7 @@ Alternatively, here is an example configuration for integrating the pre-built li ### Linking against Ladybug when built from source -See the requirements in https://docs.ladybugdb.com/developer-guide/. +See the requirements in [developer guide](/developer-guide/). It's recommended that you use CMake if you want to link to the lbug static library as shown in the example below. #### CMake diff --git a/src/content/docs/client-apis/cli.mdx b/src/content/docs/client-apis/cli.mdx index 6a6ed12..a937e16 100644 --- a/src/content/docs/client-apis/cli.mdx +++ b/src/content/docs/client-apis/cli.mdx @@ -117,7 +117,7 @@ lbug> :help Note: you can change and see several system configurations, such as num-threads, timeout, and progress_bar using Cypher CALL statements. e.g. CALL THREADS=5; or CALL current_setting('threads') return *; - See: https://docs.ladybugdb.com/cypher/configuration + See: [cypher config](/cypher/configuration) ``` #### `:clear` diff --git a/src/content/docs/client-apis/nodejs.mdx b/src/content/docs/client-apis/nodejs.mdx index c437e18..7b34d2b 100644 --- a/src/content/docs/client-apis/nodejs.mdx +++ b/src/content/docs/client-apis/nodejs.mdx @@ -25,7 +25,7 @@ and is more commonly used when building Ladybug applications in Node.js. The asynchronous API is commonly used when writing Ladybug applications in Node.js. ```js -const lbug = require("lbug"); +const lbug = require("@ladybugdb/core"); (async () => { // Create an empty on-disk database and connect to it @@ -65,7 +65,7 @@ This is useful for running Ladybug in a synchronous context, such as debugging o where async operations are not desired. ```js -const lbug = require("lbug"); +const lbug = require("@ladybugdb/core"); // Create an empty on-disk database and connect to it const db = new lbug.Database("example.lbug"); diff --git a/src/content/docs/client-apis/python.mdx b/src/content/docs/client-apis/python.mdx index a37d9bc..9f160aa 100644 --- a/src/content/docs/client-apis/python.mdx +++ b/src/content/docs/client-apis/python.mdx @@ -35,7 +35,7 @@ curl -L -o ./data/lives-in.csv https://raw.githubusercontent.com/LadybugDB/datas The synchronous API is the default and is a common way to work with Ladybug in Python. ```python -import real_ladybug as lb +import ladybug as lb def main() -> None: # Create an empty on-disk database and connect to it @@ -79,7 +79,7 @@ such as in web frameworks like FastAPI or cases where you need to concurrently r ```python import asyncio -import real_ladybug as lb +import ladybug as lb async def main(): # Create an empty on-disk database and connect to it @@ -187,7 +187,7 @@ The following examples show how to output query results to each of these data st You can output the results of a Cypher query to a Pandas DataFrame using the `get_as_df()` method: ```py -import real_ladybug as lb +import ladybug as lb import pandas as pd db = lb.Database(":memory:") @@ -226,7 +226,7 @@ print(result.get_as_df()) You can output the results of a Cypher query to a Polars DataFrame using the `get_as_pl()` method: ```py -import real_ladybug as lb +import ladybug as lb import polars as pl db = lb.Database(":memory:") @@ -277,7 +277,7 @@ shape: (3, 1) You can output the results of a Cypher query to a PyArrow Table using the `get_as_arrow()` method: ```py -import real_ladybug as lb +import ladybug as lb import pyarrow as pa db = lb.Database(":memory:") @@ -314,7 +314,7 @@ Scanning a DataFrame or Table does *not* copy the data into Ladybug, it only rea ```py -import real_ladybug as lb +import ladybug as lb import pandas as pd db = lb.Database(":memory:") @@ -339,7 +339,7 @@ print(result.get_as_df()) ```py -import real_ladybug as lb +import ladybug as lb import polars as pl db = lb.Database(":memory:") @@ -370,7 +370,7 @@ shape: (3, 2) ```py -import real_ladybug as lb +import ladybug as lb import pyarrow as pa db = lb.Database(":memory:") @@ -405,7 +405,7 @@ age: [[30,40,50]] Copy from a Pandas DataFrame into a Ladybug table using the `COPY FROM` command: ```py -import real_ladybug as lb +import ladybug as lb import pandas as pd db = lb.Database(":memory:") @@ -436,7 +436,7 @@ print(result.get_as_df()) Copy from a Polars DataFrame into a Ladybug table using the `COPY FROM` command: ```py -import real_ladybug as lb +import ladybug as lb import polars as pl db = lb.Database(":memory:") @@ -473,7 +473,7 @@ shape: (3, 2) Copy from a PyArrow Table into a Ladybug table using the `COPY FROM` command: ```py -import real_ladybug as lb +import ladybug as lb import pyarrow as pa db = lb.Database(":memory:") @@ -541,7 +541,7 @@ difference between two numbers, and then apply it in a Cypher query. ### Register the UDF ```py -import real_ladybug as lb +import ladybug as lb db = lb.Database(":memory:") conn = lb.Connection(db) diff --git a/src/content/docs/client-apis/swift.mdx b/src/content/docs/client-apis/swift.mdx index 6d1bddd..93fb794 100644 --- a/src/content/docs/client-apis/swift.mdx +++ b/src/content/docs/client-apis/swift.mdx @@ -5,11 +5,9 @@ description: "Use Ladybug embedded graph database in Swift applications with the import { LinkCard } from '@astrojs/starlight/components'; -See the following link for the full documentation of the `lbug-swift` package. +See the following link for the full documentation of the `swift-ladybug` package. - -We also provide a demo iOS application [here](https://github.com/LadybugDB/ladybug-swift-demo) that shows how to integrate Ladybug into an iOS application. diff --git a/src/content/docs/client-apis/wasm.mdx b/src/content/docs/client-apis/wasm.mdx index a1d3640..87e0c71 100644 --- a/src/content/docs/client-apis/wasm.mdx +++ b/src/content/docs/client-apis/wasm.mdx @@ -19,7 +19,7 @@ Several benefits of Ladybug-Wasm are the following: ## Installation ```bash -npm i lbug-wasm +npm i @ladybugdb/wasm-core ``` ## Example usage @@ -31,7 +31,7 @@ We provide three versions of this example: - `browser_persistent`: This example demonstrates how to use Ladybug-Wasm in a web browser with a persistent IDBFS filesystem. - `nodejs`: This example demonstrates how to use Ladybug-Wasm in Node.js. -The example can be found in [the examples directory](https://github.com/LadybugDB/ladybug/tree/master/tools/wasm/examples). +The example can be found in [the examples directory](https://github.com/LadybugDB/ladybug-wasm/tree/main/examples). ## Understanding the package @@ -41,8 +41,8 @@ In this package, three different variants of WebAssembly modules are provided: - **Node.js**: This build is optimized for Node.js and uses Node.js's filesystem instead of Emscripten's default filesystem (`NODEFS` flag is enabled). This build also supports multi-threading. It is distributed as a CommonJS module rather than an ES module to maximize compatibility. This build is located in the `nodejs` directory. Note that this build only works in Node.js and does not work in the browser environment. In each variant, there are two different versions of the WebAssembly module: -- **Async**: This version of the module is the default version and each function call returns a Promise. This version dispatches all the function calls to the WebAssembly module to a Web Worker or Node.js worker thread to prevent blocking the main thread. However, this version may have a slight overhead due to the serialization and deserialization of the data required by the worker threads. This version is located at the root level of each variant (e.g., `lbug-wasm`, `lbug-wasm/multithreaded`, `lbug-wasm/nodejs`). -- **Sync**: This version of the module is synchronous and does not require any callbacks (other than the module initialization). This version is good for scripting / CLI / prototyping purposes but is not recommended to be used in GUI applications or web servers because it may block the main thread and cause unexpected freezes. This alternative version is located in the `sync` directory of each variant (e.g., `lbug-wasm/sync`, `lbug-wasm/multithreaded/sync`, `lbug-wasm/nodejs/sync`). +- **Async**: This version of the module is the default version and each function call returns a Promise. This version dispatches all the function calls to the WebAssembly module to a Web Worker or Node.js worker thread to prevent blocking the main thread. However, this version may have a slight overhead due to the serialization and deserialization of the data required by the worker threads. This version is located at the root level of each variant (e.g., `@ladybugdb/wasm-core`, `@ladybugdb/wasm-core/multithreaded`, `@ladybugdb/wasm-core/nodejs`). +- **Sync**: This version of the module is synchronous and does not require any callbacks (other than the module initialization). This version is good for scripting / CLI / prototyping purposes but is not recommended to be used in GUI applications or web servers because it may block the main thread and cause unexpected freezes. This alternative version is located in the `sync` directory of each variant (e.g., `@ladybugdb/wasm-core/sync`, `@ladybugdb/wasm-core/multithreaded/sync`, `@ladybugdb/wasm-core/nodejs/sync`). Note that you cannot mix and match the variants and versions. For example, a `Database` object created with the default variant cannot be passed to a function in the multithreaded variant. Similarly, a `Database` object created with the async version cannot be passed to a function in the sync version. @@ -51,7 +51,7 @@ In each variant, the main module is bundled as one script file. However, the wor By default, the worker script is resolved under the same directory / URL prefix as the main module. If you want to change the location of the worker script, you can use pass the optional worker path parameter to the `setWorkerPath` function. For example: ```javascript -import lbug from "lbug-wasm"; +import lbug from "@ladybugdb/wasm-core"; lbug.setWorkerPath('path/to/worker.js'); ``` diff --git a/src/content/docs/concurrency.md b/src/content/docs/concurrency.md index 0fcc22e..70d473b 100644 --- a/src/content/docs/concurrency.md +++ b/src/content/docs/concurrency.md @@ -43,7 +43,7 @@ Here's a simple example application in Python that demonstrates these two steps database and a connection. The same principles apply to other language APIs as well: ```python -import real_ladybug as lb +import ladybug as lb # Open the database in `READ_WRITE` mode. The below code is equivalent to: # db = lb.Database("example.lbug", read_only=False) diff --git a/src/content/docs/cypher/query-clauses/load-from.md b/src/content/docs/cypher/query-clauses/load-from.md index 3de2837..91998ba 100644 --- a/src/content/docs/cypher/query-clauses/load-from.md +++ b/src/content/docs/cypher/query-clauses/load-from.md @@ -139,7 +139,7 @@ inferred from the schema information of the data frame. Here is an example: ```py # main.py -import real_ladybug as lb +import ladybug as lb import pandas as pd db = lb.Database(":memory:") @@ -172,7 +172,7 @@ Ladybug can also scan Polars DataFrames via the underlying PyArrow layer. The ru variable names and data types is identical to scanning Pandas data frames. Here is an example: ```python -import real_ladybug as lb +import ladybug as lb import polars as pl db = lb.Database(":memory:") @@ -205,7 +205,7 @@ shape: (3, 2) You can scan an existing PyArrow table as follows: ```python -import real_ladybug as lb +import ladybug as lb import pyarrow as pa db = lb.Database(":memory:") diff --git a/src/content/docs/extensions/vector.mdx b/src/content/docs/extensions/vector.mdx index 3e0618c..bbf75f7 100644 --- a/src/content/docs/extensions/vector.mdx +++ b/src/content/docs/extensions/vector.mdx @@ -36,7 +36,7 @@ extension to directly create the embeddings using Cypher. ```python # create_embeddings.py # pip install sentence-transformers -import real_ladybug as lb +import ladybug as lb import os db = lb.Database("example.lbug") @@ -96,7 +96,7 @@ for title, publisher in zip(titles, publishers): ```python # create_embeddings.py -import real_ladybug as lb +import ladybug as lb import os db = lb.Database("example.lbug") @@ -269,7 +269,7 @@ Let's run some example search queries on our newly created vector index. ```python -import real_ladybug as lb +import ladybug as lb # Initialize the database db = lb.Database("example.lbug") @@ -304,7 +304,7 @@ print(result.get_as_pl()) ```python -import real_ladybug as lb +import ladybug as lb # Initialize the database db = lb.Database("example.lbug") diff --git a/src/content/docs/get-started/graph-algorithms.md b/src/content/docs/get-started/graph-algorithms.md index 3883fc3..af78a4d 100644 --- a/src/content/docs/get-started/graph-algorithms.md +++ b/src/content/docs/get-started/graph-algorithms.md @@ -34,7 +34,7 @@ First, initialize a connection to a new Ladybug database named `example.lbug`: ```py from pathlib import Path -import real_ladybug as lb +import ladybug as lb db_path = "example.lbug" @@ -112,7 +112,7 @@ The first method to run a graph algorithm natively in Ladybug is using the `algo #### Install and load the extension ```py -import real_ladybug as lb +import ladybug as lb db_path = "example.lbug" @@ -237,7 +237,7 @@ a NetworkX algorithm result into a Pandas/Polars DataFrame and write it back to First, obtain a connection to the existing `example.lbug` database: ```py -import real_ladybug as lb +import ladybug as lb db_path = "example.lbug" diff --git a/src/content/docs/get-started/index.mdx b/src/content/docs/get-started/index.mdx index 1800f5b..8cd656c 100644 --- a/src/content/docs/get-started/index.mdx +++ b/src/content/docs/get-started/index.mdx @@ -93,7 +93,7 @@ and analysis on small datasets, without persisting the data to disk. ## Quick start Ensure that you have [installed](/installation) Ladybug using the CLI or your preferred client API. -Also download the example CSV files [from our GitHub repo](https://github.com/LadybugDB/ladybug/tree/master/dataset/demo-db/csv). +Also download the example CSV files [from our GitHub repo](https://github.com/LadybugDB/dataset/tree/main/demo-db/csv). ```bash mkdir ./data/ @@ -115,7 +115,7 @@ below demonstrate how to create a graph schema and import data into an on-disk L ```py # main.py -import real_ladybug as lb +import ladybug as lb def main(): # Create an empty on-disk database and connect to it diff --git a/src/content/docs/get-started/scan.mdx b/src/content/docs/get-started/scan.mdx index 7a6b9be..2d273b3 100644 --- a/src/content/docs/get-started/scan.mdx +++ b/src/content/docs/get-started/scan.mdx @@ -146,7 +146,7 @@ WITH (storage='arrow://my_arrow_table_id'); ### DuckDB -First, [attach a DuckDB database](https://docs.ladybugdb.com/extensions/attach/duckdb/): +First, [attach a DuckDB database](/extensions/attach/duckdb/): ```cypher ATTACH 'university.db' AS uw (dbtype duckdb); @@ -180,5 +180,5 @@ LIMIT 5; diff --git a/src/content/docs/import/copy-from-dataframe.mdx b/src/content/docs/import/copy-from-dataframe.mdx index 3af9183..e456bb7 100644 --- a/src/content/docs/import/copy-from-dataframe.mdx +++ b/src/content/docs/import/copy-from-dataframe.mdx @@ -14,7 +14,7 @@ There are two different ways in Ladybug to import dataframes: The dataframe can be passed as a query parameter: ```python -import real_ladybug as lb +import ladybug as lb import polars as pl db = lb.Database(":memory:") @@ -117,7 +117,7 @@ We can ignore these erroneous rows during import by setting the `ignore_errors` in the `COPY FROM` command: ```py -import real_ladybug as lb +import ladybug as lb db = lb.Database(":memory:") conn = lb.Connection(db) @@ -157,7 +157,7 @@ You can directly copy from a Pandas dataframe into Ladybug. Both numpy-backed an dataframes are supported. ```python -import real_ladybug as lb +import ladybug as lb import pandas as pd db = lb.Database(":memory:") @@ -188,7 +188,7 @@ You can utilize an existing in-memory PyArrow table to copy data directly into L Internally, the Polars dataframe example above also leverages scanning from PyArrow tables. ```python -import real_ladybug as lb +import ladybug as lb import pyarrow as pa db = lb.Database(":memory:") @@ -218,7 +218,7 @@ print(res.get_as_df()) This example shows a basic use case where you have no nesting of data and no null values. ```python -import real_ladybug as lb +import ladybug as lb import polars as pl db = lb.Database(":memory:") @@ -338,7 +338,7 @@ We can now scan the DataFrame using the `LOAD FROM` clause in Ladybug in combina obtain each of the insurance provider records in a row-wise manner. ```python -import real_ladybug as lb +import ladybug as lb db = lb.Database(":memory:") conn = lb.Connection(db) @@ -368,7 +368,7 @@ We now have the necessary information to create our `Patient`, `InsuranceProvide tables and copy the relevant data into them. ```python -import real_ladybug as lb +import ladybug as lb db = lb.Database(":memory:") conn = lb.Connection(db) diff --git a/src/content/docs/import/copy-from-subquery.md b/src/content/docs/import/copy-from-subquery.md index 0bf2ea2..4592558 100644 --- a/src/content/docs/import/copy-from-subquery.md +++ b/src/content/docs/import/copy-from-subquery.md @@ -43,7 +43,7 @@ object, such as a Pandas DataFrame using `LOAD FROM` and use its results as inpu command. This can be combined with predicate filters as follows: ```python -import real_ladybug as lb +import ladybug as lb import pandas as pd db = lb.Database("example.lbug") diff --git a/src/content/docs/import/merge.md b/src/content/docs/import/merge.md index 0c96819..eb2b25e 100644 --- a/src/content/docs/import/merge.md +++ b/src/content/docs/import/merge.md @@ -65,7 +65,7 @@ without having to merge the rows one by one (i.e., **without for loops**). Let's see this in action with an example. ```py -import real_ladybug as lb +import ladybug as lb import pandas as pd db = lb.Database('example.lbug') diff --git a/src/content/docs/installation.mdx b/src/content/docs/installation.mdx index 9920055..1b5bb8f 100644 --- a/src/content/docs/installation.mdx +++ b/src/content/docs/installation.mdx @@ -43,7 +43,7 @@ tar xzf liblbug-*.tar.gz`, }, go: `go get https://github.com/LadybugDB/go-ladybug@v0.13.1`, swift: `dependencies: [ - .package(url: "https://github.com/LadybugDB/ladybug-swift/", branch: "${version}"), + .package(url: "https://github.com/LadybugDB/swift-ladybug/", branch: "${version}"), ],` } @@ -119,7 +119,7 @@ On Linux, macOS, and WSL2, you can also use [`Nix`](https://nixos.org/learn) to Run Ladybug in a temporary shell: ```bash -nix-shell -p lbug +nix-shell -p ladybugdb lbug ``` @@ -147,7 +147,7 @@ The instructions are the same for Linux, macOS, and Windows. ```bash uv init -uv add real_ladybug +uv add ladybug ``` @@ -155,7 +155,7 @@ uv add real_ladybug ```bash -pip install real_ladybug +pip install ladybug ``` @@ -214,7 +214,7 @@ To add `lbug-swift` to your Swift project, you can use the Swift package manager .target( name: "YourTargetName", dependencies: [ - .product(name: "Ladybug", package: "lbug-swift"), + .product(name: "Ladybug", package: "swift-ladybug"), ] ) ] @@ -223,7 +223,7 @@ To add `lbug-swift` to your Swift project, you can use the Swift package manager Alternatively, you can add the package through Xcode: 1. Open your Xcode project. 2. Go to `File` > `Add Packages Dependencies...`. -3. Enter the URL of the lbug-swift repository: `https://github.com/LadybugDB/ladybug-swift`. +3. Enter the URL of the ladybug-swift repository: `https://github.com/LadybugDB/swift-ladybug`. 4. Select the version you want to use (e.g., {version} for the latest stable release or `main` for the latest development version). @@ -268,15 +268,15 @@ for more details. Our [Model Context Protocol](https://modelcontextprotocol.io/introduction) server allows you to expose your Ladybug database as a tool that can be used by LLMs and agents. -Refer to the Ladybug-MCP [GitHub repo](https://github.com/LadybugDB/ladybug-mcp-server) for more details. +Refer to the Ladybug-MCP [GitHub repo](https://github.com/LadybugDB/mcp-server-ladybug) for more details. ## Nightly Builds If you want access to the latest features in development, you can use our nightly builds. -- Python: `uv pip install --pre lbug` -- Node.js: `npm i lbug@next` -- Java: The latest snapshot version is available on [GitHub Packages](https://github.com/LadybugDB/ladybug/packages/2258307) +- Python: `uv pip install --pre ladybug` +- Node.js: `npm i @ladybugdb/core@next` +- Java: The latest snapshot version is available on [GitHub Packages](https://github.com/LadybugDB/ladybug/packages/) - For the CLI, C/C++ shared libraries, and Rust crate, the latest nightly versions for each can be downloaded from the latest run of [this GitHub Actions workflow](https://github.com/LadybugDB/ladybug/actions/workflows/build-and-deploy.yml). diff --git a/src/content/docs/tutorials/python/index.mdx b/src/content/docs/tutorials/python/index.mdx index 19c449e..c48e8b8 100644 --- a/src/content/docs/tutorials/python/index.mdx +++ b/src/content/docs/tutorials/python/index.mdx @@ -24,7 +24,7 @@ for alternative installation methods. ```bash python -m venv .venv source .venv/bin/activate -pip install real_ladybug +pip install ladybug ``` Next, [download the zipped data](https://lbugdb.github.io/data/tutorial/tutorial_data.zip) and unzip the files. @@ -70,7 +70,7 @@ We are now ready to start the tutorial. ## Create the database Clear out the contents of `src/create_db.py` and import Ladybug: ```py -import real_ladybug as lb +import ladybug as lb ``` Next, create and connect to an empty Ladybug database: ```py @@ -169,7 +169,7 @@ We can now start querying the graph to answer some questions about the social ne Replace the contents of `src/main.py` with the following code snippet: ```py -import real_ladybug as lb +import ladybug as lb def main() -> None: db = lb.Database("social_network.lbug") @@ -328,7 +328,7 @@ This tells us that there is exactly one path of length 3 between the three users ## Summary In this tutorial, we've shown how to use Ladybug's Python API to import CSV data as a graph and query it using Cypher. -You're now ready to import your own datasets into Ladybug and query them usin Ladybug's Python API! +You're now ready to import your own datasets into Ladybug and query them using Ladybug's Python API! ## Code Here is the full code from the tutorial that you can use to follow along. Reminder that you can run the code as follows: @@ -344,7 +344,7 @@ python src/main.py ```py -import real_ladybug as lb +import ladybug as lb def main() -> None: db = lb.Database("social_network.lbug") @@ -396,7 +396,7 @@ if __name__ == "__main__": ```py -import real_ladybug as lb +import ladybug as lb def main() -> None: db = lb.Database("social_network.lbug") diff --git a/src/content/docs/visualization/third-party-integrations/yfiles.mdx b/src/content/docs/visualization/third-party-integrations/yfiles.mdx index 381b97a..12c582e 100644 --- a/src/content/docs/visualization/third-party-integrations/yfiles.mdx +++ b/src/content/docs/visualization/third-party-integrations/yfiles.mdx @@ -25,7 +25,7 @@ The yFiles Jupyter Graphs widget can be installed using `uv` or `pip`: ```bash # Install lbug as a pre-requisite uv init -uv add real_ladybug yfiles-jupyter-graphs-for-kuzu +uv add ladybug yfiles-jupyter-graphs-for-kuzu ``` @@ -33,7 +33,7 @@ uv add real_ladybug yfiles-jupyter-graphs-for-kuzu ```bash # Install lbug as a pre-requisite -pip install real_ladybug yfiles-jupyter-graphs-for-kuzu +pip install ladybug yfiles-jupyter-graphs-for-kuzu ``` @@ -46,7 +46,7 @@ table `Person`, and one relationship table `MENTORED`, which describes who mento Each person has a `name` and an `alias`, which is the name they are best known by. ```py -import real_ladybug as lb +import ladybug as lb from yfiles_jupyter_graphs_for_kuzu import KuzuGraphWidget # Open a new in-memory database db = lb.Database(":memory:")