Metadata-Version: 2.4
Name: VisualPy
Version: 1.1.1
Summary: Cross-platform Python interactive shell with syntax highlighting, autocompletion, and code hints
License-Expression: MIT
License-File: LICENSE
Author: Nikita Denissov
Author-email: n.denissov@proton.me
Requires-Python: >=3.8
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: System Administrators
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Software Development :: Interpreters
Classifier: Topic :: Terminals
Classifier: Topic :: Text Editors
Classifier: Typing :: Typed
Requires-Dist: pygments (<2.20.0)
Requires-Dist: pyperclip (>=1.11.0,<2.0.0)
Requires-Dist: readchar (>=4.2.2,<5.0.0)
Requires-Dist: rich (<15.0.0)
Project-URL: Homepage, https://github.com/ndenissov/VisualPy
Project-URL: Repository, https://github.com/ndenissov/VisualPy
Description-Content-Type: text/markdown

# VisualPy

[![PyPI version](https://img.shields.io/pypi/v/VisualPy.svg)](https://pypi.org/project/VisualPy/)
[![Downloads](https://static.pepy.tech/badge/VisualPy)](https://pepy.tech/project/VisualPy)
[![Python versions](https://img.shields.io/pypi/pyversions/VisualPy.svg)](https://pypi.org/project/VisualPy/)
[![License](https://img.shields.io/pypi/l/VisualPy.svg)](https://github.com/ndenissov/VisualPy/blob/main/LICENSE)
[![GitHub stars](https://img.shields.io/github/stars/ndenissov/VisualPy)](https://github.com/ndenissov/VisualPy/stargazers)

VisualPy is a modern, cross-platform interactive Python console featuring real-time syntax highlighting, autocompletion, import suggestions, and live code hints. Designed as a lightweight alternative to IPython and bpython, it runs seamlessly on both CPython and PyPy runtimes.

## Features

- Real-Time Syntax Highlighting: Powered by Pygments with support for dark and light background themes.
- Autocompletion & Tooltips: Code hints for built-ins, standard libraries, and imported modules.
- Dual Runtime Support: Full compatibility with both CPython and PyPy.
- Cross-Platform Clipboard Integration: Effortless code snippet copying and pasting.
- Configurable Lexers: Custom terminal cursor styles and multiple syntax lexer options.

## Installation

### Via PyPI

```bash
pip install VisualPy -U
```

### Via Poetry

```bash
poetry add VisualPy
```

## Quick Start

Launch the interactive shell using the installed command-line utility or Python module runner:

```bash
vpy
```

Or via python executable:

```bash
python -m vpy
```

### Command-Line Arguments

```text
usage: vpy [-h] [-dbg]
           [-lex {PythonLexer,PythonConsoleLexer,PythonTracebackLexer,Python2Lexer,Python2TracebackLexer,CythonLexer,DgLexer,NumPyLexer}]
           [-t-lex {PythonLexer,PythonConsoleLexer,PythonTracebackLexer,Python2Lexer,Python2TracebackLexer,CythonLexer,DgLexer,NumPyLexer}]
           [-cr CURSOR] [-i INTERACT_IT] [-q]

optional arguments:
  -h, --help            Show this help message and exit

Highlight Options:
  -dbg, --darkbg        Adapt syntax colors for dark terminal backgrounds

Lexer Options:
  -lex, --lexer         Select primary syntax lexer (default: PythonLexer)
  -t-lex, --traceback-lexer
                        Select lexer for traceback formatting (default: PythonTracebackLexer)
  -cr, --cursor         Set custom interactive prompt cursor string

Python Options:
  -i, --interact-it     Inspect environment interactively after running script
  -q, --quiet           Suppress startup version and copyright banner
```

## Screenshots

### Interactive Console

![Interactive Console](screenshots/main.png)
![Options Showcase](screenshots/many_options.png)

### CPython Environment

![CPython Runtime](screenshots/CPython.png)

### Auto-Completion & Import Hints

![Import Hints](screenshots/import_hints.png)
![Import Completion](screenshots/import.png)

### Themes

#### Dark Theme (Default)
![Dark Theme](screenshots/dark_theme.png)

#### Light Theme (`--darkbg` flag)
![Light Theme](screenshots/light_theme.png)

## License

Distributed under the MIT License. See [LICENSE](LICENSE) for more details.

## Author

Created and maintained by **Nikita Denissov** ([@ndenissov](https://github.com/ndenissov)).

