Skip to main content

Flask-Shell-IPython

flask-shell-ipython is a Python package that replaces the default flask shell command with a similar command that runs IPython. This provides an enhanced interactive Python shell with additional features like syntax highlighting, tab-completion, and more.

Installation

To install flask-shell-ipython, simply run:

pip install flask-shell-ipython

Usage

After installing flask-shell-ipython, the flask shell command will automatically use IPython instead of the default Python shell. There are no additional steps required.

flask shell

You can also pass any valid IPython arguments after the flask shell command:

flask shell --no-banner -i foo.py

Configuration

You can configure IPython settings by adding an IPYTHON_CONFIG key to your Flask app's configuration. The value should be a dictionary containing the configuration options you'd like to set.

For example:

app.config['IPYTHON_CONFIG'] = {
    'InteractiveShell': {
        'colors': 'Linux',
        'confirm_exit': False,
    },
}

Testing

To run tests for flask-shell-ipython, install the pytest-forked plugin, which enables running tests in isolated forked subprocesses to ensure running a clean IPython instance for each test case.

Installing Dependencies

Install testing dependencies from requirements-test.txt:

pip install -r requirements-test.txt

Running Tests

After installing the dependencies, run the test suite with the --forked option:

pytest --forked

Please, note that does pytest-forked does not work on Windows. To test flask-shell-ipython on Windows run each test manually.

License

flask-shell-ipython is licensed under the MIT License. See the LICENSE file for more information.

Contributing

If you'd like to contribute to the project, feel free to submit a pull request on the GitHub repository at http://github.com/ei-grad/flask-shell-ipython.

Release files for flask-shell-ipython 0.5.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for flask-shell-ipython 0.5.3
File Size Uploaded
flask_shell_ipython-0.5.3.tar.gz 4.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for flask-shell-ipython 0.5.3
File Interpreter ABI Platform
flask_shell_ipython-0.5.3-py3-none-any.whl Python 3 none any Details

Total release size: 7.9 kB

Release files / flask_shell_ipython-0.5.3.tar.gz

Download URL flask_shell_ipython-0.5.3.tar.gz
Size 4.0 kB
Tags Source
SHA-256 checksum
How to use checksums
1a8bb90da18c34d15bc4ad817820101fffa93507a7eb685532ed518aea280848
BLAKE2b-256 checksum
How to use checksums
1485cd1341451be9f34a5ab8895b596ca606aef6ce643452d47148c17d4a96a9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.5

Release files / flask_shell_ipython-0.5.3-py3-none-any.whl

Download URL flask_shell_ipython-0.5.3-py3-none-any.whl
Size 3.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c0a1905671ba7223d36e59854e7900832a0febf127e5c01793377af878560ebd
BLAKE2b-256 checksum
How to use checksums
15e05e8480206303e4bd7340d74fce4be21340a762ba1f7ce2c6219def66eff2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.5

Release history Release notifications | RSS feed

This release

0.5.3 This release

2 release files

0.5.2

2 release files

0.5.1

1 release file

0.5.0

1 release file

0.4.1

2 release files

0.4.0

2 release files

0.3.1

3 release files

0.2.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page