cli-exit-tools


Namecli-exit-tools JSON
Version 1.2.6 PyPI version JSON
download
home_page
Summaryfunctions to exit an cli application properly
upload_time2023-07-14 11:33:55
maintainer
docs_urlNone
author
requires_python>=3.8.0
licenseMIT
keywords
VCS
bugtrack_url
requirements click lib_detect_testenv
Travis-CI No Travis.
coveralls test coverage
            cli_exit_tools
==============


Version v1.2.6 as of 2023-07-14 see `Changelog`_

|build_badge| |codeql| |license| |jupyter| |pypi|
|pypi-downloads| |black| |codecov| |cc_maintain| |cc_issues| |cc_coverage| |snyk|



.. |build_badge| image:: https://github.com/bitranox/cli_exit_tools/actions/workflows/python-package.yml/badge.svg
   :target: https://github.com/bitranox/cli_exit_tools/actions/workflows/python-package.yml


.. |codeql| image:: https://github.com/bitranox/cli_exit_tools/actions/workflows/codeql-analysis.yml/badge.svg?event=push
   :target: https://github.com//bitranox/cli_exit_tools/actions/workflows/codeql-analysis.yml

.. |license| image:: https://img.shields.io/github/license/webcomics/pywine.svg
   :target: http://en.wikipedia.org/wiki/MIT_License

.. |jupyter| image:: https://mybinder.org/badge_logo.svg
   :target: https://mybinder.org/v2/gh/bitranox/cli_exit_tools/master?filepath=cli_exit_tools.ipynb

.. for the pypi status link note the dashes, not the underscore !
.. |pypi| image:: https://img.shields.io/pypi/status/cli-exit-tools?label=PyPI%20Package
   :target: https://badge.fury.io/py/cli_exit_tools

.. |codecov| image:: https://img.shields.io/codecov/c/github/bitranox/cli_exit_tools
   :target: https://codecov.io/gh/bitranox/cli_exit_tools

.. |cc_maintain| image:: https://img.shields.io/codeclimate/maintainability-percentage/bitranox/cli_exit_tools?label=CC%20maintainability
   :target: https://codeclimate.com/github/bitranox/cli_exit_tools/maintainability
   :alt: Maintainability

.. |cc_issues| image:: https://img.shields.io/codeclimate/issues/bitranox/cli_exit_tools?label=CC%20issues
   :target: https://codeclimate.com/github/bitranox/cli_exit_tools/maintainability
   :alt: Maintainability

.. |cc_coverage| image:: https://img.shields.io/codeclimate/coverage/bitranox/cli_exit_tools?label=CC%20coverage
   :target: https://codeclimate.com/github/bitranox/cli_exit_tools/test_coverage
   :alt: Code Coverage

.. |snyk| image:: https://snyk.io/test/github/bitranox/cli_exit_tools/badge.svg
   :target: https://snyk.io/test/github/bitranox/cli_exit_tools

.. |black| image:: https://img.shields.io/badge/code%20style-black-000000.svg
   :target: https://github.com/psf/black

.. |pypi-downloads| image:: https://img.shields.io/pypi/dm/cli-exit-tools
   :target: https://pypi.org/project/cli-exit-tools/
   :alt: PyPI - Downloads

small toolset to properly exit a cli application:

- print the traceback information (can be set with commandline option)
- get a proper exit code from the Exception
- flush the streams, to make sure output is written in proper order
- demo how to integrate into Your cli module (see usage)

----

automated tests, Github Actions, Documentation, Badges, etc. are managed with `PizzaCutter <https://github
.com/bitranox/PizzaCutter>`_ (cookiecutter on steroids)

Python version required: 3.8.0 or newer

tested on recent linux with python 3.8, 3.9, 3.10, 3.11, 3.12-dev, pypy-3.9, pypy-3.10 - architectures: amd64

`100% code coverage <https://codeclimate.com/github/bitranox/cli_exit_tools/test_coverage>`_, flake8 style checking ,mypy static type checking ,tested under `Linux, macOS, Windows <https://github.com/bitranox/cli_exit_tools/actions/workflows/python-package.yml>`_, automatic daily builds and monitoring

