Metadata-Version: 2.1
Name: norwegianblue
Version: 0.0.1
Summary: CLI to show end-of-life dates for tools and technologies.
Home-page: https://github.com/hugovk/norwegianblue
Author: hugovk
License: MIT
Project-URL: Source, https://github.com/hugovk/norwegianblue
Project-URL: Changelog, https://github.com/hugovk/norwegianblue/releases
Keywords: end-of-life,endoflife,eol
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: End Users/Desktop
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: Implementation :: CPython
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Provides-Extra: tests
License-File: LICENSE.txt

# norwegianblue

[![PyPI version](https://img.shields.io/pypi/v/norwegianblue.svg?logo=pypi&logoColor=FFE873)](https://pypi.org/project/norwegianblue/)
[![Supported Python versions](https://img.shields.io/pypi/pyversions/norwegianblue.svg?logo=python&logoColor=FFE873)](https://pypi.org/project/norwegianblue/)
[![PyPI downloads](https://img.shields.io/pypi/dm/norwegianblue.svg)](https://pypistats.org/packages/norwegianblue)
[![Test](https://github.com/hugovk/norwegianblue/actions/workflows/test.yml/badge.svg)](https://github.com/hugovk/norwegianblue/actions)
[![codecov](https://codecov.io/gh/hugovk/norwegianblue/branch/main/graph/badge.svg)](https://codecov.io/gh/hugovk/norwegianblue)
[![GitHub](https://img.shields.io/github/license/hugovk/norwegianblue.svg)](LICENSE.txt)
[![Code style: Black](https://img.shields.io/badge/code%20style-Black-000000.svg)](https://github.com/psf/black)

Python 3.9+ interface to [endoflife.date](https://endoflife.date/docs/api/) to show
end-of-life dates for tools and technologies.

## Installation

### From PyPI

```bash
python -m pip install --upgrade norwegianblue
```

### From source

```bash
git clone https://github.com/hugovk/norwegianblue
cd norwegianblue
pip install .
```

## Example command-line use

Run `norwegianblue` or `eol`, they do the same thing.

Top-level help:

```console
usage: norwegianblue [-h] [-t TOOL] [-f {html,json,markdown,rst,tsv}] [-c {yes,no}] [-v] [-V]

CLI to show end-of-life dates for tools and technologies.

positional arguments:
  tool                  Tool to check (default: python)

optional arguments:
  -h, --help            show this help message and exit
  -f {html,json,markdown,rst,tsv}, --format {html,json,markdown,rst,tsv}
                        The format of output (default: markdown)
  -c {yes,no}, --color {yes,no}
                        color terminal output (default: yes)
  -v, --verbose         Print debug messages to stderr (default: False)
  -V, --version         show program's version number and exit
```

Show end-of-life dates:

```console
$ norwegianblue
| cycle | latest |  release   |    eol     |                                 link                                 |
| ----- | ------ | ---------- | ---------- | -------------------------------------------------------------------- |
| 3.9   | 3.9.5  | 2020-10-05 | 2025-10-05 | https://www.python.org/downloads/release/python-395/                 |
| 3.8   | 3.8.10 | 2019-10-14 | 2024-10-14 | https://www.python.org/downloads/release/python-3810/                |
| 3.7   | 3.7.10 | 2018-06-27 | 2023-06-27 | https://www.python.org/downloads/release/python-3710/                |
| 3.6   | 3.6.13 | 2016-12-23 | 2021-12-23 | https://www.python.org/downloads/release/python-3613/                |
| 3.5   | 3.5.10 | 2015-09-30 | 2020-09-13 | https://www.python.org/downloads/release/python-3510/                |
| 3.4   | 3.4.10 | 2014-03-16 | 2019-03-18 | https://www.python.org/downloads/release/python-3410/                |
| 3.3   | 3.3.7  | 2012-09-29 | 2017-09-29 | https://www.python.org/downloads/release/python-337/                 |
| 2.7   | 2.7.18 | 2010-07-03 | 2020-01-01 | https://github.com/python/cpython/blob/2.7/Misc/NEWS.d/2.7.18rc1.rst |
```

The table is Markdown, ready for pasting in GitHub issues and PRs:

| cycle | latest | release    | eol        | link                                                                 |
| ----- | ------ | ---------- | ---------- | -------------------------------------------------------------------- |
| 3.9   | 3.9.5  | 2020-10-05 | 2025-10-05 | https://www.python.org/downloads/release/python-395/                 |
| 3.8   | 3.8.10 | 2019-10-14 | 2024-10-14 | https://www.python.org/downloads/release/python-3810/                |
| 3.7   | 3.7.10 | 2018-06-27 | 2023-06-27 | https://www.python.org/downloads/release/python-3710/                |
| 3.6   | 3.6.13 | 2016-12-23 | 2021-12-23 | https://www.python.org/downloads/release/python-3613/                |
| 3.5   | 3.5.10 | 2015-09-30 | 2020-09-13 | https://www.python.org/downloads/release/python-3510/                |
| 3.4   | 3.4.10 | 2014-03-16 | 2019-03-18 | https://www.python.org/downloads/release/python-3410/                |
| 3.3   | 3.3.7  | 2012-09-29 | 2017-09-29 | https://www.python.org/downloads/release/python-337/                 |
| 2.7   | 2.7.18 | 2010-07-03 | 2020-01-01 | https://github.com/python/cpython/blob/2.7/Misc/NEWS.d/2.7.18rc1.rst |

With options:

```console
$ eol ubuntu --format rst
.. table::

    ===========  =========  ============  ============  ============  ================  =====================================================
       cycle      latest      release       support         eol        cycleShortHand                           link
    ===========  =========  ============  ============  ============  ================  =====================================================
     21.04 LTS      21.04    2021-04-22    2022-01-01    2022-01-01    HirsuteHippo      https://wiki.ubuntu.com/HirsuteHippo/ReleaseNotes/
     20.10 LTS      20.10    2020-10-22    2021-07-07    2021-07-07    GroovyGorilla     https://wiki.ubuntu.com/GroovyGorilla/ReleaseNotes/
     20.04 LTS    20.04.2    2020-04-23    2022-10-01    2025-04-02    FocalFossa
     19.10          19.10    2019-10-17    2020-07-06    2020-07-06
     18.04 LTS    18.04.5    2018-04-26    2020-09-30    2023-04-02    BionicBeaver
     16.04 LTS    16.04.7    2016-04-21    2018-10-01    2021-04-02    XenialXerus
     14.04 LTS    14.04.6    2014-04-17    2016-09-30    2019-04-02    TrustyTahr
    ===========  =========  ============  ============  ============  ================  =====================================================
```

## Example programmatic use

Return values are from the JSON responses documented in the API:
https://endoflife.date/docs/api/

```python
import norwegianblue

# Call the API
print(norwegianblue.norwegianblue())
print(norwegianblue.norwegianblue(tool="ubuntu"))
print(norwegianblue.norwegianblue(format="json"))
```


