Coder Social home page Coder Social logo

sajithamma / streamlit-code-editor Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bouzidanas/streamlit-code-editor

0.0 0.0 0.0 272.99 MB

A code editor component for Streamlit apps, built on top of react-ace, with custom themes and customizable interface elements.

License: MIT License

JavaScript 43.55% Python 18.27% TypeScript 32.57% HTML 4.25% SCSS 1.36%

streamlit-code-editor's Introduction

streamlit code editor Version Downloads

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

Alternatively, you can download the source from the download page and after unzipping, install with:

python setup.py install

(make sure you are in the same directory as 'setup.py' in the unzipped folder).

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

Component Guide guide

Demo

Component Demo

demo

streamlit-code-editor's People

Contributors

bouzidanas avatar

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.