Name | gpt-vis JSON |
Version |
0.1.1
JSON |
| download |
home_page | None |
Summary | A Python wrapper for gpt-vis-cli, enabling programmatic and command-line chart generation. |
upload_time | 2025-07-11 13:52:53 |
maintainer | None |
docs_url | None |
author | Gency Lee |
requires_python | >=3.8 |
license | MIT |
keywords |
visualization
charts
gpt
cli
|
VCS |
 |
bugtrack_url |
|
requirements |
pydantic
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# gpt-vis
**English** | [简体中文](./README_zh-CN.md) | [日本語](./README_ja.md) | [Español](./README_es.md) | [Français](./README_fr.md) | [Deutsch](./README_de.md)
A Python wrapper for [gpt-vis-cli](https://github.com/connect-a-sketch/gpt-vis-cli), enabling programmatic and command-line chart generation.
## Installation
Install the package using pip:
```bash
pip install gpt-vis
```
Or, if you have cloned the repository, you can install it in editable mode using Poetry:
```bash
poetry install
```
## Usage
### As a Python Library
You can use `gpt-vis` to generate charts programmatically within your Python applications.
```python
from gpt_vis_python.charts import render_bar_chart, BarChartOptions, BarChartData
# Define options for a bar chart
bar_chart_options = BarChartOptions(
data=[
BarChartData(category="A", value=10),
BarChartData(category="B", value=20),
BarChartData(category="C", value=15),
],
title="Sample Bar Chart",
axisXTitle="Category",
axisYTitle="Value",
)
# Render the bar chart and save it to a file
render_bar_chart(options=bar_chart_options, output_path="bar_chart.png")
```
### As a Command-Line Tool
`gpt-vis` also provides a command-line interface for quick chart generation.
```bash
gpt-vis '''{"type": "bar", "data": [{"category": "A", "value": 10}, {"category": "B", "value": 20}], "title": "My Chart"}''' output.png
```
## Available Charts
`gpt-vis` supports a wide variety of chart types:
- Area
- Bar
- Boxplot
- Column
- District Map
- Dual Axes
- Fishbone Diagram
- Flow Diagram
- Funnel
- Histogram
- Line
- Liquid
- Mind Map
- Network Graph
- Organization Chart
- Path Map
- Pie
- Radar
- Sankey
- Scatter
- Treemap
- Venn
- Violin
- Word Cloud
For detailed options for each chart type, please refer to the `gpt_vis_python/charts.py` file.
## Development
To run the tests, execute the following command:
```bash
poetry run pytest
```
To run the demo, which generates a variety of chart images in the `output` directory:
```bash
poetry run python run.py
```
Raw data
{
"_id": null,
"home_page": null,
"name": "gpt-vis",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "visualization, charts, gpt, cli",
"author": "Gency Lee",
"author_email": "lichen900210@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/f4/b7/b1a8aa5f0cc6dd620e92ec322bac14d767a926d1d56c3409a910e458f809/gpt_vis-0.1.1.tar.gz",
"platform": null,
"description": "# gpt-vis\n\n**English** | [\u7b80\u4f53\u4e2d\u6587](./README_zh-CN.md) | [\u65e5\u672c\u8a9e](./README_ja.md) | [Espa\u00f1ol](./README_es.md) | [Fran\u00e7ais](./README_fr.md) | [Deutsch](./README_de.md)\n\nA Python wrapper for [gpt-vis-cli](https://github.com/connect-a-sketch/gpt-vis-cli), enabling programmatic and command-line chart generation.\n\n## Installation\n\nInstall the package using pip:\n\n```bash\npip install gpt-vis\n```\n\nOr, if you have cloned the repository, you can install it in editable mode using Poetry:\n\n```bash\npoetry install\n```\n\n## Usage\n\n### As a Python Library\n\nYou can use `gpt-vis` to generate charts programmatically within your Python applications.\n\n```python\nfrom gpt_vis_python.charts import render_bar_chart, BarChartOptions, BarChartData\n\n# Define options for a bar chart\nbar_chart_options = BarChartOptions(\n data=[\n BarChartData(category=\"A\", value=10),\n BarChartData(category=\"B\", value=20),\n BarChartData(category=\"C\", value=15),\n ],\n title=\"Sample Bar Chart\",\n axisXTitle=\"Category\",\n axisYTitle=\"Value\",\n)\n\n# Render the bar chart and save it to a file\nrender_bar_chart(options=bar_chart_options, output_path=\"bar_chart.png\")\n```\n\n### As a Command-Line Tool\n\n`gpt-vis` also provides a command-line interface for quick chart generation.\n\n```bash\ngpt-vis '''{\"type\": \"bar\", \"data\": [{\"category\": \"A\", \"value\": 10}, {\"category\": \"B\", \"value\": 20}], \"title\": \"My Chart\"}''' output.png\n```\n\n## Available Charts\n\n`gpt-vis` supports a wide variety of chart types:\n\n- Area\n- Bar\n- Boxplot\n- Column\n- District Map\n- Dual Axes\n- Fishbone Diagram\n- Flow Diagram\n- Funnel\n- Histogram\n- Line\n- Liquid\n- Mind Map\n- Network Graph\n- Organization Chart\n- Path Map\n- Pie\n- Radar\n- Sankey\n- Scatter\n- Treemap\n- Venn\n- Violin\n- Word Cloud\n\nFor detailed options for each chart type, please refer to the `gpt_vis_python/charts.py` file.\n\n## Development\n\nTo run the tests, execute the following command:\n\n```bash\npoetry run pytest\n```\n\nTo run the demo, which generates a variety of chart images in the `output` directory:\n\n```bash\npoetry run python run.py\n```\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A Python wrapper for gpt-vis-cli, enabling programmatic and command-line chart generation.",
"version": "0.1.1",
"project_urls": {
"Homepage": "https://github.com/JuneLeGency/gpt-vis-cli",
"Repository": "https://github.com/JuneLeGency/gpt-vis-cli"
},
"split_keywords": [
"visualization",
" charts",
" gpt",
" cli"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "d50703970478550d594f586b9e4ab46596d02f00faec3b0d5ea1e1b4e59e231d",
"md5": "bd27734a22c6c5cff4e59f029ae5f978",
"sha256": "6b19d70460368881eea2d685b5fe260ee3db11de37d50ee79bd19e4efea9bf17"
},
"downloads": -1,
"filename": "gpt_vis-0.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "bd27734a22c6c5cff4e59f029ae5f978",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 10649,
"upload_time": "2025-07-11T13:52:52",
"upload_time_iso_8601": "2025-07-11T13:52:52.779330Z",
"url": "https://files.pythonhosted.org/packages/d5/07/03970478550d594f586b9e4ab46596d02f00faec3b0d5ea1e1b4e59e231d/gpt_vis-0.1.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "f4b7b1a8aa5f0cc6dd620e92ec322bac14d767a926d1d56c3409a910e458f809",
"md5": "a334465ff4ab05ec6637368c808d59d3",
"sha256": "745d88085d69731d6373e288dabdd059146faee680c20485d085561a0ea9c4c7"
},
"downloads": -1,
"filename": "gpt_vis-0.1.1.tar.gz",
"has_sig": false,
"md5_digest": "a334465ff4ab05ec6637368c808d59d3",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 10073,
"upload_time": "2025-07-11T13:52:53",
"upload_time_iso_8601": "2025-07-11T13:52:53.954864Z",
"url": "https://files.pythonhosted.org/packages/f4/b7/b1a8aa5f0cc6dd620e92ec322bac14d767a926d1d56c3409a910e458f809/gpt_vis-0.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-11 13:52:53",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "JuneLeGency",
"github_project": "gpt-vis-cli",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [
{
"name": "pydantic",
"specs": [
[
">=",
"1.9.1"
],
[
"<",
"2.0.0"
]
]
}
],
"lcname": "gpt-vis"
}