MeshWeaver.Connection.Notebook
2.3.0
See the version list below for details.
dotnet add package MeshWeaver.Connection.Notebook --version 2.3.0
NuGet\Install-Package MeshWeaver.Connection.Notebook -Version 2.3.0
<PackageReference Include="MeshWeaver.Connection.Notebook" Version="2.3.0" />
<PackageVersion Include="MeshWeaver.Connection.Notebook" Version="2.3.0" />
<PackageReference Include="MeshWeaver.Connection.Notebook" />
paket add MeshWeaver.Connection.Notebook --version 2.3.0
#r "nuget: MeshWeaver.Connection.Notebook, 2.3.0"
#:package MeshWeaver.Connection.Notebook@2.3.0
#addin nuget:?package=MeshWeaver.Connection.Notebook&version=2.3.0
#tool nuget:?package=MeshWeaver.Connection.Notebook&version=2.3.0
MeshWeaver.Connection.Notebook
MeshWeaver.Connection.Notebook enables seamless integration between Polyglot Notebooks and MeshWeaver's kernel system through SignalR connections. This library allows notebooks to interact with MeshWeaver's distributed computation and visualization capabilities.
Overview
The library provides:
- SignalR kernel connection for Polyglot Notebooks
- Interactive code execution
- Layout area rendering in notebooks
- Real-time data visualization
Usage
Basic Connection
To connect your notebook to a MeshWeaver kernel:
// Connect to MeshWeaver kernel
#!connect mesh --url http://localhost/kernel --kernel-name mesh
// Test connection with hello world
#!mesh
Console.WriteLine("Hello World");
Layout Integration
Create and display MeshWeaver layout controls in your notebook:
#!mesh
// Create a markdown control
new MarkdownControl("Hello World")
// The output will be rendered as an iframe in the notebook
// <iframe id='...' src='http://localhost/area/kernel/{id}/{area}' ...></iframe>
Interactive Data Visualization
Work with MeshWeaver's visualization components:
#!mesh
// Create a data grid
var data = new[]
{
new { Id = 1, Name = "Item 1" },
new { Id = 2, Name = "Item 2" }
};
Controls.ToDataGrid(data, grid => grid
.WithColumn(x => x.Id)
.WithColumn(x => x.Name)
)
Architecture
Connection Flow
graph TD
A[Notebook] -->|#!connect mesh| B[SignalR Connection]
B -->|Establish| C[MeshWeaver Kernel]
C -->|Execute| D[Code]
C -->|Render| E[Layout Areas]
E -->|Display| F[Notebook UI]
Features
Kernel Integration
- SignalR connection management
- Code execution
- Event handling
- Result formatting
Layout Support
- Interactive controls
- IFrame rendering
- Real-time updates
- Area management
Data Visualization
- Rich text display
- Data grid support
- Chart rendering
- Interactive components
Development Tools
- Code completion
- Error handling
- Debug output
- Command history
Configuration
Custom Formatters
Formatter.SetPreferredMimeTypesFor(
typeof(TabularDataResource),
HtmlFormatter.MimeType,
CsvFormatter.MimeType
);
Best Practices
Connection Management
// Always use the connect directive at the start #!connect mesh --url http://localhost/kernel --kernel-name mesh // Verify connection #!mesh Console.WriteLine("Connected successfully");Layout Handling
#!mesh // Create reusable layout components public static class MyLayouts { public static UiControl CreateDashboard() => Controls.Stack .WithView(new MarkdownControl("Dashboard")) .WithView(CreateDataGrid()); }
Related Projects
- MeshWeaver.Kernel.Hub - Core kernel functionality
- MeshWeaver.Layout - UI control system
- MeshWeaver.Connection.SignalR - SignalR connection handling
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net9.0
- Microsoft.AspNetCore.SignalR.Client (>= 9.0.6)
- Microsoft.DotNet.Interactive (>= 1.0.0-beta.25177.1)
- Microsoft.DotNet.Interactive.CSharp (>= 1.0.0-beta.25177.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.5.0 | 208 | 11/3/2025 |
| 2.4.0 | 169 | 10/2/2025 |
| 2.3.0 | 221 | 8/4/2025 |
| 2.2.0 | 516 | 7/21/2025 |
| 2.1.0 | 189 | 4/6/2025 |
| 2.0.3 | 517 | 3/24/2025 |
| 2.0.2 | 498 | 3/24/2025 |
| 2.0.1 | 148 | 3/21/2025 |
| 2.0.0 | 179 | 3/20/2025 |
| 2.0.0-preview3 | 112 | 2/28/2025 |
| 2.0.0-Preview2 | 111 | 2/10/2025 |
| 2.0.0-preview1 | 129 | 1/6/2025 |