Unofficial Python API for Dicio based on the original API of Felipe Pontes.
Project description
Python API for Dicio.com.br
Installation
$ pip install Dicio
Usage
from dicio import Dicio
# Create a Dicio object
dicio = Dicio()
# Search for "Doce" and return an object Word
word = dicio.search("Doce")
# Print the word, the url and the meaning
print(word, word.url, word.meaning)
# Print a list of synonyms
print(word.synonyms)
# Print a list of examples
print(word.examples)
# Print extra informations
for chave, valor in word.extra.items():
print(chave, "=>", valor)
# Load information about the first synonym
# Print the word, the URL and the meaning of the first synonym
word.synonyms[0].load()
print(word.synonyms[0], word.synonyms[0].url, word.synonyms[0].meaning)
Word details
Attributes
- word - the word itself
- url - Dicio.com.br URL for the word
- meaning - the meaning
- etymology - the etymology
Properties
- synonyms - list of synonyms
- examples - list of examples
- extra - dictionary of extra information (keys in portuguese)
Functions
- load - load information from Dicio.com.br
Contribute
If you want to add new features or improve something, send a pull request!
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
dicio_scrapper-0.0.1.tar.gz
(4.7 kB
view hashes)
Built Distribution
Close
Hashes for dicio_scrapper-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4b19475b3f9748dc101d3dd3db29ffea5b8fca7ef975ea9fdad9ab775a8fc049 |
|
MD5 | 3fa0d3a5ded218716d67aa55e709ba9c |
|
BLAKE2b-256 | 4e47c5e8c431366004fe90aae47d37192609618924b3cfb50b92257e2227194b |