CLI and configuration utility for the Python shell, optimized for simplicity and productivity.
Project description
=====
konch
=====
.. image:: https://badge.fury.io/py/konch.svg
:target: http://badge.fury.io/py/konch
:alt: Latest version
.. image:: https://travis-ci.org/sloria/konch.svg?branch=master
:target: https://travis-ci.org/sloria/konch
:alt: Travis-CI
.. image:: https://readthedocs.org/projects/konch/badge/
:target: http://konch.readthedocs.io/
:alt: Documentation
.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
:target: https://github.com/ambv/black
:alt: Code style: Black
Configures your Python shell
============================
**konch** is a CLI and configuration utility for the Python shell, optimized for simplicity and productivity.
- **Automatically import** any object upon startup
- **Simple**, per-project configuration in a single file (it's just Python code)
- **No external dependencies**
- Uses **IPython**, **BPython**, or **ptpython** if available, and falls back to built-in interpreter
- Automatically load **IPython extensions**
- Can have multiple configurations per project using **named configs**
.. image:: http://zippy.gfycat.com/EachTerrificChupacabra.gif
:alt: Demo
:target: http://konch.readthedocs.io
`http://konch.readthedocs.io <http://konch.readthedocs.io>`_
============================================================
*********
Changelog
*********
3.0.0 (2018-12-22)
------------------
Features:
- Config files must be approved before executing them.
Use ``konch allow`` to authorize a config file. This is a security mechanism to prevent
executing untrusted Python code (:issue:`47`). Thanks :user:`hartwork` for the suggestion.
- Allow customizing the editor to use for ``konch edit`` via the
``KONCH_EDITOR`` environment variable.
- ``konch init`` only adds the encoding pragma (``# -*- coding: utf-8 -*-\n``) on Python 2.
- Raise error when an invalid ``--name`` is passed.
Bug fixes:
- Respect ptpython's user config file (``~/.ptpython/config.py``)
(:issue:`16`). Thanks :user:`nasyxx` for reporting and thanks
:user:`pycadelic` for helping out with the implementation.
- Address a ``DeprecationWarning`` about importing from ``collections.abc`` on Python 3.7.
2.5.0 (2018-11-04)
------------------
- Update dev environment.
- Python 3.4 is no longer officially supported.
- Tested on Python 3.7.
2.4.0 (2017-04-29)
------------------
Features:
- Add basic tab-completion to plain Python shell.
2.3.0 (2016-12-23)
------------------
Features:
- Allow ``context`` to be a callable.
- Multiple names may be passed to ``named_config``.
2.2.1 (2016-12-19)
------------------
Bug fixes:
- Fix error raised when some options are passed to ``konch.named_config``.
2.2.0 (2016-07-21)
------------------
Features:
- Add ``ipy_colors`` and ``ipy_highlighting_style`` options for customizing IPython terminal colors.
2.1.0 (2016-07-18)
------------------
Features:
- Compatibility with IPython>=5.0.0.
Support:
- Update tasks.py for compatibility with invoke>=0.13.0.
2.0.0 (2016-06-01)
------------------
Features:
- Customizable context formatting via the ``context_format`` option.
- More CONCHES!
Deprecations/Removals:
- Remove ``hide_context`` option. Use the ``context_format`` option instead.
- Drop support for Python<=2.6 and <=3.3.
Bug fixes:
- Fix bug in checking availability of PtIPython.
- Fix bug in passing shell subclass as ``shell`` argument to ``konch.start``.
1.1.2 (2016-05-24)
------------------
- ``ShellNotAvailableErrors`` no longer pollute tracebacks when using the ``AutoShell``.
1.1.1 (2015-09-27)
------------------
- Remove deprecated import of IPython.config.
1.1.0 (2015-06-21)
------------------
- Add ptpython support.
1.0.0 (2015-02-08)
------------------
- Add support for ``setup`` and ``teardown`` functions in ``.konchrc`` files.
- If ``~/.konchrc.default`` exists, use that file as the template for new ``.konchrc`` files created with ``konch init``.
- Add ``ipy_extensions`` and ``ipy_autoreload`` options.
- Make sure that vim opens .konchrc files in Python mode.
- Drop Python 3.2 support.
0.4.2 (2014-07-12)
------------------
- "shell" option in .konchrc can be a string: either 'bpy', 'ipy', 'py', or 'auto'.
- Fix error in "konch edit".
0.4.1 (2014-06-23)
------------------
- Fix bug that caused konch to hang if no .konchrc file can be found.
0.4.0 (2014-06-10)
------------------
- Add ``edit`` command for editing .konchrc file.
- Properly output error messages to stderr.
- Tested on Python 3.4.
0.3.4 (2014-04-06)
------------------
- Fix bug that raised `SyntaxError` when executing konch on Windows.
0.3.3 (2014-03-27)
------------------
- Fix bug in resolve_path that caused infinite loop if config file not found.
- Fix bug with initializing konch in home directory.
- Add ``hide_context`` option.
0.3.2 (2014-03-18)
------------------
- Some changes to make it easier to use konch programatically.
- ``konch.start()`` can be called with no arguments.
- Expose docopt argument parsing via ``konch.parse_args()``.
0.3.1 (2014-03-17)
------------------
- Doesn't change current working directory.
- Less magicks.
- Tested on Python 3.4.
0.3.0 (2014-03-16)
------------------
- Smarter path resolution. konch will search parent directories until it finds a .konchrc file to use.
- Make prompt configurable on IPython and built-in shell. Output template is also supported on IPython.
- *Backwards-incompatible*: Remove support for old (<=0.10.x--released 3 years ago!) versions of IPython.
0.2.0 (2014-03-15)
------------------
- Fix bug with importing modules and packages in the current working directory.
- Introducing *named configs*.
0.1.0 (2014-03-14)
------------------
- First release to PyPI.
konch
=====
.. image:: https://badge.fury.io/py/konch.svg
:target: http://badge.fury.io/py/konch
:alt: Latest version
.. image:: https://travis-ci.org/sloria/konch.svg?branch=master
:target: https://travis-ci.org/sloria/konch
:alt: Travis-CI
.. image:: https://readthedocs.org/projects/konch/badge/
:target: http://konch.readthedocs.io/
:alt: Documentation
.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
:target: https://github.com/ambv/black
:alt: Code style: Black
Configures your Python shell
============================
**konch** is a CLI and configuration utility for the Python shell, optimized for simplicity and productivity.
- **Automatically import** any object upon startup
- **Simple**, per-project configuration in a single file (it's just Python code)
- **No external dependencies**
- Uses **IPython**, **BPython**, or **ptpython** if available, and falls back to built-in interpreter
- Automatically load **IPython extensions**
- Can have multiple configurations per project using **named configs**
.. image:: http://zippy.gfycat.com/EachTerrificChupacabra.gif
:alt: Demo
:target: http://konch.readthedocs.io
`http://konch.readthedocs.io <http://konch.readthedocs.io>`_
============================================================
*********
Changelog
*********
3.0.0 (2018-12-22)
------------------
Features:
- Config files must be approved before executing them.
Use ``konch allow`` to authorize a config file. This is a security mechanism to prevent
executing untrusted Python code (:issue:`47`). Thanks :user:`hartwork` for the suggestion.
- Allow customizing the editor to use for ``konch edit`` via the
``KONCH_EDITOR`` environment variable.
- ``konch init`` only adds the encoding pragma (``# -*- coding: utf-8 -*-\n``) on Python 2.
- Raise error when an invalid ``--name`` is passed.
Bug fixes:
- Respect ptpython's user config file (``~/.ptpython/config.py``)
(:issue:`16`). Thanks :user:`nasyxx` for reporting and thanks
:user:`pycadelic` for helping out with the implementation.
- Address a ``DeprecationWarning`` about importing from ``collections.abc`` on Python 3.7.
2.5.0 (2018-11-04)
------------------
- Update dev environment.
- Python 3.4 is no longer officially supported.
- Tested on Python 3.7.
2.4.0 (2017-04-29)
------------------
Features:
- Add basic tab-completion to plain Python shell.
2.3.0 (2016-12-23)
------------------
Features:
- Allow ``context`` to be a callable.
- Multiple names may be passed to ``named_config``.
2.2.1 (2016-12-19)
------------------
Bug fixes:
- Fix error raised when some options are passed to ``konch.named_config``.
2.2.0 (2016-07-21)
------------------
Features:
- Add ``ipy_colors`` and ``ipy_highlighting_style`` options for customizing IPython terminal colors.
2.1.0 (2016-07-18)
------------------
Features:
- Compatibility with IPython>=5.0.0.
Support:
- Update tasks.py for compatibility with invoke>=0.13.0.
2.0.0 (2016-06-01)
------------------
Features:
- Customizable context formatting via the ``context_format`` option.
- More CONCHES!
Deprecations/Removals:
- Remove ``hide_context`` option. Use the ``context_format`` option instead.
- Drop support for Python<=2.6 and <=3.3.
Bug fixes:
- Fix bug in checking availability of PtIPython.
- Fix bug in passing shell subclass as ``shell`` argument to ``konch.start``.
1.1.2 (2016-05-24)
------------------
- ``ShellNotAvailableErrors`` no longer pollute tracebacks when using the ``AutoShell``.
1.1.1 (2015-09-27)
------------------
- Remove deprecated import of IPython.config.
1.1.0 (2015-06-21)
------------------
- Add ptpython support.
1.0.0 (2015-02-08)
------------------
- Add support for ``setup`` and ``teardown`` functions in ``.konchrc`` files.
- If ``~/.konchrc.default`` exists, use that file as the template for new ``.konchrc`` files created with ``konch init``.
- Add ``ipy_extensions`` and ``ipy_autoreload`` options.
- Make sure that vim opens .konchrc files in Python mode.
- Drop Python 3.2 support.
0.4.2 (2014-07-12)
------------------
- "shell" option in .konchrc can be a string: either 'bpy', 'ipy', 'py', or 'auto'.
- Fix error in "konch edit".
0.4.1 (2014-06-23)
------------------
- Fix bug that caused konch to hang if no .konchrc file can be found.
0.4.0 (2014-06-10)
------------------
- Add ``edit`` command for editing .konchrc file.
- Properly output error messages to stderr.
- Tested on Python 3.4.
0.3.4 (2014-04-06)
------------------
- Fix bug that raised `SyntaxError` when executing konch on Windows.
0.3.3 (2014-03-27)
------------------
- Fix bug in resolve_path that caused infinite loop if config file not found.
- Fix bug with initializing konch in home directory.
- Add ``hide_context`` option.
0.3.2 (2014-03-18)
------------------
- Some changes to make it easier to use konch programatically.
- ``konch.start()`` can be called with no arguments.
- Expose docopt argument parsing via ``konch.parse_args()``.
0.3.1 (2014-03-17)
------------------
- Doesn't change current working directory.
- Less magicks.
- Tested on Python 3.4.
0.3.0 (2014-03-16)
------------------
- Smarter path resolution. konch will search parent directories until it finds a .konchrc file to use.
- Make prompt configurable on IPython and built-in shell. Output template is also supported on IPython.
- *Backwards-incompatible*: Remove support for old (<=0.10.x--released 3 years ago!) versions of IPython.
0.2.0 (2014-03-15)
------------------
- Fix bug with importing modules and packages in the current working directory.
- Introducing *named configs*.
0.1.0 (2014-03-14)
------------------
- First release to PyPI.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
konch-3.0.0.tar.gz
(22.6 kB
view details)
Built Distribution
konch-3.0.0-py3-none-any.whl
(20.9 kB
view details)
File details
Details for the file konch-3.0.0.tar.gz
.
File metadata
- Download URL: konch-3.0.0.tar.gz
- Upload date:
- Size: 22.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 656e51ebac302422c8b1a5a6073538b25aec6ac75ec9856ed9bf83aaca618f3e |
|
MD5 | 2ba881ce12ce9e3358a4a7131a5e196d |
|
BLAKE2b-256 | 732ed4130e7fc36ad5b8db6b371b59164249ad943e5956ac7b8ffd52865fc6f7 |
Provenance
File details
Details for the file konch-3.0.0-py3-none-any.whl
.
File metadata
- Download URL: konch-3.0.0-py3-none-any.whl
- Upload date:
- Size: 20.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d4e6761561577acd0f32e107985a3776b5a446c6a38c80739f49b94a690cd469 |
|
MD5 | e7c44a1404b2ee04ce06fbdff91092ec |
|
BLAKE2b-256 | 8b8eb786cd6f2ae0d71f512669a4bff44697162bb1dbf479a860b0da5a0ed4c7 |