跳转到主要内容

为可嵌入的replite控制台定制的JupyterLab扩展

项目描述

replite

由JupyterLite支持的嵌入式REPL。

replite-numpy

用法

要将代码控制台嵌入到您的网站中

<iframe src="https://replite.vercel.app/retro/consoles/index.html" width="100%" height="100%">
</iframe>

配置

可以通过URL参数配置REPL的行为和外观。

默认选择内核

为了避免内核选择对话框并默认选择给定的内核

<iframe src="https://replite.vercel.app/retro/consoles?kernel=python" width="100%" height="100%">
</iframe>

启用工具栏

可以启用(可选)工具栏以添加一些有用的按钮

<iframe src="https://replite.vercel.app/retro/consoles?toolbar=1" width="100%" height="100%">
</iframe>

toolbar

启动时自动执行代码

自定义启动代码可以自动在启动时执行

<iframe src="https://replite.vercel.app/retro/consoles?kernel=python&code=import numpy as np" width="100%" height="100%">
</iframe>

https://user-images.githubusercontent.com/591645/152204519-7980e9f6-ef56-4263-bb79-4fcf3e4fd2be.mp4

创建您的自定义部署

TBD

开发

# create a new environment
mamba create -n replite -c conda-forge jupyterlab=3 jupyter-packaging python nodejs -y
conda activate replite

# Install JupyterLite
python -m pip install jupyterlite

# Install package in development mode
python -m pip install -e .

# Link your development version of the extension
jupyter labextension develop . --overwrite

# Rebuild extension TypeScript source after making changes
jlpm run build

项目详情


下载文件

下载适用于您的平台文件。如果您不确定选择哪个,请了解更多关于安装软件包的信息。

源分发

replite-0.1.1.tar.gz (149.9 kB 查看哈希值)

上传于

构建分布

replite-0.1.1-py3-none-any.whl (101.6 kB 查看哈希)

上传于 Python 3

支持者

AWS AWS 云计算和安全赞助商 Datadog Datadog 监控 Fastly Fastly CDN Google Google 下载分析 Microsoft Microsoft PSF 赞助商 Pingdom Pingdom 监控 Sentry Sentry 错误日志 StatusPage StatusPage 状态页面