Metadata-Version: 2.2
Name: decpython
Version: 0.1.0
Summary: 跨平台、支持 Web 通信的 Python 终端工具
Home-page: https://github.com/your-username/decpython_maskter
Author: decpython
Author-email: decrule@outlook.com
License: MIT
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.9.0
Description-Content-Type: text/markdown
Provides-Extra: dev
Requires-Dist: pytest>=7; extra == "dev"
Requires-Dist: ruff>=0.1; extra == "dev"
Dynamic: author-email
Dynamic: home-page
Dynamic: requires-python

# DecPython

Run Python in a subprocess from your code and get string results, or open a Jupyter-style web terminal. Cross-platform, stdlib only.

## Install

```bash
pip install -e .
```

## Quick start

```python
from decpython import DecPython

dp = DecPython(gui=False, python='python')
result = dp.send('a = 1\nb = 2\na + b')   # -> '3'
dp.close()
```

With a web UI: use `gui=True` and optionally `python='python3.12'`. Code and results from `send()` appear in the browser. Press Shift+Enter or click Run in the page.

## API

- **`send(code)`** — Run code; returns the last expression as a string (or the error message).
- **`close()`** — Stop the subprocess and, if used, the web server.

## License

MIT
