# drepl

> Disent REPL

Latest version **0.1.18** (published 2024-05-02) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install drepl
pnpm add drepl
yarn add drepl
bun add drepl
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.18 |
| Published | 2024-05-02 |
| First published | 2024-04-02 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 211.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Disent |
| Maintainers | disentchris |
| Keywords | repl, python, interactive |

## Links

- npm: https://www.npmjs.com/package/drepl
- Repository: https://github.com/disentcorp/drepl
- Homepage: https://github.com/disentcorp/drepl#readme
- Issues: https://github.com/disentcorp/drepl/issues
- npm.io page: https://npm.io/package/drepl

## Dependencies (2)

- [react-ga4](https://npm.io/package/react-ga4.md) ^2.1.0
- [react-tippy](https://npm.io/package/react-tippy.md) ^1.4.0

## Recent versions

- 0.1.18 (latest) — 2024-05-02
- 0.1.17 — 2024-05-01
- 0.1.16 — 2024-04-09
- 0.1.15 — 2024-04-08
- 0.1.14 — 2024-04-08
- 0.1.13 — 2024-04-08
- 0.1.12 — 2024-04-08
- 0.1.11 — 2024-04-05
- 0.1.10 — 2024-04-04
- 0.1.6 — 2024-04-02

## README

# DREPL

## [Disent](https://www.disent.com) [REPL](https://repl.disent.com) widget

Widget to put mini python cells in your docs, webpages, whatnot.

Current version supports `python` for RCE (remote code execution) on [`repl.disent.com`](https://repl.disent.com) using our sandbox. `bash` has a theme but no RCE. Maybe we add more? Let us know.

<br/> 

**Feedback please**

- repl@disent.com
- https://discord.gg/PFQxJMm4Kb

## Install

```bash
bash$ yarn add drepl 
```

## Use

```jsx
import { Repl } from 'drepl';
<Repl defaultInput={"print(\"Hello World!\")"} />
```

![Hello World](https://github.com/disentcorp/drepl/blob/main/src/lib/components/assets/helloworld.png "Hello World")

^ this a picture, github doesn't allow embedded widgets 😔 (@github [📧 us](mailto://repl@disent.com) we can help with that!)

## Props

|prop|default|description|
|-|-|-|
`replURI`|`"https://repl.disent.com"`|REPL server|
`defaultInput`|`""`|initial input next to prompt|
`defaultOutput`|`""`|inital output to display|
`imports`|`""`|code you don't want user to see, like imports|
`disabled`|`false`|disables user interactivity, shows default input/output|
`multiLine`|`false`|vertical mode|
`language`|`"python"`|also have `"bash"` (doesn't execute)|
`width` |`"525px"`|width|
`height`|`"225px"`|height (only if `multiLine=true`)|
`inputRatio`|`40`|% input to output|
`runOnLoad`|`true`|run on initial page load|


## Pure JS/HTML way

For the props above just add as data-* tags on the <div> below

```js
<div class="disent-embed" data-defaultinput='print("Hello World")'></div>
<script type='text/javascript' src="http://repl.disent.com/drepl.js" async></script>
```

---
_Source: https://npm.io/package/drepl · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
