# syntaxedit
[![test](https://github.com/davidwinter/syntaxedit/workflows/ci_cd/badge.svg)](https://github.com/davidwinter/syntaxedit/actions?query=workflow%3Aci_cd) [![PyPI](https://img.shields.io/pypi/v/syntaxedit)](https://pypi.org/project/syntaxedit/)
> A simple Python Qt syntax highlighting widget
![syntaxedit](https://raw.githubusercontent.com/davidwinter/syntaxedit/main/example.png)
## Features
- Extensive [syntax](https://pygments.org/languages/) and [theme](https://pygments.org/styles/) support - powered by [Pygments](https://pygments.org)
- Set font and font size
- Set indentation size
## Usage
1. Install package
```shell
pip install syntaxedit
```
Or
```shell
poetry add syntaxedit
```
2. In your app, include the package, and create a `SyntaxEdit` widget:
```python
from syntaxedit.core import SyntaxEdit
code = """# Todo list
- [ ] Go shopping
- [x] Walk the dog"""
widget = SyntaxEdit(code)
```
### Available options
- `content`: the initial content for the widget. **Default:** `""`
- `parent`: parent Qt widget for SyntaxEdit. **Default:** `None`
- `font`: the font family for the widget. **Default:** `"Courier New"`
- `font_size`: size to use for the font. **Default:** `13`
- `syntax`: the code [syntax](https://pygments.org/languages/) to use. **Default:** `"Markdown"`
- `theme`: the syntax [theme](https://pygments.org/styles/) to use. **Default:** `"solarized-light"`
- `indentation_size`: the size for indentation. **Default:** `4`
- `use_theme_background`: whether to use the background colour from the theme or to not set one. **Default:** `True`
## Authors
By [David Winter](https://github.com/davidwinter)
## License
MIT
Raw data
{
"_id": null,
"home_page": "https://github.com/davidwinter/syntaxedit",
"name": "syntaxedit",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.7.2,<3.12",
"maintainer_email": "",
"keywords": "qt,pyside,pyqt,syntax highlighting",
"author": "David Winter",
"author_email": "i@djw.me",
"download_url": "https://files.pythonhosted.org/packages/24/97/3b69fccf7c2fed6dd0692ae0be6a3bdf229b42e8d5d028052226262468cd/syntaxedit-0.3.0.tar.gz",
"platform": null,
"description": "# syntaxedit\n\n[![test](https://github.com/davidwinter/syntaxedit/workflows/ci_cd/badge.svg)](https://github.com/davidwinter/syntaxedit/actions?query=workflow%3Aci_cd) [![PyPI](https://img.shields.io/pypi/v/syntaxedit)](https://pypi.org/project/syntaxedit/)\n\n> A simple Python Qt syntax highlighting widget\n\n![syntaxedit](https://raw.githubusercontent.com/davidwinter/syntaxedit/main/example.png)\n\n## Features\n\n- Extensive [syntax](https://pygments.org/languages/) and [theme](https://pygments.org/styles/) support - powered by [Pygments](https://pygments.org)\n- Set font and font size\n- Set indentation size\n\n## Usage\n\n1. Install package\n\n ```shell\n pip install syntaxedit\n ```\n\n Or\n\n ```shell\n poetry add syntaxedit\n ```\n\n2. In your app, include the package, and create a `SyntaxEdit` widget:\n\n ```python\n from syntaxedit.core import SyntaxEdit\n\n code = \"\"\"# Todo list\n\n - [ ] Go shopping\n - [x] Walk the dog\"\"\"\n\n widget = SyntaxEdit(code)\n ```\n\n### Available options\n\n- `content`: the initial content for the widget. **Default:** `\"\"`\n- `parent`: parent Qt widget for SyntaxEdit. **Default:** `None`\n- `font`: the font family for the widget. **Default:** `\"Courier New\"`\n- `font_size`: size to use for the font. **Default:** `13`\n- `syntax`: the code [syntax](https://pygments.org/languages/) to use. **Default:** `\"Markdown\"`\n- `theme`: the syntax [theme](https://pygments.org/styles/) to use. **Default:** `\"solarized-light\"`\n- `indentation_size`: the size for indentation. **Default:** `4`\n- `use_theme_background`: whether to use the background colour from the theme or to not set one. **Default:** `True`\n\n## Authors\n\nBy [David Winter](https://github.com/davidwinter)\n\n## License\n\nMIT\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Syntax highlighting Qt text widget",
"version": "0.3.0",
"split_keywords": [
"qt",
"pyside",
"pyqt",
"syntax highlighting"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "97b6c1d15de62baa76e893f835cefdee9abddf2718510d0d859a09256a2ef0f9",
"md5": "6ca0ded632f00628d363969b176da017",
"sha256": "b49564f0917ab3f3c1977d5f159c039aeeff85bb9e433d6f30607f408163e573"
},
"downloads": -1,
"filename": "syntaxedit-0.3.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "6ca0ded632f00628d363969b176da017",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7.2,<3.12",
"size": 4271,
"upload_time": "2023-01-23T21:01:52",
"upload_time_iso_8601": "2023-01-23T21:01:52.666250Z",
"url": "https://files.pythonhosted.org/packages/97/b6/c1d15de62baa76e893f835cefdee9abddf2718510d0d859a09256a2ef0f9/syntaxedit-0.3.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "24973b69fccf7c2fed6dd0692ae0be6a3bdf229b42e8d5d028052226262468cd",
"md5": "d307a259d39e38e38deba3751bd93351",
"sha256": "cbe45f9bffb68a512bb5519d077718f3d4da01c56a6dc44a7c9b9569629b9139"
},
"downloads": -1,
"filename": "syntaxedit-0.3.0.tar.gz",
"has_sig": false,
"md5_digest": "d307a259d39e38e38deba3751bd93351",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7.2,<3.12",
"size": 3941,
"upload_time": "2023-01-23T21:01:54",
"upload_time_iso_8601": "2023-01-23T21:01:54.222672Z",
"url": "https://files.pythonhosted.org/packages/24/97/3b69fccf7c2fed6dd0692ae0be6a3bdf229b42e8d5d028052226262468cd/syntaxedit-0.3.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-01-23 21:01:54",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "davidwinter",
"github_project": "syntaxedit",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "syntaxedit"
}