Giter VIP home page Giter VIP logo

Comments (3)

jourdain avatar jourdain commented on May 26, 2024 1

Hi Thomas,

Thanks for your pointers. In the trame documentation that you pointed out, the bottom section is what we recommend nowadays. We are still working on that part (hence the missing explanation that I'm giving you here). On top of that, we are working toward a trame-jupyter-extension to prevent any side connection and use the internal jupyter-comm infrastructure.

But with that approach, we made it flexible so people can configure how that iframe gets generated, and we already have an implementation for jupyter hub.

If I skip most of the bottom section, you will have to do the following in your cell to leverage it.

cone = Cone()
await cone.ui.ready
cone.ui.iframe_builder = "jupyter-hub" # <= set the strategy for building the iframe
cone.ui

or you can

import os

os.environ["TRAME_IFRAME_BUILDER"] = "jupyter-hub"

You may need to do pip install -U trame-client to grab the latest though.

You can see the implementation of those builders, and if you want to expand or add a new one, PRs are indeed welcome.

Good luck with your exploration of trame within Jupyter.

from trame.

t20100 avatar t20100 commented on May 26, 2024 1

Great! It just works, thanks!

from trame.

t20100 avatar t20100 commented on May 26, 2024

A slightly different approach: pyvista trame's backend is using a server_proxy_prefix str argument to generate the url:

https://github.com/pyvista/pyvista/blob/cd68400abd20084f743260060f96cafd4194d8e2/pyvista/trame/jupyter.py#L163-L185

from trame.

Related Issues (20)

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.