Code Monkey home page Code Monkey logo

end_of_life's Introduction

End of Life (EOL) Product Checker

This project is a script to check and display products that have an end of life (EOL) date on or after a specified date using the End of Life API (https://endoflife.date/api). By default, it checks for EOL dates matching the current date. The output is grouped by EOL date.

Features

  • Fetches all products from the API.
  • Filters products based on EOL date.
  • Groups the output by EOL date and displays the product name and release cycle for filtered products.
  • Allows users to specify a custom date for filtering.

Dependencies

  • Python 3.8 or higher
  • requests

Installation

  1. Clone this repository or download the source code.
  2. Install the required dependencies:
pip install -r requirements.txt

Usage

  1. Run the script:
python eol_product_checker.py

By default, the script will fetch all products from the End of Life API and display those with an EOL date matching the current date, grouped by EOL date.

  1. To specify a custom date for filtering, use the --date argument:
python eol_product_checker.py --date "2023-04-30"

Functions

  • __elo_api_call__(url=URL, product_name="all"): A private helper function that sends an API request to the specified URL and returns the JSON response.

  • get_all_products() -> list: Fetches a list of all product names from the End of Life API.

  • get_product(product_name) -> list[dict]: Fetches a list of release cycles for a given product name, including EOL dates, from the End of Life API.

  • arg_parser() -> argparse.Namespace: Parses command-line arguments and returns an argparse.Namespace object containing the parsed arguments.

  • report(args) -> dict[list[dict]]: Collects EOL data for products with the specified EOL date.

  • report_by_eol(eols: dict[list[dict]]) -> None: Prints the EOL report grouped by EOL date.

  • main(): The main function that gathers EOL data and displays the grouped report.

License

This project is licensed under the MIT License.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.