Skip to main content

Glossary.py

Glossary.py is a Python module that interacts with an online dictionary API. It's designed to fetch and manage word descriptions, phonetics, and semantics in a structured way.

Key Features:

  • Fetches word descriptions, phonetics, and semantics from an online dictionary API.
  • Implements a class-based approach for managing fetched data.
  • Allows to set a limit for the number of descriptions per part of speech for a word.
  • Provides audio transcription and audio file link for the fetched word.
  • Allows to get all definitions or definitions based on a part of speech.

Installation

pip install python-glossary

How to Use:

from python_glossary.glossary import Glossary

# Create a rule object and set a limit for descriptions
rules = Glossary.Rules()
rules.set_limit_of_descriptions(3)

# Create a word object with a specific word and rule
word = Glossary.Word('example', rules)

# Check if the word exists
if word.exists():
    # Get transcription
    print(word.get_transcription())
    # Get audio link
    print(word.get_audio())
    # Get all definitions
    print(word.get_all_definitions())
    # Get definitions for a specific part of speech
    print(word.get_definitions_of_part_of_speech('noun'))

Requirements:

  • Python 3.8+
  • requests

Please note, this module relies on the API at https://api.dictionaryapi.dev/api/v2/entries/en/{input_word} for fetching word data. Ensure you have a stable internet connection while using this module.

Metadata

Release files for python-glossary 0.0.2

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

Source distribution (sdist)

Source distribution for python-glossary 0.0.2
File Size Uploaded
python_glossary-0.0.2.tar.gz 15.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for python-glossary 0.0.2
File Interpreter ABI Platform
python_glossary-0.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 31.8 kB

Release files / python_glossary-0.0.2.tar.gz

Download URL python_glossary-0.0.2.tar.gz
Size 15.7 kB
Tags Source
SHA-256 checksum
How to use checksums
c3ef476d6af27730845a89dbcd1b42b154e53bdb63ddea74fe493f31b0966f41
BLAKE2b-256 checksum
How to use checksums
304362273e9e1794f310cedc9c2fa3eec902f63574b934a8e061407940bdb5cc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.3

Release files / python_glossary-0.0.2-py3-none-any.whl

Download URL python_glossary-0.0.2-py3-none-any.whl
Size 16.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ee3826f0b58c3fa0efe44d140520a820ae3d2964a58ade0e27a08e3e42c7b13a
BLAKE2b-256 checksum
How to use checksums
271cd4be4481f1c9e36cefee5202eee5107fbf7587b7fe6d002a4268db5f034c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files

0.0.1

1 release file

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