Access Jupyter API via Visual C#.
.NET package to access Jupyter Notebook Server API via Visual C#.
- .NET Standard 2.0
You can start using this package by two ways.
This is the sample code for getting contents of root directory.
using JupyterSharp;
using JupyterSharp.Common;
namespace JupyterSharp.Sample
{
public class Sample
{
private Api MyApi;
public Sample()
{
// Set your Jupyter Notebook access token, IP address and port
// Default IP address is localhost and port is 8888
MyApi = new Api("JUPYTER TOKEN", "localhost", "8888");
}
public void GetContentsRootDirectory()
{
// Get contents of root directory
var getRequest = MyApi.GetContents();
var getResponse = JsonConverter.ToObject<Common.Contents>(getRequest.Content);
// do something with getResponse
// ...
}
}
}
All wrapper API in this package are designed with Jupyter Notebook API.
- Contents
- Sessions
- Kernels
- Kernelspecs
- Config
- Terminals
- Status
- ApiSpec
This repository also includes a test project.
To run the tests, you have to do some preparations in advance as below.
- Jupyter Notebook is running at
http://localhost:8888
- Your Jupyter token is set to configuration key
JupyterToken
of JupyterSharp.Tests project
- Fork this repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Create new Pull Request
MIT License