Skip to main content

A python wrapper for the Oxford Dictionaries API.

Project description

Oxford Dictionary API Python Wrapper

This is a python wrapper for the Oxford Dictionary API. The Oxford API offers a free plan with up to 3,000 requests per month with ull access to Oxford Dictionaries data, although you will need to register for an API key. Sign up here.

Installation

  • git clone git@github.com:RafaelBroseghini/OxfordAPI.git
  • cd OxfordAPI
  • python OxfordDictionaries.py

Usage

The code below shows how to quickly get 10 synonyms for a chosen word.

from oxforddictionaries.words import OxfordDictionaries

o = OxfordDictionaries.Oxford(app_id, app_key)

relax = o.get_synonyms("absorb").json()

synonyms = relax['results'][0]['lexicalEntries'][0]['entries'][0]['senses'][0]['synonyms']

for s in range(10):
    print(synonyms[s]['text'])

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :+1:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for oxforddictionaries, version 0.1.101
Filename, size File type Python version Upload date Hashes
Filename, size oxforddictionaries-0.1.101-py3-none-any.whl (3.5 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size oxforddictionaries-0.1.101.tar.gz (2.8 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page