----

- `Try it Online`_
- `Usage`_
- `Usage from Commandline`_
- `Installation and Upgrade`_
- `Requirements`_
- `Acknowledgements`_
- `Contribute`_
- `Report Issues <https://github.com/bitranox/cli_exit_tools/blob/master/ISSUE_TEMPLATE.md>`_
- `Pull Request <https://github.com/bitranox/cli_exit_tools/blob/master/PULL_REQUEST_TEMPLATE.md>`_
- `Code of Conduct <https://github.com/bitranox/cli_exit_tools/blob/master/CODE_OF_CONDUCT.md>`_
- `License`_
- `Changelog`_

----

Try it Online
-------------

You might try it right away in Jupyter Notebook by using the "launch binder" badge, or click `here <https://mybinder.org/v2/gh/{{rst_include.
repository_slug}}/master?filepath=cli_exit_tools.ipynb>`_

Usage
-----------

- example for the main_cli

.. code-block:: python

    # STDLIB
    import sys
    from typing import Optional

    # EXT
    import click

    # CONSTANTS
    CLICK_CONTEXT_SETTINGS = dict(help_option_names=["-h", "--help"])

    try:
        from . import __init__conf__
        from . import cli_exit_tools
    except (ImportError, ModuleNotFoundError):  # pragma: no cover
        # imports for doctest
        import __init__conf__  # type: ignore  # pragma: no cover
        import cli_exit_tools  # type: ignore  # pragma: no cover


    def info() -> None:
        """
        >>> info()
        Info for ...

        """
        __init__conf__.print_info()


    @click.group(help=__init__conf__.title, context_settings=CLICK_CONTEXT_SETTINGS)    # type: ignore
    @click.version_option(
        version=__init__conf__.version, prog_name=__init__conf__.shell_command, message=f"{__init__conf__.shell_command} version {__init__conf__.version}"
    )
    @click.option("--traceback/--no-traceback", is_flag=True, type=bool, default=None, help="return traceback information on cli")
    def cli_main(traceback: Optional[bool] = None) -> None:
        if traceback is not None:
            cli_exit_tools.config.traceback = traceback


    @cli_main.command("info", context_settings=CLICK_CONTEXT_SETTINGS)  # type: ignore
    def cli_info() -> None:
        """get program informations"""
        info()


    # entry point if main
    if __name__ == "__main__":
        try:
            cli_main()      # type: ignore
        except Exception as exc:
            cli_exit_tools.print_exception_message()
            sys.exit(cli_exit_tools.get_system_exit_code(exc))
        finally:
            cli_exit_tools.flush_streams()

- get the system exit code

.. code-block:: python

    def get_system_exit_code(exc: BaseException) -> int:
        """
        Return the exit code for linux or windows os, based on the exception.
        If, on windows, the winerror code is passed with the Exception, we return that winerror code.


        Parameter
        ---------
        exc
            the exception to analyze


        Result
        ------
        exit_code
            as integer


        Examples
        --------

        >>> try:
        ...     raise RuntimeError()
        ... except RuntimeError as my_exc:
        ...     assert get_system_exit_code(my_exc) == 1
        ...     setattr(my_exc, 'winerror', 42)
        ...     assert get_system_exit_code(my_exc) == 42
        ...     setattr(my_exc, 'winerror', None)
        ...     assert get_system_exit_code(my_exc) == 1
        >>> try:
        ...     exit(99)
        ... except SystemExit as my_exc:
        ...     assert get_system_exit_code(my_exc) == 99

        """

- print the exception message

