React-ace editor customized for Streamlit
Project description
streamlit code editor
A code editor component for streamlit.io apps, built on top of react-ace, with custom themes and customizable interface elements.
Installation
Install streamlit-code-editor with pip:
pip install streamlit_code_editor
Usage
To add a Code Editor to Streamlit python app, import code_editor
and then call the code_editor
function with the code you want to edit (as a string):
import streamlit as st
from code_editor import code_editor
response_dict = code_editor(your_code_string)
Without specifying a language, the editor will default to python
. You can also specify a language with the lang
argument:
# The default value for the lang argument is "python"
response_dict = code_editor(your_code_string, lang="javascript")
By default, each code editor is styled like streamlit's code component. We will go over how to customize the styling in a later section.
Docs
Demo
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for streamlit-code-editor-0.1.14.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | cfb5bdac3d5a2eeeaee9b969fab91dd8a0136c893b43f0d99a7583643f88e9bc |
|
MD5 | 5b188ad07ae900fc60b2362feddd0a22 |
|
BLAKE2b-256 | 6c3d8cd873345d54ec1855ed295215ff4a312b6c5479851814e6d400d2acbe7c |
Close
Hashes for streamlit_code_editor-0.1.14-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0cdcc4dc6e368551eea444c487936882e35f828e701bdaea0507b7936ff286fc |
|
MD5 | 5b083d127a8a61af18116b5b351525c5 |
|
BLAKE2b-256 | 7486888883f07dde8e25a528d26648bdf4ded690be587981b3c3a13f16b52b29 |