Skip to main content

wordpy License Version

A dictionary program for nix* terminals

Installation

Simply use pip to install the latest stable version -

$ pip install wordpy

To get the bleeding edge version -

pip install git+https://github.com/mentix02/wordpy.git

Requirements

wordpy is available for all Unix and Unix-like operating systems. It supports Python 3.6 and above.

Usage

Getting API keys

This package wouldn't be possible without the existence of Oxford Dictionaries. However, service hosting is costly and they must make some money themselves so they only let a simple, developer option for their prolix API. Register for it here.

When you first use wordpy, you'll recieve a prompt to enter your recently acquired credentials and store it for future usage. Don't worry, everything remains on your local system.

The program is extremely simple - you literally just get the definition of a word in your terminal. Or the synonyms, antonyms or even the origin i.e. etymology of the word if you're feeling adventurous.

Flags

Flag Usage
-s, --synonyms display synonyms
-a, --antonyms display antonyms
-e, --etymology show etymology
-v, --version display version
-h, --help show help message

Commands

$ wordpy <word>

To get synonyms -

$ wordpy -s <word>

Antonyms can be derived by -

$ wordpy -a <word>

And finally, etymology -

$ wordpy -e <word>

These flags can be combined to get whatever the user asks for. For example to get the definition, antonyms and the etymology, you can use -

$ wordpy -ae <word>

Examples

$ wordpy apple
[s] Apple (noun)
The round fruit of a tree of the rose family, which typically has thin green or red skin and crisp flesh.
$ wordpy -s car # synonyms
[s] Car (noun)
A road vehicle, typically with four wheels, powered by an internal combustion engine and able to carry a small number of people
[s] Synonyms
auto, automobile, bus, convertible, jeep, limousine, machine, motor, pickup, ride, station wagon, truck, van, wagon, bucket, buggy, compact, conveyance, coupe, hardtop, hatchback, heap, jalopy, junker, motorcar, roadster, sedan, subcompact, wheels, wreck, clunker, gas guzzler, touring car
$ wordpy -as happy # antonyms and synonyms
[s] Happy (adjective)
Feeling or showing pleasure or contentment
[s] Synonyms
cheerful, contented, delighted, ecstatic, elated, glad, joyful, joyous, jubilant, lively, merry, overjoyed, peaceful, pleasant, pleased, thrilled, upbeat, blessed, blest, blissful, blithe, can't complain, captivated, chipper, chirpy, content, convivial, exultant, flying high, gay, gleeful, gratified, intoxicated, jolly, laughing, light, looking good, mirthful, on cloud nine, peppy, perky, playful, sparkling, sunny, tickled, tickled pink, up, walking on air
[s] Antonyms
depressed, disappointed, disturbed, down, grave, melancholy, miserable, sad, serious, sorrowful, troubled, unfriendly, unhappy, upset, discouraged, dissatisfied, forsaken, hopeless, morose, pained, unfortunate, unlucky
$ wordpy -e computer
[s] Computer (noun)
An electronic device for storing and processing data, typically in binary form, according to instructions given to it in a variable program.
[s] Etymology
1640s, "one who calculates," agent noun from compute (v.). Meaning "calculating machine" (of any type) is from 1897; in modern use, "programmable digital electronic computer" (1945 under this name; theoretical from 1937, as Turing machine). ENIAC (1946) usually is considered the first. Computer literacy is recorded from 1970; an attempt to establish computerate (adjective, on model of literate) in this sense in the early 1980s didn't catch on. Computerese "the jargon of programmers" is from 1960, as are computerize and computerization.

Development

Contributing

Make an issue if you stumble upon a bug. Any ideas or features you'd like to be added, once again, make an issue out of.

To do something more simulating like writing code, just clone this repo, get it on your local system, make a branch, push it back to your master and finally, make a pull request.

I follow PEP-8 so you have to follow it too. Don't see why that's not already baked into the syntax.

Testing

To run tests, simply install nose -

$ pip install nose
$ python setup.py test

or run nosetests for a cleaner output -

$ nosetests

I've never been a big fan of testing... let me rephrase, I've never been a big fan of writing tests myself but there's a handful of them in tests/ that should succeed before you even think about committing.

Any new feature should come with its own test_<name_of_feature>.py file in the said tests/ directory and should be verbose with at least two cases.

Features To Add

  • Basic usage
  • Testing
  • Optimization
  • Documentation (?)
  • Even more features
    • antonyms
    • etymologies
    • different definitions

Metadata

Release files for wordpy 1.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for wordpy 1.1.4
File Size Uploaded Provenance
wordpy-1.1.4.tar.gz 8.2 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for wordpy 1.1.4
File Interpreter ABI Platform
wordpy-1.1.4-py3-none-any.whl Python 3 none any Details

Total release size: 19.4 kB

Release files / wordpy-1.1.4.tar.gz

Download URL wordpy-1.1.4.tar.gz
Size 8.2 kB
Tags Source
SHA-256 checksum
How to use checksums
f627998274d593d796c3a02cc0044244d0ebafad4ed1727dce4676f0485e4f4c
BLAKE2b-256 checksum
How to use checksums
876fa88523e63f25be062b7f4f0981b40ad3a11c1b6bd26bf3ad117f449b7d59
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.30.0 CPython/3.6.7

Release files / wordpy-1.1.4-py3-none-any.whl

Download URL wordpy-1.1.4-py3-none-any.whl
Size 11.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e4181300197399315201c3296308178fffc60fc1211eba52680311c3af05ffd1
BLAKE2b-256 checksum
How to use checksums
9d714137e534aa18bc52eff46cba41b7d34c71a05ab87b18342725f6028e378e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.30.0 CPython/3.6.7

Security for wordpy 1.1.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page