A library that fetches definitions from the DLE
Project description
raebot
Search for definitions from the DLE.
This package is inspired by pyrae, but is implemented in a way I find more intuitive. Also, most importantly for me, synonym and antonym support.
Installation
pip install raebot
Develop
- Install poetry.
- Create a virtual environment
- run
poetry installto install the dependencies.
TDD recommended. Add a case, then update the script to make the test pass.
PRs welcome.
Testing
Run poetry run pytest to run the tests.
Publish
If you are Weiwei or one of his robots, run poetry publish --build to publish a new version.
Usage
>>> from raebot import search_words
>>> from pprint import pprint
>>> pprint(search_words('hola'))
[Word(word='lindo, da',
etymology="Del lat. limpĭdus 'limpio', 'puro'.",
definitions=[DefinitionX(types=['adj.'],
definition='Hermoso, bello, grato a la vista.',
examples=[],
synonyms=['bonito',
'bello',
'hermoso',
'precioso',
'exquisito',
'agraciado',
'guapo',
'majo'],
antonyms=['feo']),
DefinitionX(types=['adj.'],
definition='Perfecto, primoroso y exquisito.',
examples=[],
synonyms=[],
antonyms=[])],
phrases=[Phrase(phrase='lindo don Diego',
definition=[Definition(types=['m. coloq.', 'desus.'],
definition='lindo (‖ hombre que '
'presume de guapo).',
examples=[])])])]
Warning
For now it is used by me myself and I for generating anki flashcards. It may never be on feature parity with pyrae. But we shall see.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file raebot-0.2.0.tar.gz.
File metadata
- Download URL: raebot-0.2.0.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.12.1 Darwin/23.2.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f8e0f779db4588ca14b5ed8cf5f0c1318f699b6a2f19f0ca9b77b0d7cbdc5363
|
|
| MD5 |
40cb5a20bcd81a4c4a525a2b9d5e5f11
|
|
| BLAKE2b-256 |
1b1657cb60d525c1cf669899f43062e0949d175242d105b1c0abe3858387ea32
|
File details
Details for the file raebot-0.2.0-py3-none-any.whl.
File metadata
- Download URL: raebot-0.2.0-py3-none-any.whl
- Upload date:
- Size: 3.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.12.1 Darwin/23.2.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ee44b4640f22ffaf4e36b5ec585859d0ad169da83db52929c195698023097abb
|
|
| MD5 |
c3d696d6d18a689cd098ff7497ba8271
|
|
| BLAKE2b-256 |
084a93538ee3993923bc9e608eb47f2a001c9c2b53e3b3630b512f1e51bb0cef
|