.. code-block:: python

    def print_exception_message(trace_back: bool = config.traceback, length_limit: int = 500, stream: Optional[TextIO] = None) -> None:
        """
        Prints the Exception Message to stderr
        if trace_back is True, it also prints the traceback information

        if the exception has stdout, stderr attributes (like the subprocess.CalledProcessError)
        those will be also printed to stderr


        Parameter
        ---------
        trace_back
            if traceback information should be printed. This is usually set early
            in the CLI application to the config object via a commandline option.
        length_limit
            int, limits the length of the message
        stream
            optional, to which stream to print, default = stderr


        Examples
        --------

        >>> # test with exc_info = None
        >>> print_exception_message()

        >>> # test with exc_info
        >>> try:
        ...     raise FileNotFoundError('unknown_command_test1')
        ... except Exception:       # noqa
        ...     print_exception_message(True, length_limit=15, stream=sys.stdout)
        ...     print_exception_message(False, stream=sys.stdout)
        ...     print_exception_message(True, stream=sys.stdout)
        Traceback Info...

        >>> # test with subprocess to get stdout, stderr
        >>> import subprocess
        >>> try:
        ...     discard=subprocess.run('unknown_command_test2', shell=True, check=True)
        ... except subprocess.CalledProcessError:
        ...     print_exception_message(False, stream=sys.stdout)
        ...     print_exception_message(True, stream=sys.stdout)
        ...     print_exception_message(True, stream=sys.stdout)
        CalledProcessError...

        """

- flush the streams

.. code-block:: python

    def flush_streams() -> None:
        """
        flush the streams - make sure the output is written early,
        otherwise the output might be printed even after another CLI
        command is launched


        Examples
        --------


        >>> flush_streams()

        """

Usage from Commandline
------------------------

.. code-block::

   Usage: cli_exit_tools [OPTIONS] COMMAND [ARGS]...

     functions to exit an cli application properly

   Options:
     --version                     Show the version and exit.
     --traceback / --no-traceback  return traceback information on cli
     -h, --help                    Show this message and exit.

   Commands:
     info  get program informations

Installation and Upgrade
------------------------

- Before You start, its highly recommended to update pip and setup tools:


.. code-block::

    python -m pip --upgrade pip
    python -m pip --upgrade setuptools

- to install the latest release from PyPi via pip (recommended):

.. code-block::

    python -m pip install --upgrade cli_exit_tools


- to install the latest release from PyPi via pip, including test dependencies:

.. code-block::

    python -m pip install --upgrade cli_exit_tools[test]

- to install the latest version from github via pip:


.. code-block::

    python -m pip install --upgrade git+https://github.com/bitranox/cli_exit_tools.git


- include it into Your requirements.txt:

.. code-block::

    # Insert following line in Your requirements.txt:
    # for the latest Release on pypi:
    cli_exit_tools

    # for the latest development version :
    cli_exit_tools @ git+https://github.com/bitranox/cli_exit_tools.git

    # to install and upgrade all modules mentioned in requirements.txt:
    python -m pip install --upgrade -r /<path>/requirements.txt


- to install the latest development version, including test dependencies from source code:

.. code-block::

    # cd ~
    $ git clone https://github.com/bitranox/cli_exit_tools.git
    $ cd cli_exit_tools
    python -m pip install -e .[test]

- via makefile:
  makefiles are a very convenient way to install. Here we can do much more,
  like installing virtual environments, clean caches and so on.

.. code-block:: shell

    # from Your shell's homedirectory:
    $ git clone https://github.com/bitranox/cli_exit_tools.git
    $ cd cli_exit_tools

    # to run the tests:
    $ make test

    # to install the package
    $ make install

    # to clean the package
    $ make clean

    # uninstall the package
    $ make uninstall

Requirements
------------
following modules will be automatically installed :

.. code-block:: bash

    ## Project Requirements
    click
    lib_detect_testenv

Acknowledgements
----------------

- special thanks to "uncle bob" Robert C. Martin, especially for his books on "clean code" and "clean architecture"

Contribute
----------

I would love for you to fork and send me pull request for this project.
- `please Contribute <https://github.com/bitranox/cli_exit_tools/blob/master/CONTRIBUTING.md>`_

License
-------

This software is licensed under the `MIT license <http://en.wikipedia.org/wiki/MIT_License>`_

---

Changelog
=========

