Skip to main content

Receive info about dell devices in humanize view

Project description

$ dell_api

A command-line interface (CLI) for fetching Dell APIs (TechDirect asset warranty service) data and present them in a human-friendly view.

Based on given service tag the application provides the following information:

  • Warranty status details, such as: service tag assigned country, warranty level, warranty time remaining and end date.
  • Part details

Client_ID & Client_Secret

User has to retrieve “client_id” and ”client_secret” from TechDirect API portal.

From Dell API Outh doc - API key = Client ID

This data is used for receiving an access token for the Resource (API)

Installation

pip install dell-warranty-api

OR you can install the application manually. Example with virtual environment:

https://github.com/karma-git/dell_warranty_status_api.git && cd dell_warranty_status_api;
python3 -m venv venv;
source venv/bin/activate;
python -m pip install -r requirements.txt;
python dell_api/__main__.py -h;
# OR
python -m dell_api -h;  

Usage

You'll be asked to insert Client ID and Client Secret during the first launch.

Secrets will be stored into your home directory in the file secrets.ini. Also, when you use application it generates access token (OAuth - it is valid only for one hour) and saves it in the hidden file .cache.json inside your home directory.

$ dell_api -w 1234567
2021-05-10 06:48:54.521 | WARNING  | dell_api.__main__:_load_secrets:73 - Secrets file is not exist! Creating ...
Please specify client_id:
Please specify client_secret:

Simple example

$ dell_api -w 1234567,2345678,3456789
+-------------+---------------+------------+------------------------------+------------+
| Service Tag |    Country    |  Warranty  |            Remain            |  End Date  |
+-------------+---------------+------------+------------------------------+------------+
|   2345678   | United States |   Basic    |           Expired            | 2011-10-06 |
|   3456789   |     Sweden    |   Basic    |           Expired            | 2007-11-03 |
|   1234567   | United States | ProSupport | 4 years, 2 months and 0 days | 2025-07-10 |
+-------------+---------------+------------+------------------------------+------------+

Check more usage cases -> examples

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dell_warranty_api-1.10.0.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

dell_warranty_api-1.10.0-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file dell_warranty_api-1.10.0.tar.gz.

File metadata

  • Download URL: dell_warranty_api-1.10.0.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.2

File hashes

Hashes for dell_warranty_api-1.10.0.tar.gz
Algorithm Hash digest
SHA256 13f628948e851692cf97c765507a102ad6fd395f5e4d1a556fc7acdc20b9ebaf
MD5 850c0b3ada0d1f8398e94be423803b33
BLAKE2b-256 d52caf1f7e225efac6201df234431b61e7b92c0de5cc2061e7f07e544caf861d

See more details on using hashes here.

File details

Details for the file dell_warranty_api-1.10.0-py3-none-any.whl.

File metadata

  • Download URL: dell_warranty_api-1.10.0-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.2

File hashes

Hashes for dell_warranty_api-1.10.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1cb7930e1576eb5a3db0f7794f703ea26e15dbeae08daada3580f78ea8aa0fef
MD5 e862ded5ee521bb34c20be1b67c3b4c1
BLAKE2b-256 57c8c232e28ce4c458ec90a319e5c13e7cfcd8fc0def75e28d8a2d11b49955a8

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page