• Stars
    star
    186
  • Rank 207,316 (Top 5 %)
  • Language
    Python
  • License
    MIT License
  • Created over 8 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Replace default flask shell command by similar command running IPython.

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.

More Repositories

1

sqlacrossover

SQLAlchemy-based cross-database migration tool
Python
17
star
2

imbench

Python image decoding benchmark
Python
9
star
3

python-conntrack

Simple ctypes interface to libnetfilter_conntrack
Python
7
star
4

rss-xmpp

Simple rss2xmpp bot for Google App Engine
Python
6
star
5

vscale-slackbot

Slackbot for vscale.io hosting
Python
3
star
6

nginx2es

Put parsed access.log to Elasticsearch (the right way)
Python
3
star
7

docker-selenium-screenshot

Docker container with service making screenshots with Selenium
Python
3
star
8

geocoder

ElasticSearch geocoder service for HERE® NavStreets using Flask.
Python
3
star
9

charon

Web-debugging proxy.
Python
3
star
10

django-tas

Traffic accouting system written in Python, based on Netfilter and Conntrack, and using Django.
Python
2
star
11

kill-timeout

Python library to limit the function execution time
Python
2
star
12

yarn-apps-exporter

Python
2
star
13

go-pyrun

Run Python code and get result back to Golang
Go
2
star
14

bincount

No-copy parallelized bincount returning dict
Python
2
star
15

ansible-newrelic-npi

New Relic Platform Installer role and npi module for ansible
Shell
2
star
16

hlcup

My Highload Cup 2017/08 solution
Go
2
star
17

wingsitv

Linux utilities pack for clients of WingsITV ISP.
Python
2
star
18

samba-gtk

My branch of samba-gtk
C
1
star
19

muffin-classy

Python
1
star
20

sts

Криптографический протокол Station-to-Station
C
1
star
21

pygtk-conntrack

Tool to display and manipulate network connections tracked by conntrack.
Python
1
star
22

django-personaltodo

Todo list to monitor things.
JavaScript
1
star
23

trinkup

TRivial INcremental bacKUP script
Shell
1
star
24

hltank

Go
1
star
25

docker-yandex-tank

Docker container with Yandex.Tank
1
star
26

rus_gov_elections_2011

Python
1
star
27

tormon

Data monitor using Tornado.
JavaScript
1
star
28

kafkafs

Distributed filesystem based on Kafka and FUSE
Python
1
star
29

pytbclock

Fluid digital clock for terminal.
Python
1
star
30

rsazkp

Доказательство с нулевым разглашением знания закрытого ключа RSA.
C
1
star
31

pytralog

Python Traffic Logger
Python
1
star