WordLookup
This repo serves as a companion resource for the Packaging Python Command-Line Apps the Modern Way with uv tutorial found on thisdavej.com.
Intro
WordLookup is a command-line tool to fetch and display definitions for a given word using the Dictionary API.
Usage
Run the CLI tool with the word you want to look up as an argument:
wordlookup <word>
Example
To look up the word "sojourn":
wordlookup sojourn
Output:
Definitions for 'sojourn':
noun:
- A short stay somewhere.
- A temporary residence.
verb:
- To reside somewhere temporarily, especially as a guest or lodger.
Notes
- The tool attempts to format the output to fit your terminal width.
- If the terminal width cannot be determined, it defaults to 80 characters.
- Ensure you have an active internet connection as the tool fetches data from an external API.
Installation
Wordlookup is available on PyPI and can be installed in multiple ways:
# using uv
uv tool install wordlookup
# using pipx
pipx install wordlookup
# using pip
pip install wordlookup
Building from Source
Prerequisites
- Python 3.13
- uv package manager
Installation from source
- Clone the repository:
git clone https://github.com/thisdavej/wordlookup-tutorial.git
cd wordlookup-tutorial
- Build using uv:
uv build
- Test the Python wheel created during the build step:
uv tool run wordlookup
# You can also use `uvx` which is an alias for `uv tool run`
uvx wordlookup
- Install the Python wheel persistently:
uv tool install wordlookup
Distributing the Python wheel (.whl) file to others to install
Note: These next steps are not necessary if you simply want to install and use this package from PyPI as described in the Installation section.
- Run/test the command provided in the wheel without explicitly installing into a persistent environment or adding it to our system's PATH.
uv tool run wordlookup-0.1.0-py3-none-any.whl
# You can also use `uvx` which is an alias for `uv tool run`
uvx wordlookup-0.1.0-py3-none-any.whl
``
1. Install the Python wheel
```sh
uv tool install wordlookup-0.1.0-py3-none-any.whl
Development
To see your development changes in action instantly, use uv run:
uv run wordlookup <word>
This command will execute the tool with your most recent code modifications.
License
This project is licensed under the Apache License, Version 2.0 - see the LICENSE file for details.
Metadata
Release files for wordlookup 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| wordlookup-0.1.2.tar.gz | 8.4 kB | Without provenance | Details for wordlookup-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| wordlookup-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for wordlookup-0.1.2-py3-none-any.whl |
Total release size: 16.1 kB
Release files / wordlookup-0.1.2.tar.gz
| Download URL | wordlookup-0.1.2.tar.gz |
|---|---|
| Size | 8.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6bf743127c9ea1e553b40b1b4a4c0e5793f3084fa2f4095b04b495c191733c04
|
|
BLAKE2b-256 checksum How to use checksums |
5da5fdfda72bae344c55f6976420614c02498f50273efc859c5fd7e1afafa425
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.2
|
Release files / wordlookup-0.1.2-py3-none-any.whl
| Download URL | wordlookup-0.1.2-py3-none-any.whl |
|---|---|
| Size | 7.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4f530e980e72db95c0466356c5235f758ab722fa05e8779d70703fe605e3910c
|
|
BLAKE2b-256 checksum How to use checksums |
f8b8dbb46846bbc5191c99934c96da4b91ee80d336e84bc3e2557f040a9fc36c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.2
|
Security for wordlookup 0.1.2
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.