Merrian-Webster command line utility to get word definition.
Project description
Package Name: mwcliparser
Author: Vikash Kumar Shrivastva
Code Repository URL: https://gitlab.com/assignment7233743/mw_cli_parser
Package URL: https://pypi.org/project/mwcliparser/
Built using: Merriam-Webster API - https://DictionaryAPI.com
This repository contains scripts which allow you to access definitions from Merriam-Webster's online dictionary through command line tools.
Getting Started
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
Prerequisites
This package MUST be installed on Python versions 3.8 or later
You will also need to get MW API Key. To get the API Key follow the following steps: Step1: visit "https://www.dictionaryapi.com/". Step2: Click on "Dev Center" Step3: Sign-Up and generate API Key.
Make sure to save the API key as you will need to set that as environment variable.
This command line utility will only work with the "collegiate" reference API.
- On Linux / Mac OS: export MW_API_KEY=<API_KEY>
Installation
To check and modify the code as per your use case. Feel free to clone or download this repository to your local machine.
To use the CLI functionality of this package follow the following steps: Step1: Install the CLI using pip command.
pip install mwcliparser
Step2: Set the MW API key as MW_API_KEY
environment variable.:
export MW_API_KEY=<MW_API_KEY>
For Example if your API Key is lskdjlsfjdslfdjslfdjsldfsf
then
export MW_API_KEY=lskdjlsfjdslfdjslfdjsldfsf
Step3: use the command as:
mwcliparser exersize
This script will retrieve the definition for the word passed into the function. In this case, the word passed in is "exercise". So response would be:
MW_Response
ˈek-sər-ˌsīz (noun): the act of bringing into play or realizing in action
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
Built Distribution
File details
Details for the file mwcliparser-1.0.1.tar.gz
.
File metadata
- Download URL: mwcliparser-1.0.1.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 399b386f99c8be6a3c9fe178355be5348ddf144c9428e1e29adc57178ed26d64 |
|
MD5 | 24b6262da7f93288be133c801503dc46 |
|
BLAKE2b-256 | e8e8692828d83a37ee57b78048253a41e325cd679e1e954985be02e6bfd24106 |
Provenance
File details
Details for the file mwcliparser-1.0.1-py3-none-any.whl
.
File metadata
- Download URL: mwcliparser-1.0.1-py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 383d0387ba8352bb77f7c90980947e5ebfd7b78ebe217dbd15270f76df2bf9fe |
|
MD5 | 49c84465aeef5077c5c372d7a79388b5 |
|
BLAKE2b-256 | c1de325ddf45e3ca37a73880fb093fd610f538955e95553eed39ae63c3d049b1 |