- new MAJOR version for incompatible API changes,
- new MINOR version for added functionality in a backwards compatible manner
- new PATCH version for backwards compatible bug fixes


v1.2.6
---------
2023-07-14:
    - add codeql badge
    - move 3rd_party_stubs outside the src directory
    - add pypy 3.10 tests
    - add python 3.12-dev tests

v1.2.5
---------
2023-07-13:
    - require minimum python 3.8
    - remove python 3.7 tests

v1.2.4
---------
2023-07-12:
    - introduce PEP517 packaging standard
    - introduce pyproject.toml build-system
    - remove mypy.ini
    - remove pytest.ini
    - remove setup.cfg
    - remove setup.py
    - remove .bettercodehub.yml
    - remove .travis.yml
    - update black config
    - clean ./tests/test_cli.py

v1.2.3.2
---------
2022-06-02: update to github actions checkout@v3 and setup-python@v3

v1.2.3.1
--------
2022-06-01: update github actions test matrix

v1.2.3
--------
2022-03-29: remedy mypy Untyped decorator makes function "cli_info" untyped

v1.2.2
--------
2022-03-25: fix github actions windows test

v1.2.1
-------
2021-11-22: Patch Release
    - fix minor readme.rst bugs
    - remove second github action yml
    - fix "setup.py test"

v1.2.0
------
2021-11-21: Minor Release
    - implement github actions
    - implement system.exit()

v1.1.8
--------
2020-10-09: service release
    - update travis build matrix for linux 3.9-dev
    - update travis build matrix (paths) for windows 3.9 / 3.10

v1.1.7
--------
2020-08-08: service release
    - fix documentation
    - fix travis
    - deprecate pycodestyle
    - implement flake8

v1.1.6
--------
2020-08-07: fix wheels

v1.1.5
--------
2020-07-31: fix wheels

