A client implementing the Dictionary Server Protocol (DICT)
Project description
py-dict-client 0.1.0
py-dict-client
is a Python 3 client implementing the Dictionary Server Protocol.
Installation
$ pip install py-dict-client
Usage
>>> from dictionary_client import DictionaryClient
>>> dc = DictionaryClient()
>>> dc.databases
{'fra-eng': 'French-English FreeDict Dictionary ver. 0.4.1',
'eng-fra': 'English-French FreeDict Dictionary ver. 0.1.6',
'wn': 'WordNet (r) 3.1 (2011)',
'foldoc': 'The Free On-line Dictionary of Computing (2020-04-05)'}
>>> dc.define('oiseau', db='fra-eng').content
[{'db': 'fra-eng', 'definition': 'oiseau /wazo/ <n, masc>\nbird'}]
>>> dc.define('chauffeur').content
[{'db': 'fra-eng', 'definition': 'chauffeur /ʃofœʀ/ <n, masc>\nchauffeur, driver'},
{'db': 'eng-fra', 'definition': 'chauffeur /ʃoufər/\nchauffeur'},
{'db': 'wn', 'definition': 'chauffeur\n n 1: a man paid to drive a privately owned car\n...'}]
>>> dc.match('hello').content
defaultdict(<class 'list'>, {'eng-fra': ['hello'], 'wn': ['hello'], 'foldoc': ['hello']})
>>> dc.disconnect()
TODO implement remaining commands in specification
- STATUS
- SHOW INFO
- SHOW SERVER
- HELP
- OPTION
- AUTH
- SASLAUTH
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
py-dict-client-0.1.2.tar.gz
(17.6 kB
view details)
Built Distribution
File details
Details for the file py-dict-client-0.1.2.tar.gz
.
File metadata
- Download URL: py-dict-client-0.1.2.tar.gz
- Upload date:
- Size: 17.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e911e904c427ad1537aaa795795d9d0caf2cfb0150c3aec073db01d83c8630e8 |
|
MD5 | 7778b5dcd2416143a43486cb4d249f2e |
|
BLAKE2b-256 | 231acc498106319624dbffd7c32ed4a2717d5af3fbf21861f6ac690f62d3a5fc |
File details
Details for the file py_dict_client-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: py_dict_client-0.1.2-py3-none-any.whl
- Upload date:
- Size: 18.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1aa0ca669c8770e5a5f0d72336f8a086ec893f604117ef615bd4b3f95e414a75 |
|
MD5 | 0a4baacaa8fad38b4f1c0c98dcc9b325 |
|
BLAKE2b-256 | 680ee16ca636763ce437cda145b74efd6470fad720715e64497f3b8a7449d1b8 |