Giter VIP home page Giter VIP logo

jupyter-jvm-client's People

Contributors

spencerpark avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

hjanus

jupyter-jvm-client's Issues

project stability

Hi ,

When I look project commits latest commit was almost two years ago. Is this project usable? We just want to implement jupyter enterprise gateway like functionality in Java and we need a jupyter client.

Thank you in advance

How to connect to zmqJupyterClient

List<String> configPaths =Arrays.asList(
            "/Users/xxx/.jupyter",
            "/Users/xxx/opt/anaconda3/etc/jupyter",
            "/usr/local/etc/jupyter",
            "/etc/jupyter");
    List<String> dataPaths =
        Arrays.asList(
            "/Users/xxx/Library/Jupyter",
            "/Users/xxx/opt/anaconda3/share/jupyter",
            "/usr/local/share/jupyter",
            "/usr/share/jupyter");
    List<String> runtimePaths = Arrays.asList("/Users/xxx/Library/Jupyter/runtime");

    JupyterPaths jupyterPaths =
        new JupyterPaths(
            configPaths.stream().map(Path::of).collect(Collectors.toList()),
            dataPaths.stream().map(Path::of).collect(Collectors.toList()),
            runtimePaths.stream().map(Path::of).collect(Collectors.toList()));

    KernelSpecManager kernelSpecManager = KernelSpecManager.fromPaths(jupyterPaths);

    Map<String, KernelSpec> allSpecs = kernelSpecManager.getAllSpecs();
    System.out.println(allSpecs);
    KernelConnectionProperties kernelConnectionProperties =
        new KernelConnectionProperties(
            "127.0.0.1", 8990, 8991, 8992, 8993, 8994, "tcp", "hmac-sha256", "");

    ZmqJupyterClient zmqJupyterClient =
        ZmqJupyterClient.createConnectedTo(kernelConnectionProperties);

    ExecutionResult eval = zmqJupyterClient.eval("print(1+1)", IOProvider.STDIO);
    String data = (String) eval.getValue().getData(MIMEType.APPLICATION_JSON);
    System.out.println(data);

I confused on the "key" parameter when creating KernelConnectionProperties. which config does this "key" exactly indicate?
is it c.NotebookNotary.secret? c.GatewayClient.client_key? c.NotebookApp.keyfile? c.Session.key?

In addition, how do you tell if a client is connected to the kernel? I run the code above and the console is logging "INFO: Loop started." but nothing from code execution. I really appreciate the code you open sourced. Thank you!

Since there's no doc about the code, do you mind writing a small example code for this zmqJupyterClient?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.