-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathteste.py
42 lines (25 loc) · 873 Bytes
/
teste.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
from application.src.services.api_service import dataRequests
var = dataRequests()
print(var)
class SearchData:
def __init__(
self, username: str, title: str, resulm:str
):
self.username = username
self.title = title
self.resulm = resulm
def Search(self, query: str):
data = self.PickingupDataForResearch()
if query.lower() in data["title"].lower():
return f"{query}: {data['title']} \n {data['resulm']}"
else:
return f"Resultado não encontrado para {query}"
def PickingupDataForResearch(self):
return {
"username": self.username,
"title": self.title,
"resulm": self.resulm
}
var = SearchData()
resultado1 = var.Search('como sabe o tamanho de um modolo')
print(resultado1)