v1.1.3
--------
2020-07-31: initial release


            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "cli-exit-tools",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8.0",
    "maintainer_email": "",
    "keywords": "",
    "author": "",
    "author_email": "Robert Nowotny <bitranox@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/d8/36/be4f27dd0eae4f4fc0715be6d4dd6b86661c663c805a69ca4ac26c6ea5c1/cli_exit_tools-1.2.6.tar.gz",
    "platform": null,
    "description": "cli_exit_tools\n==============\n\n\nVersion v1.2.6 as of 2023-07-14 see `Changelog`_\n\n|build_badge| |codeql| |license| |jupyter| |pypi|\n|pypi-downloads| |black| |codecov| |cc_maintain| |cc_issues| |cc_coverage| |snyk|\n\n\n\n.. |build_badge| image:: https://github.com/bitranox/cli_exit_tools/actions/workflows/python-package.yml/badge.svg\n   :target: https://github.com/bitranox/cli_exit_tools/actions/workflows/python-package.yml\n\n\n.. |codeql| image:: https://github.com/bitranox/cli_exit_tools/actions/workflows/codeql-analysis.yml/badge.svg?event=push\n   :target: https://github.com//bitranox/cli_exit_tools/actions/workflows/codeql-analysis.yml\n\n.. |license| image:: https://img.shields.io/github/license/webcomics/pywine.svg\n   :target: http://en.wikipedia.org/wiki/MIT_License\n\n.. |jupyter| image:: https://mybinder.org/badge_logo.svg\n   :target: https://mybinder.org/v2/gh/bitranox/cli_exit_tools/master?filepath=cli_exit_tools.ipynb\n\n.. for the pypi status link note the dashes, not the underscore !\n.. |pypi| image:: https://img.shields.io/pypi/status/cli-exit-tools?label=PyPI%20Package\n   :target: https://badge.fury.io/py/cli_exit_tools\n\n.. |codecov| image:: https://img.shields.io/codecov/c/github/bitranox/cli_exit_tools\n   :target: https://codecov.io/gh/bitranox/cli_exit_tools\n\n.. |cc_maintain| image:: https://img.shields.io/codeclimate/maintainability-percentage/bitranox/cli_exit_tools?label=CC%20maintainability\n   :target: https://codeclimate.com/github/bitranox/cli_exit_tools/maintainability\n   :alt: Maintainability\n\n.. |cc_issues| image:: https://img.shields.io/codeclimate/issues/bitranox/cli_exit_tools?label=CC%20issues\n   :target: https://codeclimate.com/github/bitranox/cli_exit_tools/maintainability\n   :alt: Maintainability\n\n.. |cc_coverage| image:: https://img.shields.io/codeclimate/coverage/bitranox/cli_exit_tools?label=CC%20coverage\n   :target: https://codeclimate.com/github/bitranox/cli_exit_tools/test_coverage\n   :alt: Code Coverage\n\n.. |snyk| image:: https://snyk.io/test/github/bitranox/cli_exit_tools/badge.svg\n   :target: https://snyk.io/test/github/bitranox/cli_exit_tools\n\n.. |black| image:: https://img.shields.io/badge/code%20style-black-000000.svg\n   :target: https://github.com/psf/black\n\n.. |pypi-downloads| image:: https://img.shields.io/pypi/dm/cli-exit-tools\n   :target: https://pypi.org/project/cli-exit-tools/\n   :alt: PyPI - Downloads\n\nsmall toolset to properly exit a cli application:\n\n- print the traceback information (can be set with commandline option)\n- get a proper exit code from the Exception\n- flush the streams, to make sure output is written in proper order\n- demo how to integrate into Your cli module (see usage)\n\n----\n\nautomated tests, Github Actions, Documentation, Badges, etc. are managed with `PizzaCutter <https://github\n.com/bitranox/PizzaCutter>`_ (cookiecutter on steroids)\n\nPython version required: 3.8.0 or newer\n\ntested on recent linux with python 3.8, 3.9, 3.10, 3.11, 3.12-dev, pypy-3.9, pypy-3.10 - architectures: amd64\n\n`100% code coverage <https://codeclimate.com/github/bitranox/cli_exit_tools/test_coverage>`_, flake8 style checking ,mypy static type checking ,tested under `Linux, macOS, Windows <https://github.com/bitranox/cli_exit_tools/actions/workflows/python-package.yml>`_, automatic daily builds and monitoring\n\n----\n\n- `Try it Online`_\n- `Usage`_\n- `Usage from Commandline`_\n- `Installation and Upgrade`_\n- `Requirements`_\n- `Acknowledgements`_\n- `Contribute`_\n- `Report Issues <https://github.com/bitranox/cli_exit_tools/blob/master/ISSUE_TEMPLATE.md>`_\n- `Pull Request <https://github.com/bitranox/cli_exit_tools/blob/master/PULL_REQUEST_TEMPLATE.md>`_\n- `Code of Conduct <https://github.com/bitranox/cli_exit_tools/blob/master/CODE_OF_CONDUCT.md>`_\n- `License`_\n- `Changelog`_\n\n----\n\nTry it Online\n-------------\n\nYou might try it right away in Jupyter Notebook by using the \"launch binder\" badge, or click `here <https://mybinder.org/v2/gh/{{rst_include.\nrepository_slug}}/master?filepath=cli_exit_tools.ipynb>`_\n\nUsage\n-----------\n\n- example for the main_cli\n\n.. code-block:: python\n\n    # STDLIB\n    import sys\n    from typing import Optional\n\n    # EXT\n    import click\n\n    # CONSTANTS\n    CLICK_CONTEXT_SETTINGS = dict(help_option_names=[\"-h\", \"--help\"])\n\n    try:\n        from . import __init__conf__\n        from . import cli_exit_tools\n    except (ImportError, ModuleNotFoundError):  # pragma: no cover\n        # imports for doctest\n        import __init__conf__  # type: ignore  # pragma: no cover\n        import cli_exit_tools  # type: ignore  # pragma: no cover\n\n\n    def info() -> None:\n        \"\"\"\n        >>> info()\n        Info for ...\n\n        \"\"\"\n        __init__conf__.print_info()\n\n\n    @click.group(help=__init__conf__.title, context_settings=CLICK_CONTEXT_SETTINGS)    # type: ignore\n    @click.version_option(\n        version=__init__conf__.version, prog_name=__init__conf__.shell_command, message=f\"{__init__conf__.shell_command} version {__init__conf__.version}\"\n    )\n    @click.option(\"--traceback/--no-traceback\", is_flag=True, type=bool, default=None, help=\"return traceback information on cli\")\n    def cli_main(traceback: Optional[bool] = None) -> None:\n        if traceback is not None:\n            cli_exit_tools.config.traceback = traceback\n\n\n    @cli_main.command(\"info\", context_settings=CLICK_CONTEXT_SETTINGS)  # type: ignore\n    def cli_info() -> None:\n        \"\"\"get program informations\"\"\"\n        info()\n\n\n    # entry point if main\n    if __name__ == \"__main__\":\n        try:\n            cli_main()      # type: ignore\n        except Exception as exc:\n            cli_exit_tools.print_exception_message()\n            sys.exit(cli_exit_tools.get_system_exit_code(exc))\n        finally:\n            cli_exit_tools.flush_streams()\n\n- get the system exit code\n\n.. code-block:: python\n\n    def get_system_exit_code(exc: BaseException) -> int:\n        \"\"\"\n        Return the exit code for linux or windows os, based on the exception.\n        If, on windows, the winerror code is passed with the Exception, we return that winerror code.\n\n\n        Parameter\n        ---------\n        exc\n            the exception to analyze\n\n\n        Result\n        ------\n        exit_code\n            as integer\n\n\n        Examples\n        --------\n\n        >>> try:\n        ...     raise RuntimeError()\n        ... except RuntimeError as my_exc:\n        ...     assert get_system_exit_code(my_exc) == 1\n        ...     setattr(my_exc, 'winerror', 42)\n        ...     assert get_system_exit_code(my_exc) == 42\n        ...     setattr(my_exc, 'winerror', None)\n        ...     assert get_system_exit_code(my_exc) == 1\n        >>> try:\n        ...     exit(99)\n        ... except SystemExit as my_exc:\n        ...     assert get_system_exit_code(my_exc) == 99\n\n        \"\"\"\n\n- print the exception message\n\n.. code-block:: python\n\n    def print_exception_message(trace_back: bool = config.traceback, length_limit: int = 500, stream: Optional[TextIO] = None) -> None:\n        \"\"\"\n        Prints the Exception Message to stderr\n        if trace_back is True, it also prints the traceback information\n\n        if the exception has stdout, stderr attributes (like the subprocess.CalledProcessError)\n        those will be also printed to stderr\n\n\n        Parameter\n        ---------\n        trace_back\n            if traceback information should be printed. This is usually set early\n            in the CLI application to the config object via a commandline option.\n        length_limit\n            int, limits the length of the message\n        stream\n            optional, to which stream to print, default = stderr\n\n\n        Examples\n        --------\n\n        >>> # test with exc_info = None\n        >>> print_exception_message()\n\n        >>> # test with exc_info\n        >>> try:\n        ...     raise FileNotFoundError('unknown_command_test1')\n        ... except Exception:       # noqa\n        ...     print_exception_message(True, length_limit=15, stream=sys.stdout)\n        ...     print_exception_message(False, stream=sys.stdout)\n        ...     print_exception_message(True, stream=sys.stdout)\n        Traceback Info...\n\n        >>> # test with subprocess to get stdout, stderr\n        >>> import subprocess\n        >>> try:\n        ...     discard=subprocess.run('unknown_command_test2', shell=True, check=True)\n        ... except subprocess.CalledProcessError:\n        ...     print_exception_message(False, stream=sys.stdout)\n        ...     print_exception_message(True, stream=sys.stdout)\n        ...     print_exception_message(True, stream=sys.stdout)\n        CalledProcessError...\n\n        \"\"\"\n\n- flush the streams\n\n.. code-block:: python\n\n    def flush_streams() -> None:\n        \"\"\"\n        flush the streams - make sure the output is written early,\n        otherwise the output might be printed even after another CLI\n        command is launched\n\n\n        Examples\n        --------\n\n\n        >>> flush_streams()\n\n        \"\"\"\n\nUsage from Commandline\n------------------------\n\n.. code-block::\n\n   Usage: cli_exit_tools [OPTIONS] COMMAND [ARGS]...\n\n     functions to exit an cli application properly\n\n   Options:\n     --version                     Show the version and exit.\n     --traceback / --no-traceback  return traceback information on cli\n     -h, --help                    Show this message and exit.\n\n   Commands:\n     info  get program informations\n\nInstallation and Upgrade\n------------------------\n\n- Before You start, its highly recommended to update pip and setup tools:\n\n\n.. code-block::\n\n    python -m pip --upgrade pip\n    python -m pip --upgrade setuptools\n\n- to install the latest release from PyPi via pip (recommended):\n\n.. code-block::\n\n    python -m pip install --upgrade cli_exit_tools\n\n\n- to install the latest release from PyPi via pip, including test dependencies:\n\n.. code-block::\n\n    python -m pip install --upgrade cli_exit_tools[test]\n\n- to install the latest version from github via pip:\n\n\n.. code-block::\n\n    python -m pip install --upgrade git+https://github.com/bitranox/cli_exit_tools.git\n\n\n- include it into Your requirements.txt:\n\n.. code-block::\n\n    # Insert following line in Your requirements.txt:\n    # for the latest Release on pypi:\n    cli_exit_tools\n\n    # for the latest development version :\n    cli_exit_tools @ git+https://github.com/bitranox/cli_exit_tools.git\n\n    # to install and upgrade all modules mentioned in requirements.txt:\n    python -m pip install --upgrade -r /<path>/requirements.txt\n\n\n- to install the latest development version, including test dependencies from source code:\n\n.. code-block::\n\n    # cd ~\n    $ git clone https://github.com/bitranox/cli_exit_tools.git\n    $ cd cli_exit_tools\n    python -m pip install -e .[test]\n\n- via makefile:\n  makefiles are a very convenient way to install. Here we can do much more,\n  like installing virtual environments, clean caches and so on.\n\n.. code-block:: shell\n\n    # from Your shell's homedirectory:\n    $ git clone https://github.com/bitranox/cli_exit_tools.git\n    $ cd cli_exit_tools\n\n    # to run the tests:\n    $ make test\n\n    # to install the package\n    $ make install\n\n    # to clean the package\n    $ make clean\n\n    # uninstall the package\n    $ make uninstall\n\nRequirements\n------------\nfollowing modules will be automatically installed :\n\n.. code-block:: bash\n\n    ## Project Requirements\n    click\n    lib_detect_testenv\n\nAcknowledgements\n----------------\n\n- special thanks to \"uncle bob\" Robert C. Martin, especially for his books on \"clean code\" and \"clean architecture\"\n\nContribute\n----------\n\nI would love for you to fork and send me pull request for this project.\n- `please Contribute <https://github.com/bitranox/cli_exit_tools/blob/master/CONTRIBUTING.md>`_\n\nLicense\n-------\n\nThis software is licensed under the `MIT license <http://en.wikipedia.org/wiki/MIT_License>`_\n\n---\n\nChangelog\n=========\n\n- new MAJOR version for incompatible API changes,\n- new MINOR version for added functionality in a backwards compatible manner\n- new PATCH version for backwards compatible bug fixes\n\n\nv1.2.6\n---------\n2023-07-14:\n    - add codeql badge\n    - move 3rd_party_stubs outside the src directory\n    - add pypy 3.10 tests\n    - add python 3.12-dev tests\n\nv1.2.5\n---------\n2023-07-13:\n    - require minimum python 3.8\n    - remove python 3.7 tests\n\nv1.2.4\n---------\n2023-07-12:\n    - introduce PEP517 packaging standard\n    - introduce pyproject.toml build-system\n    - remove mypy.ini\n    - remove pytest.ini\n    - remove setup.cfg\n    - remove setup.py\n    - remove .bettercodehub.yml\n    - remove .travis.yml\n    - update black config\n    - clean ./tests/test_cli.py\n\nv1.2.3.2\n---------\n2022-06-02: update to github actions checkout@v3 and setup-python@v3\n\nv1.2.3.1\n--------\n2022-06-01: update github actions test matrix\n\nv1.2.3\n--------\n2022-03-29: remedy mypy Untyped decorator makes function \"cli_info\" untyped\n\nv1.2.2\n--------\n2022-03-25: fix github actions windows test\n\nv1.2.1\n-------\n2021-11-22: Patch Release\n    - fix minor readme.rst bugs\n    - remove second github action yml\n    - fix \"setup.py test\"\n\nv1.2.0\n------\n2021-11-21: Minor Release\n    - implement github actions\n    - implement system.exit()\n\nv1.1.8\n--------\n2020-10-09: service release\n    - update travis build matrix for linux 3.9-dev\n    - update travis build matrix (paths) for windows 3.9 / 3.10\n\nv1.1.7\n--------\n2020-08-08: service release\n    - fix documentation\n    - fix travis\n    - deprecate pycodestyle\n    - implement flake8\n\nv1.1.6\n--------\n2020-08-07: fix wheels\n\nv1.1.5\n--------\n2020-07-31: fix wheels\n\nv1.1.3\n--------\n2020-07-31: initial release\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "functions to exit an cli application properly",
    "version": "1.2.6",
    "project_urls": {
        "Changelog": "https://github.com/bitranox/cli_exit_tools/blob/master/CHANGES.rst",
        "Documentation": "https://github.com/bitranox/cli_exit_tools/blob/master/README.rst",
        "Homepage": "https://github.com/bitranox/cli_exit_tools",
        "Repository": "https://github.com/bitranox/cli_exit_tools.git"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "379665d7ad8082efa7cba79ed65c0486d44dc608fa4d7f75938eed16848d133c",
                "md5": "1b793bbc531bf0bbad6fabce6dd08224",
                "sha256": "b230a552266ec0e48a51da861fc03bd3a943458230551d8ab635256e797de746"
            },
            "downloads": -1,
            "filename": "cli_exit_tools-1.2.6-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1b793bbc531bf0bbad6fabce6dd08224",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8.0",
            "size": 10669,
            "upload_time": "2023-07-14T11:33:54",
            "upload_time_iso_8601": "2023-07-14T11:33:54.465994Z",
            "url": "https://files.pythonhosted.org/packages/37/96/65d7ad8082efa7cba79ed65c0486d44dc608fa4d7f75938eed16848d133c/cli_exit_tools-1.2.6-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d836be4f27dd0eae4f4fc0715be6d4dd6b86661c663c805a69ca4ac26c6ea5c1",
                "md5": "84230f55a7c606c7791cf983e12106ca",
                "sha256": "e76d4b628f8a5bb6dbbfba8fb62d6124793960dba252e7e7a27897065fc487e1"
            },
            "downloads": -1,
            "filename": "cli_exit_tools-1.2.6.tar.gz",
            "has_sig": false,
            "md5_digest": "84230f55a7c606c7791cf983e12106ca",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8.0",
            "size": 29965,
            "upload_time": "2023-07-14T11:33:55",
            "upload_time_iso_8601": "2023-07-14T11:33:55.997297Z",
            "url": "https://files.pythonhosted.org/packages/d8/36/be4f27dd0eae4f4fc0715be6d4dd6b86661c663c805a69ca4ac26c6ea5c1/cli_exit_tools-1.2.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-14 11:33:55",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "bitranox",
    "github_project": "cli_exit_tools",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "requirements": [
        {
            "name": "click",
            "specs": []
        },
        {
            "name": "lib_detect_testenv",
            "specs": []
        }
    ],
    "lcname": "cli-exit-tools"
}
        
Elapsed time: 0.26823s