Oxford Quick Start

First of all you need an official Oxford app_id and app_key.
You can get this from Oxford Dictionaries Developer.
>>> from pythonary import Oxford
>>> app = Oxford.Dictionary(app_id="YourAppID",
...                         app_key="YourAppKey")
>>> app.Select(word="example")
>>> app.name()
<<< example
This will return the name from the word. (so the word itself)

Oxford Reference

Dictionary

Represents a dictionary from the Oxford Dictionaries,
This class connects to the Oxford Dictionaries API and receives information.
Arguments for Dictionary:

Parameters:

  • app_id: Required[str]
    The application id is used to connect to Oxford Dictionaries.
    Receive your application id here.
  • app_key: Required[str]
    The application key is used to connect to Oxford Dictionaries.
    Receive your application key here.
  • language: Optional[str]
    The language Pythonary will search in.
    Default language is ‘en’ or English.
    This variable must be the ‘Language Code’ and not the full language name!
    See all the language’s here
Example:
>>> from pythonary import Oxford
>>> app = Oxford.Dictionary(app_id="YourAppID",
...                         app_key="YourAppKey",
...                         language="en-gb")

Select

Select a word, per select 1 API request gets sent.
You can only use all the other commands when a word is selected.
Using the API this way leads to less requests and equal information!

Parameters:

  • word: Required[str]
    The word you want to have selected, this word must be in the singular form.
Example:
>>> from pythonary import Oxford
>>> app = Oxford.Dictionary(app_id="YourAppID",
...                         app_key="YourAppKey")
>>> app.Select("example")

parsed

Retrieve the raw JSON information.
You can preform all JSON commands on it!

Returns:

Example:
>>> from pythonary import Oxford
>>> app = Oxford.Dictionary(app_id="YourAppID",
...                         app_key="YourAppKey")
>>> app.Select("example")
>>> app.parsed()
<<< {'raw':[{'json':'data', 'in':'a', 'python':'dictionary'}]}

name

Retrieve the word name (the word itself) from the current selected word.

Returns:

etymologies

Retrieve the word etymologie from the current selected word.

Returns:

  • etymologie[str]

definition

Retrieve the selected word its definition.

Returns:

  • definition[str]

short_definition

Retrieve the selected word its short definition.

Returns:

  • short definition[str]

example

Retrieve an sentence where the selected word is in as example.

Returns:

sub_definition

Retrieve the selected word its sub definition.

Returns:

  • definition[str]

sub_short_definition

Retrieve the selected word its short sub definition.

Returns:

  • definition[str]

sub_example

Retrieve an sub sentence where the selected word is in as example.

Returns:

language_code

Retrieve the selected word its language_code, this should be your custom inserted one.
If none was given “en” will be the code as its the default one, when its “en”, “en-us” ect are also included.

Returns:

category

Retrieve the form/category from the selected word (Noun,…).

Returns:

  • category[str]

audiofile

Retrieve the audiofile download url from the selected word.

Returns:

audiofile_dialect

Retrieve the audiofile dialect from the selected word.

Returns:

phonetic

Retrieve the phonetic spelling from the selected word.

Returns:

  • phonetic[str]

phonetic_notation

Retrieve notation from this word its phonetic notation.

Returns:

  • phonetic[str]