Skip to main content

Oxford API wrapper

Project description

Oxford.py

What is this package for?

This package wrappers Oxford api. Why? The oxford api returns large amount of dict which hard to read so we decided to simplify it for the oxforfd api users. This package is open source CONTRIBUTE HERE

Get your API key and App ID from https://developer.oxforddictionaries.com/

Uses:

This package works asynchronous.

Oxford.api_request

This returns that whole massive dict so if you want to work with this you can.

import asyncio
from oxford import Oxford
x = Oxford(your_app_id, your_app_key, language ='en-gb')
async def main():
    data = await x.api_request('People')
    return data

loop = asyncio.get_event_loop()
loop.run_until_complete(main())

Oxford.get_word_defination()

import asyncio
from oxford import Oxford
x = Oxford(your_app_id, your_app_key, language ='en-gb')
async def main():
    data = await x.get_word_defination('People')
    return data

loop = asyncio.get_event_loop()
loop.run_until_complete(main())

And much more, I'll leave them to you to explore :)

Project details


Download files

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

Source Distribution

Oxford.py-0.0.3.tar.gz (3.4 kB view hashes)

Uploaded Source

Built Distribution

Oxford.py-0.0.3-py3-none-any.whl (3.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page