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:
```bash
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):
```python
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:
```python
# 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
[](https://code-editor-documentation.streamlit.app/)
## Demo
[](https://bouzidanas-streamlit-i-streamlit-code-editorexamplesdemo-lq20k3.streamlit.app/)
Raw data
{
"_id": null,
"home_page": "https://github.com/bouzidanas/streamlit-code-editor",
"name": "streamlit-code-editor",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": null,
"author": "Anas Bouzid",
"author_email": "anasbouzid@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/67/6f/fc455957652d0f42124dbc3090fe58b8919ad5bcba575a36669499ded952/streamlit-code-editor-0.1.22.tar.gz",
"platform": null,
"description": "streamlit code editor\n============\n\nA code editor component for streamlit.io apps, built on top of react-ace, with custom themes and customizable interface elements.\n\n## Installation\nInstall streamlit-code-editor with pip:\n```bash\npip install streamlit_code_editor\n```\n\n## Usage\nTo 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):\n```python\nimport streamlit as st\nfrom code_editor import code_editor\n\nresponse_dict = code_editor(your_code_string)\n```\nWithout specifying a language, the editor will default to `python`. You can also specify a language with the `lang` argument:\n```python\n# The default value for the lang argument is \"python\"\nresponse_dict = code_editor(your_code_string, lang=\"javascript\")\n```\nBy default, each code editor is styled like streamlit's code component. We will go over how to customize the styling in a later section.\n## Docs \n[](https://code-editor-documentation.streamlit.app/)\n\n## Demo\n\n[](https://bouzidanas-streamlit-i-streamlit-code-editorexamplesdemo-lq20k3.streamlit.app/)\n",
"bugtrack_url": null,
"license": null,
"summary": "React-ace editor customized for Streamlit",
"version": "0.1.22",
"project_urls": {
"Homepage": "https://github.com/bouzidanas/streamlit-code-editor"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "4353298050f856bfdd7dd47fbcd998af92ec47479a4c0fc1a89ff90c4f27a74a",
"md5": "897aa3235509b9df0fd0e763afb4a0f6",
"sha256": "31abe12a94abde64123f71049741c248cd52c9de7869decd32a8a5a96695fcf4"
},
"downloads": -1,
"filename": "streamlit_code_editor-0.1.22-py3-none-any.whl",
"has_sig": false,
"md5_digest": "897aa3235509b9df0fd0e763afb4a0f6",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 4036058,
"upload_time": "2024-12-29T22:30:18",
"upload_time_iso_8601": "2024-12-29T22:30:18.897936Z",
"url": "https://files.pythonhosted.org/packages/43/53/298050f856bfdd7dd47fbcd998af92ec47479a4c0fc1a89ff90c4f27a74a/streamlit_code_editor-0.1.22-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "676ffc455957652d0f42124dbc3090fe58b8919ad5bcba575a36669499ded952",
"md5": "e6bb8c6331af15078526e9090a43965d",
"sha256": "93e6ecb4060614bce99eaf758b4cb5c8ce2accc0eb5140cbbb23c05cb4e9d7f6"
},
"downloads": -1,
"filename": "streamlit-code-editor-0.1.22.tar.gz",
"has_sig": false,
"md5_digest": "e6bb8c6331af15078526e9090a43965d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 3788010,
"upload_time": "2024-12-29T22:30:22",
"upload_time_iso_8601": "2024-12-29T22:30:22.441829Z",
"url": "https://files.pythonhosted.org/packages/67/6f/fc455957652d0f42124dbc3090fe58b8919ad5bcba575a36669499ded952/streamlit-code-editor-0.1.22.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-29 22:30:22",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "bouzidanas",
"github_project": "streamlit-code-editor",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "streamlit-code-editor"
}