Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

python-glossary

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

python-glossary

Python module that uses free dictionary API to retrieve definitions, examples, synonyms, antonyms, and audio of english words

  • 0.0.1
  • PyPI
  • Socket score

Maintainers
1

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.

How to Use:

from 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.

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc