Docs

Embedding Your Widget

You can embed py.space’s editor in another website or repository. This lets people edit your code, run your code, and fork the widget for themselves.

It’s a useful feature if you maintain a Python library or SDK and want to show how to use your library.

Quickstart

To embed your widget, start by making your widget public by clicking the Public button in the top right of the widget editor.

Annotated image of the editor with the Public button highlighted in the top right.

The Public button at the top right of the editor

Then click the Share Button Sharing Icon to open the widget’s sharing screen.

The sharing modal showing both options for embedding with HTML or GitHub

The sharing modal showing both options for embedding with HTML or GitHub

The sharing screen contains all the information you need to embed your widget.

If you’re publishing on another platform

py.space widgets support the oEmbed standard, which means that supporting websites can automatically embed a read-only copy of your source code. To embed on one of these platforms, copy the widget’s Sharing URL, and paste it into your target platform’s editor.

Try pasting a link to your widget in the py.space forum!

Our oEmbed support is a work in progress: If you have a particular platform you want us to support, please post about it on the py.space forum!

If you’re editing raw HTML

If you’re building a website from scratch, copy the Embedding HTML from the Sharing dialog and paste it into your webpage.

If you’re using an unsupported platform with Markdown

If you’re working on a platform, like GitHub, that doesn’t support embedding, you can copy from the “Embed in GitHub” text box.


Do you still have questions?

Our Community Forum is full of helpful information and friendly experts.